Commit Graph

116 Enmetoj

Author SHA1 Message Date
Jaidyn Ann 13ea8fecdf Write conversation list, put it in main window
Now all active conversations will be listed in the main window, in a
ConversationListView. Clicking one of the items will open its
conversation window as you'd expect, etc.
2021-05-27 11:15:30 -05:00
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 5d9d16459f Add menubar to main window 2021-05-25 13:57:53 -05:00
Jaidyn Ann 3d020c4628 Populate conversations with logs, if any saved
Also adds a function to protocols to toggle this― if CayaProtocol::SaveLogs()
returns true, then local logs will be used to popualte conversation
windows. Otherwise, it's up to the protocol itself.

A new protocol IM_MESSAGE was also created, IM_LOGS_RECEIVED, which can
be used to populate conversations with old logs.
2021-05-24 19:12:42 -05:00
Jaidyn Ann cba947475c Log message recieve times 2021-05-24 14:48:25 -05:00
Jaidyn Ann 385bfbff35 Add text logging of chats
Now chat sessions are logged to ~/config/settings/Caya/Cache/Logs/.
2021-05-24 14:20:57 -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 7822ec0449 Split 'Contact' class into two
This dichotomy is useful and necessary in multi-user chats, so I split
Contact into a parent class, User. User should be used for generic
members of rooms, Contact used mainly with the roster.
2021-05-23 15:10:14 -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
Jaidyn Ann 6ca134f9f6 Load/Save account settings from correct paths 2021-05-21 15:52:33 -05:00
Jaidyn Ann 61a1f0baf1 Allow multiple protocols per add-on
Now an add-on can contain multiple protocols, and the protocol API has
changed. An add-on must now export protocol_count() and protocol_at(),
with the latter replacing protocol(). protocol_count() returning the
amount of protocols in a given add-on, and protocol_at(i) giving a
new CayaProtocol* "at" the given index.

CayaProtocol has also been changed, adding Signature(),
FriendlySignature(), Icon(), Path(), and SetPath(). The reasoning is
that different protocols (even within a single add-on) will have
different signatures and icons, so this data should be accessible from
the protocol itself.

CayaProtocolAddOn now has CountProtocols() and ProtocolAt(i), allowing
the accessing of multiple protocols. A CayaProtocolAddOn can be given a
default protocol index in the constructor, whose protocol will be
returned with Protocol(). Version() was also moved from CayaProtocol to
CayaProtocolAddOn.
2021-05-21 13:47:14 -05:00
Jaidyn Ann 53fe03d2c8 Generate protocols' settings templates by call 2021-05-20 09:32:52 -05:00
Jaidyn Ann df55e1d9f5 Switch from Jam to Make 2021-05-19 16:12:19 -05:00
Jérôme Duval 3d2f70c527 x86_64 build fix. 2017-01-30 07:19:59 +01:00
Ivan Gualandri b4d9d575a9 Task #12
* Add General section in Preference/Behavior
 * Don't prompt at quit option under General section
 * Show confirmation dialog on quit (if enabled)

Misc
 * Replace +/- in preferences Accounts with Add/Del
