Commit Graph

122 Enmetoj

Author SHA1 Message Date
Jaidyn Ann 984f066070 Multi-account StatusView; set info per-account
Now the StatusView (bottom-left corner, right below the room list) can
be used to set the nickname and status not only for all accounts at
once, but for managing the status/nick of individual accounts.

AccountManager now can set details of a single account, too.

MainWindow is no longer an Observer (as it just passed the information
along to StatusView― now StatusView manages that itself).

NicknameTextControl was removed, not being in use.
2021-08-03 13:24:36 -05:00
Jaidyn Ann 47ca0f4169 Make all AccountsMenu items BitmapMenuItems
Now all account menus will have the pretty protocol icons to go with
them. :)

The icons are scaled to text-size so that they might be displayed in a
corresponding MenuButton, or maybe BMenuField at some point, and put
into the ImageCache.

The menu items do not have ownership of the bitmaps.
2021-08-03 10:29:19 -05:00
Jaidyn Ann 6d8be225ca Scaffolding of a multi-account StatusView
StatusView now allows the selecting of accounts through a MenuButton
with BitmapMenuItems― the button for selecting an account is nice and
discrete, just showing the bitmap of a protocol (in leiu of a label).
No functional changes, other than this menu.

I tried making all AccountsMenus use BitmapMenuItems, but that gets
unweildy pretty quickly― for now they remain in this menu. Maybe
optional ownership of bitmaps in BitmapMenuItems and caching of protocol
items would help.
2021-08-02 21:59:44 -05:00
Jaidyn Ann 9f05ce1136 Misc. tweaks, no functional change 2021-08-01 06:37:25 -05:00
Jaidyn Ann 803a2f20bd /me now formats /me properly
/me waves arms in the air like a maniac
/me knocks over a nearby cup of coffee
/me gasps when the coffee spills onto the adjacent laptop
/me cries out “Fore! Wait, four! Wait, fire!” when the laptop bursts
into flames
/me burns to a crisp
2021-07-31 20:39:21 -05:00
Jaidyn Ann 82f920798f Auto-completion for commands 2021-07-31 20:18:36 -05:00
Jaidyn Ann 2e3742d4e1 Chat history in send textbox
History of sent messages is now saved― if the user presses the up or
down arrows, history will be traversed in the textbox.
2021-07-31 18:50:04 -05:00
Jaidyn Ann 51dc12236c Save weights of the chat view's SplitViews 2021-07-31 11:15:51 -05:00
Jaidyn Ann ebc9d4041f Remove unused NotifyingTextView class 2021-07-29 22:47:30 -05:00
Jaidyn Ann 89ff195c8d Set room topic/name through conversation view
If the user has permission to change a room's subject or name, they can
now edit the text views displaying them (toward the top of the window).
When enter is pressed, the changes will be sent to the protocol.

To do this, a BTextView subclass was added to libinterface
(splitting somewhat from SendTextView)― EnterTextView sends a message
containing the text to the given target when the user hits enter sans
modifiers.
2021-07-29 22:00:01 -05:00
Jaidyn Ann 909a68e595 Keep room subject to one line, bold room title 2021-07-29 19:39:22 -05:00
Jaidyn Ann 924f628c75 Add 'Create Account' message for first-time start-up 2021-07-28 22:18:00 -05:00
Jaidyn Ann f038c492f7 Refactor preference saving/loading 2021-07-28 19:10:09 -05:00
Jaidyn Ann 37453ba2af Allow selection of non-contacts in roster windows
Windows using RosterView (like for the invitiation/new chat dialogues)
have a search-box for filtering between contacts. This allows the user
to type a user ID into this search-box that isn't a contact's ID, which
can then be selected as the user.

