Commit Graph

341 Enmetoj

Author SHA1 Message Date
Jaidyn Ann ced04e613a Disallow deselecting conversation list item 2021-06-03 23:39:20 -05:00
Jaidyn Ann 2e1190ae8d Fix handling of chat IDs
Don't show status notifications in group chats, make sure chat IDs are
found and set properly (on the XMPP side of things).
2021-06-03 20:24:34 -05:00
Jaidyn Ann a89bec40a3 Sending messages to MUCs, proper logging 2021-06-03 14:25:51 -05:00
Jaidyn Ann b66ea722b0 Send MUC participants on join, and send participants' status 2021-06-02 16:58:29 -05:00
Jaidyn Ann ad1c7b5782 Receive lists and changes in room participants from protocols
Two new messages were added to the protocol API to do this:
M_ROOM_PARTICIPANTS, which can be used when someone joins a room, or
on joining a room to send a full list of users, and IM_ROOM_PARTICIPANT_LEFT,
for when a user has left the room/disconnected.

IM_SET_STATUS no longer assumes received data comes from contacts, but
any general user.

UserItem was made to reflect changes in the User's name.

Chat messages can now be reliably received in a given room. :)
2021-06-02 16:53:03 -05:00
Jaidyn Ann 061489ba2e Recieve messages from MUC rooms 2021-06-02 12:34:00 -05:00
Jaidyn Ann 3f62492b9c Change default window size 2021-06-01 22:12:01 -05:00
Jaidyn Ann 770f7eaee3 Support for joining MUCs; Stanza error-handling
Adds basic support for joining MUCs― so basic that Caya won't even tell
the user they've joined, and messages can't be received.

The scaffolding for further MUC development was added, and some
much-needed error-handling for stanzas has been created.
2021-06-01 21:53:50 -05:00
Jaidyn Ann 75de08a18b Create JoinWindow and protocol messages for joining rooms
Protocol messages was added to the API to allow joining abstract rooms
by their chat_id― IM_JOIN_ROOM and IM_ROOM_JOINED. To make room in
anticipation of future room-related calls, some messages' values have
been shifted.

A JoinWindow was created (found through [Chat→Join Room] or [Alt-J] in
the main window), to allow joining a room with this protocol message.
The user can select which account the room should be joined from through
a drop-down menu in the lower left-hand corner― a design I think could
be replicated in other parts of Caya well.

Path() and SetPath() in CayaProtocol were renamed to AddOnPath() and
SetAddOnPath() respectively. GetName() and SetName() were also added,
where "name" is the account name (aka the leaf of the protocols settings
path).

To Server, a new KeyMap was added for convenience (AccountInstances), to
associate these account names with their instance IDs.
2021-06-01 21:50:17 -05:00
Jaidyn Ann 5c5b180bbe Change RosterWindow's window type 2021-06-01 21:42:22 -05:00
Jaidyn Ann ad673a63f5 Fix libsupport/KeyMap's KeyAt method 2021-06-01 21:41:49 -05:00
Jaidyn Ann 2143de94c1 Remove unused WindowManager class 2021-05-31 16:08:50 -05:00
Jaidyn Ann 91d5b4e0dc Add own user to conversations' user lists
Really, only one line changed in _EnsureConversation()― the rest is
re-organizing the file.
2021-05-31 13:18:07 -05:00
Jaidyn Ann 0581bf1df9 Use 'User' over 'Contact' where appropriate 2021-05-31 11:56:45 -05:00
Jaidyn Ann 63d8bbef26 Add user-list to the conversation view, menu tweaks
UserListView and UserItem were added as the backbone of the user-list,
and the (currently unused) Caya message CAYA_SEND_INVITE was established
for inviting users to rooms.

Some menus were reworked (e.g., pop-ups of the RosterListView) or
generally tweaked to be more sensical or consistent.
2021-05-31 10:50:43 -05:00
Jaidyn Ann ca2e05915d Tweak preferences layout 2021-05-30 22:04:45 -05:00
Jaidyn Ann 70c6001189 Add Vision-like Window menu, conversation list tweaks
ALT-↑ and ALT-↓ change the active conversation, based on its position
in the main window's ConversationListView. If a conversation is
registered by the main window, and no other conversation is selected, it
is automatically selected.
2021-05-30 20:46:53 -05:00
Jaidyn Ann 71ae1456c6 Use system colors instead of hardcoded for CayaRenderView 2021-05-30 19:34:07 -05:00
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