Commit Graph

316 Enmetoj

Author SHA1 Message Date
Jaidyn Ann 71ae10dfc1 Change timestamp color 2021-08-19 17:31:43 -05:00
Jaidyn Ann cad278205c Fix contact-editing 2021-08-19 17:25:18 -05:00
Jaidyn Ann dd086dd455 Split AppConstants.h into UserStatus.h 2021-08-19 17:04:33 -05:00
Jaidyn Ann 8f159b7e8b Rename Cardie to Chat-O-Matic 2021-08-19 02:29:14 -05:00
Jaidyn Ann da8b0236c5 Add workspace-switching and window-raising options 2021-08-19 02:00:11 -05:00
Jaidyn Ann 38e9fca3be Prioritize native protocols in protocol list 2021-08-19 01:18:17 -05:00
Jaidyn Ann d8d89d245e Toggling of room flags through right-click menu
Room flags (e.g., whether or not to auto-join, whether notifications
should be sent on message receive) can now be toggled through a room's
right-click menu in the room-list.

Two new room flags were added for notifications as well― ROOM_NOTIFY_DM
and ROOM_NOTIFY_ALL. If ROOM_NOTIFY_DM is enabled, the user will receive
notifications if they are in a one-on-one chat. If ROOM_NOTIFY_ALL, they
will receive notifications on every message sent to the room.

The default menu items for the room's pop-up menu were moved from
Templates.rdef to be built into the app.

Everything else in Templates.rdef should follow suit― B_TRANSLATE
can't be used in rdef files!
2021-08-19 00:59:03 -05:00
Jaidyn Ann f486588c48 Add system beeps for message/mention receiving 2021-08-18 20:19:11 -05:00
Jaidyn Ann 901f7a8e05 Disable unusable settings, Notfications tab 2021-08-18 18:28:53 -05:00
Jaidyn Ann 6e89dbdab1 Better protocol status notifications
Now a notification is sent as soon as a protocol has been readied
(before connection established), and all status notifications use the
same message ID to avoid spamming the poor user.
2021-08-18 17:22:08 -05:00
Jaidyn Ann b2e17f57dc Fix avatar-loading 2021-08-18 17:00:11 -05:00
Jaidyn Ann f1464cb01c Search by user name and ID for chat commands 2021-08-18 15:15:56 -05:00
Jaidyn Ann 5e0782b553 Ensure implicit room-members are real
If a message/event is sent to a room that's tied to a user that hasn't
been formally declared (through IM_ROOM_PARTICIPANTS or
IM_ROOM_PARTICIPANT_JOINED), that user won't be unconditionally kept
anymore.

Now, after adding an implicit user, the participant list will be
requested again― upon receiving the list, all implicitly-defined users
will be removed. If they really existed to begin with, they should be
re-added quickly through this re-sending of IM_ROOM_PARTICIPANTS.

Ghosts should be treated as ghosts, not users.
2021-08-18 14:18:24 -05:00
Jaidyn Ann 2645a58955 ScrollView for roomlist, NO_BORDER for user scroll 2021-08-18 11:58:18 -05:00
Jaidyn Ann b8de54d9bc Single Append() for sections with unchanged format
Also removes the newly-unused AppendMessage() of RenderView
2021-08-17 22:19:28 -05:00
Jaidyn Ann 8512e9ad03 New binary log format, with color/face support
Binary logs are no longer stored as a single message with a list of
strings and int64s ("body", "user_name", "user_id", "when"), but a
message with sub-messages (IM_MESSAGE_RECEIVED) verbatim saved.

This has the main benefit of preserving message formatting (coloring,
bold, italics, etc).
2021-08-17 13:27:14 -05:00
Jaidyn Ann ab4881f2f0 Receiving multi-color messages
Chat messages can now be formatted with colors in addition to varying
faces with "color_start," "color_length," and "color" slots in
IM_MESSAGE_RECEIVED.
2021-08-16 21:50:43 -05:00
Jaidyn Ann 8aa608e841 Formatted welcome message, prefer 'user_name' 2021-08-16 15:10:18 -05:00
Jaidyn Ann c0580dfc17 Save disabling of accounts, make persistent
If the user disables an account, this saves it so that on any
subsequent start-ups, the account won't be connected until the user
explicitly re-enables it.

ProtocolSettings were reworked to allow for publicly loading/saving
settings from BMessages, rather than solely from BViews.

In addition, all program-side disabling, enabling, and toggling of
accounts has been consolidated into ProtocolManager. This makes life
easier for other parts of the program that have to do these things
anyway.
2021-08-16 11:58:27 -05:00
Jaidyn Ann c492a46a65 Rename AccountManager to StatusManager 2021-08-16 10:40:18 -05:00
Jaidyn Ann b380b6115c Fix chat creation with non-contact users 2021-08-15 20:34:30 -05:00
Jaidyn Ann 4da76e0256 Show 'Accounts' window when starting with no accounts 2021-08-15 15:45:53 -05:00
Jaidyn Ann 794d368c11 Make some dialogues floating windows 2021-08-15 15:45:28 -05:00
Jaidyn Ann ed7fe730cb Load protocols from any system add-on directory
… rather than soley "$APPDIR/protocols/".
The vague "protocols/" leaf was also renamed to "cardie/".
2021-08-15 00:55:16 -05:00
Jaidyn Ann ab6988d9ba Ensure selection & add account buffer to chat list
Ensures that an item in the chat list is always selected (as long as
there are items to be selected), and that an account's "buffer" (fake
conversation) is added immediately after connection, and removed
immediately after disconnection.
2021-08-14 23:37:59 -05:00
Jaidyn Ann 10bb155b94 Fix off-zero auto-completion 2021-08-14 22:10:39 -05:00
Jaidyn Ann 5b4d8c9413 Disallow right-clicking on ConversationAccountItems 2021-08-14 21:25:46 -05:00
Jaidyn Ann e6f9c3e085 Notification and buffer message on disconnect/reconnect 2021-08-14 11:57:42 -05:00
Jaidyn Ann 29a94bcf65 Recieving of formatted messages (by font-face)
Now addons can format messages with new slots accepted by
IM_MESSAGE_RECEIVED: "face_start," "face_length," and "face".