This makes common operations (inviting a user/adding a new contact)
a little easier.
2021-07-28 16:53:59 -05:00
Jaidyn Ann e33dd92375 Save account selection in account menus 2021-07-28 10:13:31 -05:00
Jaidyn Ann 758bbb072a (libinterface) Add 'square' scaling option to BitmapView
When toggled, this option disallows the scaled-to view rect being
uneven.
2021-07-27 20:48:03 -05:00
Jaidyn Ann bea52c14be Roster list tweaks, auto-deselect 2021-07-25 17:27:04 -05:00
Jaidyn Ann bba3d3d866 Sort conversation and user lists 2021-07-25 14:42:38 -05:00
Jaidyn Ann 5966df1a34 Print a 'date divider' when the day changes
I.E., if one message is sent on 2021-05-02 and the next on 2021-05-03, a
divider displaying the new date is printed before the second message.
2021-07-25 11:28:07 -05:00
Jaidyn Ann fff36dff6f Add 'when' to queued messages 2021-07-25 10:15:21 -05:00
Jaidyn Ann 987dc252d5 Translate more strings, update catkeys 2021-07-24 21:11:34 -05:00
Jaidyn Ann dfa92a8d9e Roster-windows scaling, truncate account names
In the AccountsMenu, item labels are now truncated to ~15 characters,
appending an ellipsis if the string is longer.
2021-07-24 15:45:20 -05:00
Jaidyn Ann 43a7e7111d Auto-focus send textbox 2021-07-23 23:58:09 -05:00
Jaidyn Ann 0ffe3e5ce8 Replace CreateAccountMenu() with dedicated class
CreateAccountMenu() is used to populate a BMenu with items corresponding
to the map of accounts provided to it― but when an account is disabled
or enabled, it can't update automatically.

A dedicated class, fAccountsMenu, now replaces it― it'll automatically
repopulate the list whenever the active accounts update.
2021-07-21 12:14:25 -05:00
Jaidyn Ann 9245dc7135 Auto-scroll ConversationView, fix RunView append 2021-07-21 12:10:20 -05:00
Jaidyn Ann 82c06bba25 Localization, init catkeys 2021-07-19 09:54:27 -05:00
Jaidyn Ann 6f73db12b7 Highlight room list-items, auto-scroll in chat
When a new message is posted (or the user is messaged), the room's item
in the roomlist is now highlighted, like Vision.

Chat also auto-scrolls when new messages are posted.
2021-07-17 00:23:56 -05:00
Jaidyn Ann fe4d0661a7 Move notifications from ConversationView to Conversation itself 2021-07-16 16:28:58 -05:00
Jaidyn Ann e1ec602be8 Message/mention notifications
If the user's in a one-on-one chat, notify on every message― otherwise,
only notify when the user's name/ID is mentioned by another user.

Notifications should be managed by roomflags, but that's for another
time.
2021-07-15 18:01:58 -05:00
Jaidyn Ann e760818007 (librunview) Init new RenderView/RunView
Base-level replacement of the Vision-derived text RunView― a couple
important features supported by the replacee haven't been implemented yet,
including:
	* Right-click menu
	* URL-highlighting/selection
	* Emote support
2021-07-14 15:12:04 -05:00
Jaidyn Ann 7f30571703 Fix SmileTextRender crash
Fixes #22
2021-07-13 17:11:49 -05:00
Jaidyn Ann 5ec79ebbf5 Fix status view's avatar icon
The StatusView (below the roomlist) now shows a default icon if no
accounts have associated avatars, and will use an account's cached avatar
if available.
2021-07-13 14:43:48 -05:00
Jaidyn Ann f4df6d0d3b Typing auto-complete for usernames 2021-07-09 11:52:57 -05:00
Jaidyn Ann 8a3f22d5e9 Move sendbox to conversation view, replace filter
The BTextBox used for sending messages has been moved from the main
window to individual ConversationViews, allowing seperate histories,
texts, etc., to exist in different conversations.

EditingFilter (a filter that hooked into MainWindow) was previously used
to field special key combos with this textbox, including "ENTER" for
sending, but this has been replaced with a new textview subclass
(SendTextView).
2021-07-08 16:07:03 -05:00
Jaidyn Ann 52a580e03d Remove own user from contacts; fix roster bitmaps
It doesn't make sense to lump the user themself with their contacts
list― their Contact object is now stored seperately.

