Commit Graph

26 Enmetoj

Author SHA1 Message Date
Jaidyn Ann 20c6b9fc30 (purple) Automatically reconnect disconnected account 2021-07-19 19:59:27 -05:00
Jaidyn Ann 6875c3cb75 (purple) Localization, init catkeys 2021-07-18 21:51:38 -05:00
Jaidyn Ann 8d47983c47 (purple) Send errors to Cardie; IM_PROTOCOL_DISABLED
Connection errors are now sent to Cardie through an IM_ERROR message
(which appear in a BAlert), and an IM_PROTOCOL_DISABLED IM_MESSAGE is
sent to Cardie when the account is disabled/connection fails.
2021-07-18 13:54:31 -05:00
Jaidyn Ann 0c8af4dd86 (purple) Chat-members leaving, receiving statuses 2021-07-15 16:41:22 -05:00
Jaidyn Ann 91ab9d8fb7 (purple) NotifyMessage dialog
First of the NotifyUiOps― not sure if the others are used for anything
useful in our use-case, I'll implement as I run into them.
2021-07-12 10:09:29 -05:00
Jaidyn Ann c5521ad9a3 (purple) RequestAction dialogs
First progress in support for purple's Request dialogs
2021-07-11 15:22:49 -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 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 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 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 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 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 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 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