Commit Graph

223 Enmetoj

Author SHA1 Message Date
Jaidyn Ann cd3eb3cbf3 Re-enable logging, make appending messages to ConversationView safer
Now all instances of sending messages (bar status changes) to a
conversation's CayaRenderView only happen when attached to the window.

Messages sent by user appear after the protocol confirms it's been sent
(IM_MESSAGE_SENT), rather than appearing right after the user sends it
to the protocol (IM_SEND_MESSAGE).

Logs are now re-enabled (since they can safely be appended under any
circumstance).
2021-05-30 19:21:29 -05:00
Jaidyn Ann 3e202e3609 Fix message-passing to roster window 2021-05-30 17:14:17 -05:00
Jaidyn Ann 5dbcfc1a52 Use same weight for all conversation views 2021-05-30 13:45:08 -05:00
Jaidyn Ann 641e8b1fb4 Correct spacing and sizes of main window views
Removes explicit setting of sizes in ConversationView and StatusView,
allowing them to be resized appropriately. Also rearranges StatusView
somewhat, so that it's more friendly to smaller sizes. (The avatar is
moved from being beside the status menu field to being beside the
nickname textbox.)
2021-05-30 12:30:57 -05:00
Jaidyn Ann f0492a995d Merge MainWindow and ChatWindow 2021-05-29 15:47:54 -05:00
Jaidyn Ann b9d120a8f6 Use a single ChatWindow for all conversations
All chats now stay in a single window, which removes and switches its
current ConversationView with the appropriate one using
Conversation::GetView().

This is a stepping-stone to merging the ChatWindow into the MainWindow.
2021-05-28 22:26:32 -05:00
Jaidyn Ann 3ace145248 Move bulk of chat window into a dedicated ConvesationView
This will help to move to a single-window layout, instead of having a
dedicated window per-chat.
2021-05-28 08:38:33 -05:00
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 96195039e0 Use gloox'es jidJID() instead of deprecated jid() 2021-05-19 16:13:24 -05:00
Jaidyn Ann df55e1d9f5 Switch from Jam to Make 2021-05-19 16:12:19 -05:00
Jaidyn Ann c6c1bb349a Remove obselete libraries/protocols 2021-05-19 15:48:07 -05:00
Barrett17 43275b5e22 Merge pull request #15 from korli/patch-1
x86_64 build fix.
2017-01-31 21:09:38 +01:00
Jérôme Duval e2cd276b00 x86_64 build fix 2017-01-30 07:23:52 +01:00
Jérôme Duval ba991ee13c remove msn from the build 2017-01-30 07:22:31 +01:00
Jérôme Duval 7d341e6f3d remove libmsn from the build 2017-01-30 07:21:56 +01:00
Jérôme Duval 0d919f41ca grep would find binary content 2017-01-30 07:21:19 +01:00
Jérôme Duval 3d2f70c527 x86_64 build fix. 2017-01-30 07:19:59 +01:00
Barrett17 568187da8d Update README.md 2015-11-06 20:31:42 +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
Dario Casalinuovo 6de2682326 MSNP: Fix bad return value 2015-07-21 03:00:28 +02:00
Barrett17 53b2614595 Remove old ifdefs. 2015-07-02 22:11:04 +00:00
Barrett17 7f7c723e3b Remove custom ObjectList header. 2015-07-02 22:07:54 +00:00
Barrett17 512c5c085a Remove tests subdir from Jamfile. 2015-07-02 22:01:24 +00:00
Dario Casalinuovo 4c2b3ed86c Fix typo preventing to build under gcc4. 2015-06-28 11:51:46 +00:00
Barrett17 e41a0338f1 Update Caya.rdef
Set a version for Caya.
2015-06-26 22:49:13 +02:00
Barrett17 2f8d429566 Update README.md
Add project page.
2015-06-25 15:34:08 +02:00
Barrett17 4b35b432de Create README.md 2015-06-25 15:30:38 +02:00
Barrett17 d1d8bd1c4d Move protocols icons to data directory. 2015-06-25 11:27:16 +00:00
Barrett17 e46082eaaa Remove garbage from libyahoo directory. 2015-06-25 11:27:08 +00:00
Barrett17 c8d143d91d Remove libdownload test. 2015-06-25 11:27:00 +00:00
Barrett17 23285141b3 Make libgloox to work correctly with gcc2. 2015-06-25 11:26:48 +00:00
Barrett17 2c2b808875 Remove SVN unneeded stuff. Update my own copyright. 2015-06-24 16:45:55 +00:00
Barrett17 2237be9a93 Remove MenuPrivate.h, no idea why it was included in the first place. 2015-06-24 16:27:19 +00:00
Barrett17 8ed06e4de5 IconUtils is now Haiku public API remove it. 2015-06-24 16:23:04 +00:00
Barrett17 ab1f28bad2 Remove libdownload which was preserved in a branch. 2015-06-24 16:17:47 +00:00
Barrett17 f487e366fb Add remaining part of libgloox. 2015-06-24 16:08:12 +00:00
Barrett17 05633562d6 libgloox Haiku buildfixes. 2015-06-24 15:56:20 +00:00