Commit Graph

136 Enmetoj

Author SHA1 Message Date
Jaidyn Ann 5217c282e2 (purple) Fix message receive 2021-07-09 11:53:16 -05:00
Jaidyn Ann f4df6d0d3b Typing auto-complete for usernames 2021-07-09 11:52:57 -05:00
Jaidyn Ann 988a4ebfb6 (purple) Handle user_id and user_name dichotomy
Fixes #29
2021-07-07 20:44:11 -05:00
Jaidyn Ann 4294993761 (purple) Fix rdef in Makefile 2021-07-07 15:49:48 -05:00
Jaidyn Ann 4b372238cc Build purple by default 2021-07-07 15:09:19 -05:00
Jaidyn Ann d05793bbf9 (purple) Add-on and protocol icons
Pidgin's icon has been borrowed as the add-on's icon― and protocol icons
are taken from `$DATA_DIR/pixmaps/Pidgin/protocol/`, just as
Pidgin/libpurple installs them.

Any third-party plugins will also install their icons there, even
if just locally.

I've updated the libpurple package to include these icons, hopefully
that'll get merged.
2021-07-07 15:05:49 -05:00
Jaidyn Ann f0f2375b09 (purple) Senderless messages are system messages 2021-07-06 14:27:14 -05:00
Jaidyn Ann 735dda4188 (purple) Remove mod perms, command warnings
Since moderation commands are implemented per-protocol in libpurple
(with no easy way to use with the catch-all IM_ROOM_BAN_PARTICIPANT
message and corresponding command), the PERM_BAN, PERM_KICK, and a
couple other moderative perms aren't afforded to the user, disabling
these non-functional options in the UI.

The commands can still be implemented by the libpurple plugin, though.
If they aren't, purple will complain with some error message.
2021-07-06 14:13:10 -05:00
Jaidyn Ann 9d8b35fc86 (purple) Send user-roles to Cardie
Fixes #24
2021-07-06 12:08:51 -05:00
Jaidyn Ann e88a8372dc (purple) Unescape XML entities 2021-07-06 02:09:18 -05:00
Jaidyn Ann 0c48cf514b (purple) Execute commands, report status
Fixes #25
2021-07-06 01:22:08 -05:00
Jaidyn Ann 0864ddae81 (purple) Reformat UI ops 2021-07-06 00:56:16 -05:00
Jaidyn Ann 91c7e44b44 (purple) Register per-protocol commands 2021-07-05 23:56:59 -05:00
Jaidyn Ann 95da508a38 (purple) Editing of buddy's alias 2021-07-05 17:48:32 -05:00
Jaidyn Ann c0f126206a Include default templates, split "room"
The "room" template has been split into two seperate
templates― "join_room" and "create_room". Before, "room" was used in the
room creation window, but now that's delegated to "create_room".

"join_room" is used with the join window― so now, the add-on has total
control over the slots used to join/create rooms generally, if they
specify the templates. Even a "/join" command could be overriden by the
add-on.

Also, default templates are now in use. Rather than add-ons being
required to specify templates, there are sensible defaults included with
Cardie for each one.
2021-07-05 13:48:33 -05:00
Jaidyn Ann 23bee9b0a6 (jabber) Remove obselete Facebook and GTalk versions 2021-07-05 13:14:50 -05:00
Jaidyn Ann 74dcf452c2 (purple) Creation/joining rooms using "room" template
Fixes #30
2021-07-05 12:42:41 -05:00
Jaidyn Ann ee8584e14c (purple) Fetch room template from purple 2021-07-04 11:31:32 -05:00
Jaidyn Ann b051cbed5a (purple) Creation of chats 2021-07-03 15:01:32 -05:00
Jaidyn Ann 4d044144b3 (purple) Roster management
Fixes #28
2021-07-03 15:01:00 -05:00
Jaidyn Ann a6c9569be2 (purple) Append ':' to settings names as appropriate 2021-07-02 13:47:47 -05:00
Jaidyn Ann 58e3d99af5 (purple) Typo fix 2021-07-02 10:24:34 -05:00
Jaidyn Ann b5b24939ea Set IRC/Purple passwords as 'secret' fields 2021-07-02 09:19:58 -05:00
Jaidyn Ann 2dc364ef55 (purple) Client-initiated joining and leaving rooms 2021-07-01 20:52:46 -05:00
Jaidyn Ann d63fe22afe (purple) Handle outgoing invites
Fixes #23
2021-07-01 20:18:10 -05:00
Jaidyn Ann 10003276cd (purple) Handle incoming invites 2021-07-01 19:49:39 -05:00
Jaidyn Ann 140a7f8834 (purple) Load server-side contacts 2021-07-01 18:34:56 -05:00
Jaidyn Ann d883c23d18 Reorganize settings directory, custom purple paths
The settings file-hierarchy has been changed a bit:
	* Cardie/
		* preferences
		* Accounts/
		* Cache/
			* Accounts/
			* Add-Ons/

`Cardie/Protocols` is now `Cardie/Accounts`, and the cache directory
has been split into two. `Cache/Accounts/` is for account-specific
cached data (e.g., cached roster icons, data, etc.), and
`Cache/Protocols` is for protocol-wide settings/data.

For purple, this will be used as the user's libpurple directory,
which has been moved from the default of `~/.purple` (yikes!)

