Commit Graph

28 Enmetoj

Author SHA1 Message Date
Jaidyn Ann 0326cee687 Move roster into its own generic window
The roster list is now split from MainWindow into RosterWindow, which
can be used arbitrarily for selecting something from contacts. The
im_what, title, and target can be specified.

Right now it's in use under the Chat menu, "New chat…". Chats can only
have two members (DM/PM), so "New chat…" directly leads to the roster
list.

In the future, roster list might be extended to allow specification of
non-contact users based on their identifiers, or filtering based on
protocol/account― this could help it with "invites" to future rooms,
etc.

IM_CREATE_CHAT and IM_CHAT_CREATED were also added to the protocol API,
allowing a new chat to be explicitly created from Caya or the protocol.
2021-05-26 07:48:25 -05:00
Jaidyn Ann 48d0b7bc96 Create Conversation class, use it instead of Contact for chats
This is a commit with it's foot in a lot of places, but:

The Conversation class was created as the abstraction of chats: All
ImMessages that are relevant to a conversation get routed through it,
meta-data on chats is stored in it (even if right now that's basically
limited to the user list and ID).

Server was given more methods to help accessing contacts―
ContactById(BString) and AddContact(Contact*). This better allows
Conversations to add and fetch Contacts as necessary. Right now, all
users in chats are treated as Contacts, so in the future creating an
independent userlist for Server (fUserMap?) would be useful.

Server also now stores all Conversations (fChatMap) and has some
convenience methods like for Contacts: Conversations(),
ConversationById(BString), and AddConversation(Conversation*).

CayaRenderView has been changed to not store user nicks, and will use
the appropriate nick of any arbitrarily-numbered user.

Users also have a map of all Conversations they are a part of
(fChatMap).

The Remove* methods of KeyMap now return the removed item.
2021-05-24 01:47:21 -05:00
Jaidyn Ann fc16b9b090 Rename ContactLinker to Contact 2021-05-23 14:39:07 -05:00
Jaidyn Ann 4705d586f9 Show protocol icons in notifications
CayaProtocolAddOn now has the convenience functions ProtoIcon(),
ProtoSignature(), and ProtoFriendlySignature(), for getting info from
its default protocol.
2021-05-22 12:05:44 -05:00
barrett 92f2ee4547 Improved the behaviour to don't get focus when a message is received or the user is typing, from that rev the chat window will appear on the screen without leaving the focus of your current application. But there are two exeptions...when a window is created the first time or the user open it from the contacts list it will get focus. Other little fixes, changed variable names and style. 2012-06-07 16:46:07 +00:00
barrett 730e9d3d49 Added a simple WIP ContactInfoWindow that will be improved while we add new informations available in the ContactLiker, actually it's useful to get the contact id/email. 2012-03-11 15:11:29 +00:00
barrett b80c9b2b11 Modified the preferences to select if the chat window should be auto raised when a message is received or when a user is typing, or both. This fix the issue #555. 2012-03-09 00:35:02 +00:00
barrett 8516381043 Enabled notifications using the BNotification API, including enable/disable settings. The plugins that support it are XMPP and MSN. Added another tab in the preferences window named Replicant and moved the replicant settings here. 2012-03-08 22:55:13 +00:00
barrett 3f2f2783ff The personal message of a contact is now show in the chat window, added also the needed code in Server.cpp to update the windows. Solved a bug with the contact avatar that was causing Caya to crash. 2012-03-08 00:47:00 +00:00
barrett c22310f510 Modified ContactLinker : moved some inline methods from class declaration, added Get* methods for contact status and status message. Added code in the ChatWindow to show the current avatar of the user. Modified the Server to allow a plugin set the status message when sending a IM_CONTACT_INFO notification to the server, as before it's already possible to do it using a IM_STATUS_SET message. 2012-03-07 19:22:09 +00:00
barrett 8d04f539c2 Added code that allow the deskbar replicant to be disabled/enabled from the preferences 2012-03-04 02:27:16 +00:00
barrett f51f924b89 Fixed replicant issue, it's working as well, but only under a gcc4 Haiku atm. Modified disposition of the main gui widgets, now they are placed better. 2012-02-28 00:46:15 +00:00
barrett 4aff3e3422 Added a new deskbar replicant with related classes and icons, disabled libdownload and curl depencency, fixed some warnings and style violations around the code 2011-12-14 23:36:27 +00:00
plfiorini 98dd89fb55 Update copyright year. 2011-12-03 22:38:03 +00:00
plfiorini 30470d4816 Exclude information notifications. 2010-07-03 08:40:04 +00:00
plfiorini fada1ba067 * Changes to notification code for my not yet merged Haiku patch (BNotification API changes).
* Exclude notification code for the moment, until the patch is merged.
2010-07-03 07:55:23 +00:00
plfiorini 5ddeef6e7b * Handle IM_NOTIFICATION.
* Shows notifications when contacts go online or offline. Unfortunately XMPP plugins will send presence notifications when the roster is populate so presence notification is shown for every online contact when the roster list view is populated the first time.
2010-05-30 18:56:24 +00:00
plfiorini d503077fac Implemented IM_PROGRESS, closes #479. 2010-05-30 12:17:32 +00:00
plfiorini 95657d52ba * More NULL checks for ContactLinkers.
* When you edit an account in the preferences dialog, this is not readded to the list anymore and so its login is not triggered another time.
2010-05-30 04:28:04 +00:00
urnenfeld 3a8af7c9f9 Forwarding messages to ChatWindow
Added stringview as status feedback
2010-05-28 22:38:16 +00:00
plfiorini ff80897441 Set name only if it's a non-empty string and handle IM_EXTENDED_CONTACT_INFO in order to use full name if the contact still don't have a name. 2010-05-28 21:31:53 +00:00
plfiorini 88c5eedc9b Some style violations fixed. 2010-05-20 21:31:55 +00:00
plfiorini 4412809657 Fix some style violations. 2010-05-19 22:28:26 +00:00
plfiorini 2ee14f4c14 * Some style violation fixes.
* Code aligned to recent multiprotocol branch changes.
* Fixed crash when Server filters IM_STATUS_SET messages and ContactLinker is NULL.
2010-05-19 20:37:26 +00:00
plfiorini 8d1c0d1a9d Merging r148, r154, r155 with trunk. 2010-05-19 17:11:22 +00:00
plfiorini 4bdc37a60e Merged multiprotocol branch with trunk. 2010-05-16 21:02:50 +00:00
plfiorini 8d6d06dbfe Adding AIM protocol from Alexander Botero-Lowry, but it needs polishing. 2010-05-12 20:42:46 +00:00
plfiorini 0bf4b59922 Usual SVN tree (branches, tags, trunk). 2010-05-07 09:47:10 +00:00