The BTextBox used for sending messages has been moved from the main
window to individual ConversationViews, allowing seperate histories,
texts, etc., to exist in different conversations.
EditingFilter (a filter that hooked into MainWindow) was previously used
to field special key combos with this textbox, including "ENTER" for
sending, but this has been replaced with a new textview subclass
(SendTextView).
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.
It doesn't make sense to lump the user themself with their contacts
list― their Contact object is now stored seperately.
BBitmap loading for RosterItems are fixed, as well.
Fixes#33
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.
Sometimes a protocol's commands are dynamic, or change based on certain
events― and it's necessary in these cases that commands be reloaded.
The IM_PROTOCOL_RELOAD_COMMANDS message is now added to the API, which
will force Cardie to reload commands from the protocol.
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.
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/.
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.