The first two deal with the position of the face-change by character
offset in the string, and the last being the face flag affected.
2021-08-13 12:39:47 -05:00
Jaidyn Ann 057e7fba9b Add "system buffer" per protocol
Now, per each account, there is a read-only chat view associated with
it, accessible through its item in the conversations list. This can be
used to place system messages, MOTDs, insignificant errors, etc.

Protocols can send text to this buffer by specifying no "chat_id" in
an IM_MESSAGE_RECEIVED message.
2021-08-12 15:43:52 -05:00
Jaidyn Ann 409eaede86 Store users' names in binary chat logs 2021-08-11 20:22:42 -05:00
Jaidyn Ann fed3b9d9f0 Display message in chat on subject change 2021-08-11 19:46:33 -05:00
Jaidyn Ann f5ba403e55 Improve auto-complete performance, include nicks
Previously, user auto-completion would only use the user IDs- now user
names are completed for also.
2021-08-11 12:07:11 -05:00
Jaidyn Ann 12215266d0 Display message in chat when user changes nick 2021-08-10 18:03:37 -05:00
Jaidyn Ann 40eaac550f Don't archive non-existant protocol icons 2021-08-09 22:10:07 -05:00
Jaidyn Ann 9267c740a4 Sensible defaults for unnecessary ChatProtocol methods 2021-08-09 10:48:45 -05:00
Jaidyn Ann 373dcb4a58 Protocol message tweaks, bump API version
Some chat protocol messages' names have been changed to more fitting or
consistent names― e.g., "IM_AVATAR_SET" to "IM_USER_AVATAR_SET", or
"IM_CONTACT_LIST_*" to "IM_ROSTER_*" (to agree with Cardie's usage of
the word).

The API version has been bumped― for the forseeable future (at least
several months, I promise!) no compatibility-breaking changes will be
introduced. Until then, any new feautures or message slots will be
additive and optional.
2021-08-08 21:01:42 -05:00
Jaidyn Ann 4bd821eee5 Account-toggling through Accounts menu 2021-08-07 17:37:16 -05:00
Jaidyn Ann abb4d44684 Populate 'Accounts' menu with account submenus 2021-08-06 14:14:14 -05:00
Jaidyn Ann 2e746a975a Split account preferences into dedicated window
Found in the new "Accounts" menubar option.
2021-08-06 12:21:17 -05:00
Jaidyn Ann a9022755ca Make TemplateWindow use instance rather than index 2021-08-06 11:10:10 -05:00
Jaidyn Ann 39e4fc9ac7 Make AccountsMenu use instance rather than index 2021-08-06 11:04:00 -05:00
Jaidyn Ann 3861fa718d Remove unused APP_*_CHAT_WINDOW messages 2021-08-05 21:05:59 -05:00
Jaidyn Ann e8e1ce0b05 Error notification if applying protocol settings fails 2021-08-05 20:43:08 -05:00
Jaidyn Ann a49e957b16 Re-enabling of accounts after disable
Accounts can now be toggled on-and-off freely.
Fixes #42
2021-08-05 19:31:26 -05:00
Jaidyn Ann f0ce3e87c6 Support generally setting own nick, own UserItems
Seperate UserItems are now created for each list, too, rather than a
single one being created per-user. This functionally works a lot nicer.

But onto more important things… now setting the user's own nick should
work quite well. Finally. =w=

This has given me a good bit of trouble over the past couple of days―
setting the user's nick *worked*, but it wouldn't propagate to its
corresponding UserItem nor its UserInfoDialog. It would, however, work
with the StatusView.

These are all registered Observers of the User itself, so if one works,
they *all* should, them all being registered to the same User.

Now, if a given User isn't found in the ProtocolLooper's user-list,
the Conversation class will take it upon itself to create a new
one and add it to both of their respective lists.

So the user's own contact would be set in the ProtocolLooper― but it
*wouldn't* be added to the user-list.

Hilarity ensues as two seperate objects for the user's own contact would
be created.

Since the StatusView is registered to the ProtocolLooper's "real" own contact
slot, it would receive all updates… but since Conversations' user-lists and
items would be registered to the Conversation-created "fake" user, they
would be borked.

Simple oversight, but wow it hecked with me. :P
2021-08-05 14:28:56 -05:00
Jaidyn Ann c7593fa7dd Make User/ConversationInfoWindow Observers
Now they will observe changes in their corresponding object (if the
room's name changes, so will the label in the ConversationInfoWindow,
etc).
2021-08-04 13:51:31 -05:00
Jaidyn Ann 7c2362a851 Add 'Room info' dialogue
Fixes #55
2021-08-04 12:44:20 -05:00
Jaidyn Ann db70ce4f57 Tweak Master Foo dialog 2021-08-03 16:33:18 -05:00
Jaidyn Ann f439ca9aa6 Document IM_SET_OWN_NICKNAME, bold nick 2021-08-03 16:05:57 -05:00