2015-10-02 04:17:54 +00:00
Ivan Gualandri fb5f1c38cf Task #12: add confirmation dialog 2015-09-29 08:59:40 +00:00
Barrett17 7f7c723e3b Remove custom ObjectList header. 2015-07-02 22:07:54 +00:00
Barrett17 e41a0338f1 Update Caya.rdef
Set a version for Caya.
2015-06-26 22:49:13 +02:00
Barrett17 2c2b808875 Remove SVN unneeded stuff. Update my own copyright. 2015-06-24 16:45:55 +00:00
Barrett17 8ed06e4de5 IconUtils is now Haiku public API remove it. 2015-06-24 16:23:04 +00:00
Barrett17 ae0652f3cc Finally cleaned up the buildsystem. 2015-06-24 15:31:54 +00:00
barrett17 007d2bda0a Initial rework of the build system to support the latest Haiku changes. Patch from Adrien Destgues included, Thanks! 2013-10-12 17:59:00 +00:00
Barrett 00440a3ffc Initial gcc2 support, patch from Haikuports, with a little modification by myself. Set the deskbar replicant show as default, and removed the gcc4 notice from preferences. 2013-07-31 22:34:52 +02:00
pisarzk@gmail.com ac7a745bf9 Add message count to notifications
Added unread message count to window title and also in notification.
Made one notification for each conversation, with new messages, the
count is simply being updated.
2013-07-30 20:54:22 +02:00
barrett 5e26a038dc Updated TODO in CayaPreferences. 2013-04-06 19:59:46 +00:00
barrett 007af3d89a Patch from Maciej Janiszewski which adds support for hiding offline contacts, message notifications and caya can now set the window title to unread state, all functions can be disabled from settings as well. Thanks\! 2013-04-06 19:47:04 +00:00
barrett 53c5c02d66 Set better proportions between the send and receive views of the ChatWindow. Made the window split more thin. 2013-01-04 17:37:53 +00:00
barrett 101006a459 Patch from Rene Gollent that add a split in the ChatWindow to resize the send and receive views. Thanks!! 2012-11-28 15:20:17 +00:00
barrett 14fee07aeb A lot of style fixes, fixed a lot of warnings in RunView and Theme classes. 2012-10-18 20:59:15 +00:00
barrett 9cf1222142 Fixed a bug of the RosterListView menu. 2012-10-01 12:29:15 +00:00
barrett 8a27f1f3db Added the 'Start Conversation' menu to the RosterListView. Disabled the menus referring to unimplemented features. 2012-09-28 21:19:24 +00:00
barrett 133d3be911 Solved a double free. 2012-09-28 20:55:40 +00:00
barrett 5df2084053 Some style fixes and updated some copyrights. Removed the experimental code around SearchBarTextControl, and restored it to the previous functionality (i.e. no placeholder, until i finish my BTextControl patch to allow it), added also a 'instant search' like functionality to such class (every time you press a character the list is refreshed). This revision will be probably the next candidate for the Caya's optional package. 2012-09-25 21:45:29 +00: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 d661379bc4 Fixed style and a warning, removed unuseful source file. 2012-05-29 00:44:02 +00:00
barrett 8ec3b19976 Added missing SearchBarTextcontrol class 2012-05-15 19:34:23 +00:00
barrett 088a1bb5f5 Fixed a AIM plugin build error introduced in recent revs. 2012-05-15 19:28:56 +00:00
barrett 2ed795031f Fixed another memory leak. 2012-05-15 17:31:31 +00:00
barrett 7540f60d24 Resolved a memory leak, removed unuseful commented code, CAYA_EXTENDED_AWAY replaced with CAYA_CUSTOM_STATUS and added CAYA_INVISIBLE. 2012-05-15 17:20:11 +00:00
barrett 710a3c6526 Updated the contacts list BMenuItem with a complete redesign of the item, added an experimental version of the Search BTextControl showing a text that disappear when the user click on it, updated the Nickname text control to be a BTextView, other minor updates already WIP like more organization of statuses. 2012-05-15 16:48:53 +00:00
barrett de33c1be80 Added code to show protocol's icon in the chat window. 2012-05-01 22:42:09 +00:00
barrett 493fed2f80 Setted the Person icon from haiku artwork as default contact icon. 2012-05-01 21:09:56 +00:00
barrett 9df2b09f45 Added a little bitmap at the left of the avatar in the contact list, that show the icon of the contact's protocol. Added a needed little method in the ContactLinker to get the contact protocol's bitmap as well. 2012-05-01 19:48:15 +00:00
barrett 9f4470c334 Modified the Replicant preferences string to notify that it's working only under gcc4hybrid atm, a development release will follow. 2012-03-24 23:54:58 +00:00
barrett 7318f6f28b Modified the CayaPreferencesData class to become a BFlattenable, this remove the limit of having a fixed-size buffer for string settings. 2012-03-24 14:56:00 +00:00
barrett b96ea4c6bf Fixed a bad behaviour showing and locating the chat windows. 2012-03-19 20:43:18 +00:00
barrett 2f142c0d67 Added replicant preferences view. 2012-03-13 22:57:04 +00:00
barrett 0696ce92db Updated replicant menu icons. 2012-03-12 01:41:46 +00:00
barrett 19869c3970 Fixed code style, fixed a regression that caused a bad position when the chat window is created. 2012-03-12 00:40:37 +00:00