Some plugin search-paths have been given to purple, too― lib
directories + "/purple2/", and Cardie/Cache/Add-Ons/purple/plugins/.
2021-06-30 21:05:43 -05:00
Jaidyn Ann fb070e841a Store default commands/menu items in resources 2021-06-30 14:27:58 -05:00
Jaidyn Ann 301e22bcb3 (purple) IMs as rooms 2021-06-29 20:02:45 -05:00
Jaidyn Ann f0256babc1 (purple) Sending of room participants
Fixes #27
2021-06-29 15:20:27 -05:00
Jaidyn Ann 06b1df8882 (purple) Sending messages to chats 2021-06-28 12:51:50 -05:00
Jaidyn Ann 82cf946bc8 (purple) Joining rooms, receiving chat messages 2021-06-28 12:13:24 -05:00
Jaidyn Ann 30e3d6eefd (purple) Handle own status changes 2021-06-27 20:42:37 -05:00
Jaidyn Ann f755fa298b (purple) Disconnection of accounts, quit server w/o Cardie 2021-06-27 17:33:20 -05:00
Jaidyn Ann 588b32b9c3 (purple) Main loop, server→add-on→app communication
Now the purple add-on's starting to come together with a clear
structure:
	* Add-on sends IM_MESSAGES etc to the server for processing
	* Server sends all (reply/etc) messages to add-on, which sends
	  to app

It's worth noting that on the add-on's side, no looper or handler is
used for receiving messages, it's all through sending serialized
BMessages to the add-on's connect_thread buffer.

PurpleAccounts are now reliably associated with Cardie's account names
and the thread ID of their respective connect_thread.

The GLib main-loop is gone over regularly thanks to a message runner.

Now, the add-on can log into/create accounts, connect to them, and send
the IM_PROTOCOL_READY notification to Cardie as appropriate.
2021-06-27 16:46:38 -05:00
Jaidyn Ann 66df891577 (purple) Support drop-down string/path menu settings 2021-06-26 21:37:47 -05:00
Jaidyn Ann 0aea480ec2 (purple) Loading Cardie-side account settings into PurpleAccount 2021-06-26 20:40:39 -05:00
Jaidyn Ann 6507a4182f Receive protocols' settings templates from libpurple 2021-06-24 12:22:34 -05:00
Jaidyn Ann ddaf39c300 Returning libpurple protocol amount and names
The libpurple add-on has been split into two parts― a background process
that will actually interface with libpurple, and an add-on that acts as
intermediary between Cardie and the process. This helps prevent
redundancy, and is giving me a lot less trouble that directly loading
libpurple.

The protocol amount and names are now returned by the add-on (through
protocol_count() and protocol_at() respectively)― you can see them in
Preferences' protocol list.
2021-06-23 23:57:27 -05:00
Jaidyn Ann b52be74dfb Init libpurple add-on 2021-06-22 14:42:07 -05:00
Jaidyn Ann de28bc8673 Match up nick with own user_id 2021-06-21 03:22:35 -05:00
Jaidyn Ann 31bc304c0b Enable IRC protocol 2021-06-21 03:06:15 -05:00
Jaidyn Ann 0c615b01fd Basic IRC connection/messaging/joining, etc. 2021-06-21 01:54:42 -05:00
Jaidyn Ann 57ecbd1cb3 Init IRC add-on 2021-06-20 22:17:24 -05:00
Jaidyn Ann fbe6e66743 Change class names 2021-06-20 12:44:20 -05:00
Jaidyn Ann b1920dad47 Move command/menu-item registration to call
Registration of custom chat commands and menu-items for protocols was
done by the IM_REGISTER_* messages, and is now done through direct calls
to the CayaProtocol object.

The new model for call/message for protocols is this: Temporary
information (chat messages, roster members, etc.) should be accessed
through messages. Relatively static data (protocol name, commands)
should be accessed through direct calls to the protocol object.
2021-06-20 01:24:34 -05:00
Jaidyn Ann d4f82dccc6 Removal of roster members
Now roster members can be deleted through the RosterEditWindow.

IM_CONTACT_LIST_REMOVED_CONTACT was renamed to
IM_CONTACT_LIST_CONTACT_REMOVED to fit style of other API messages.

Fixes #1.
2021-06-20 01:22:59 -05:00
Jaidyn Ann a21c8f7601 Editing of roster members
Roster members' can now be edited (through Roster->Edit Roster / CMD+R)

TemplateWindows can now be populated through sending any IM_MESSAGE to
it (it will assume the slots of the message correspond to the
template's).

IM_CONTACT_LIST_ADDED_CONTACT was removed (for redundancy), and
IM_CONTACT_LIST_EDIT_CONTACT was added.
2021-06-19 22:03:02 -05:00
Jaidyn Ann f4342d9310 Roster management, adding new contacts
The base for roster management (RosterEditWindow) has been made, and
adding new contacts works. Up next is contact removal and editing.

This leverages a new template (as defined in a protocol's
CayaProtocol::SettingsTemplate()), "roster," which should contain all
slots pertinent to editing/adding a contact member.

Two new API messages were added for this― IM_CONTACT_LIST_CONTACT_ADDED
and IM_CONTACT_LIST_CONTACT_REMOVED. The former will functionally just
be IM_CONTACT_INFO, but with some semantical meaning.

A new CayaMessage (CAYA_EDIT_ROSTER) was also added.

TemplateWindow was also edited to this end: Now, like RosterWindow/View,
it can be given a specific accounts' instance id, and it will prevent
the selection of another account. A new constructor was also added, to
allow a ProtocolTemplate to be explicitly passed to it― probably from
the program itself.
2021-06-19 18:25:58 -05:00