BBitmap loading for RosterItems are fixed, as well.

Fixes #33
2021-07-06 14:46:28 -05:00
Jaidyn Ann 1515ab0d00 Tweak permissions handling in UserListView 2021-07-06 13:47:37 -05:00
Jaidyn Ann 7db93bf596 Fix roster crash w/o protocol icon 2021-07-02 13:47:01 -05:00
Jaidyn Ann f6a006dddc librunview/libsupport x86_gcc2 fixes 2021-06-30 14:25:58 -05:00
Jaidyn Ann de09ff9ad6 Rename Caya to Cardie 2021-06-22 01:06:00 -05:00
Jaidyn Ann 4ee453d0d6 Update room subject; accept user_name in OWN_CONTACT_INFO 2021-06-21 02:32:49 -05:00
Jaidyn Ann fbe6e66743 Change class names 2021-06-20 12:44:20 -05:00
Jaidyn Ann b1920dad47 Move command/menu-item registration to call
Registration of custom chat commands and menu-items for protocols was
done by the IM_REGISTER_* messages, and is now done through direct calls
to the CayaProtocol object.

The new model for call/message for protocols is this: Temporary
information (chat messages, roster members, etc.) should be accessed
through messages. Relatively static data (protocol name, commands)
should be accessed through direct calls to the protocol object.
2021-06-20 01:24:34 -05:00
Jaidyn Ann d4f82dccc6 Removal of roster members
Now roster members can be deleted through the RosterEditWindow.

IM_CONTACT_LIST_REMOVED_CONTACT was renamed to
IM_CONTACT_LIST_CONTACT_REMOVED to fit style of other API messages.

Fixes #1.
2021-06-20 01:22:59 -05:00
Jaidyn Ann 9d72c53dd9 Split RosterWindow into per-account RosterView
Most of RosterWindow's special functions have been split into a special
BGroupView (including both the roster search-box and roster list),
RosterView.

This will give some more flexibility in other uses of the roster list.

In addition, RosterViews can be tied to a specific account by its
looper's instance ID, allowing it to either show all contacts (globally;
if the ID is set to -1) or only those of the specified account.

This can be useful, for example, when inviting contacts to a room―
you can only invite contacts that use the same protocol, and are
associated with your account, so showing all contacts doesn't make
sense.

The SearchBarTextControl class was removed, as it isn't particularly
necessary.
2021-06-18 16:41:09 -05:00
Jaidyn Ann 84eb2d68ba Slight template window tweaks 2021-06-18 14:18:45 -05:00
Jaidyn Ann 077a01e8bf Print room 'join' and 'create' messages 2021-06-18 01:39:34 -05:00
Jaidyn Ann 7c002d8fcc Room creation window; Catch-all template window
Explicit room-creation using protocol's own "room" template is now
supported.

Two new protocol API messages were added― IM_CREATE_ROOM and
IM_ROOM_CREATED, which are parallels to IM_CREATE_CHAT and
IM_CHAT_CREATED. Rather than the latter two, though, these are wholy
based on the "room" template― their slots are completely determined by
the protocol.

A generic "TemplateWindow" was created, which allows catch-all creation
of windows that leverage protocols' templates. It's used for the
room-creation window (Chat->New Room / Alt+N), for example.

At some point, it ideally should replace even the JoinRoom window, and
maybe others.
2021-06-18 01:13:02 -05:00
Jaidyn Ann d5aebac5c5 Custom chatlist pop-up items 2021-06-16 04:33:06 -05:00
Jaidyn Ann 66b8150eeb Basis for custom userlist pop-up menu items 2021-06-15 21:05:21 -05:00
Jaidyn Ann 46d6d0a0b0 Basic command storage and parsing
A new class was added (ChatCommand) to represent commands, which are
all stored in the Server iself.

A command can be assigned any arbitrary BMessage, and can be given
arguments with some semantic meaning (so far just "string" or "room
participant," etc).

"invite" and moderation commands were added (ban/kick/mute etc).
2021-06-15 00:22:35 -05:00