Commit Graph

335 Enmetoj

Author SHA1 Message Date
Jaidyn Ann 4f8aaf7957 Add 'error' slot for templates 2021-06-18 12:49:30 -05:00
Jaidyn Ann 077a01e8bf Print room 'join' and 'create' messages 2021-06-18 01:39:34 -05:00
Jaidyn Ann 48f84377fc Room-creation for XMPP 2021-06-18 01:30:59 -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 3fbe072d42 Generalize protocol settings' GUI templating
A nice templating system is used for account settings dialogues― the
required slots are specified by the protocol, and are reflected in the
settings dialogue.

To generalize this templating system (and eventually use elsewhere),
ProtocolSettings was split into two classes― ProtocolSettings and
ProtocolTemplate.

The CayaProtocol::SettingsTemplate() call was also edited to require a
string parameter, naming the specific template that should be returned.

"account" is used for the account settings dialogue, and other values
are TBA.
2021-06-17 17:02:29 -05:00
Jaidyn Ann 9eaeac24e6 Split icons into seperate RDEF files 2021-06-17 11:49:42 -05:00
Jaidyn Ann 560be5a810 Base for custom menubar items
Fixes #8
2021-06-16 05:03:30 -05:00
Jaidyn Ann d5aebac5c5 Custom chatlist pop-up items 2021-06-16 04:33:06 -05:00
Jaidyn Ann 8a9cb9effd Register commands & pop-up items through messages
Use IM_MESSAGEs, IM_REGISTER_COMMAND and IM_REGISTER_USER_ITEM, for
registering commands and user-list pop-up items.

The former replaces CayaProtocol::Commands(), which was a real bad idea
in the first place. Just awful. No idea why I did that instead of this,
which is nicer and significantly easier anyway.
2021-06-15 23:29:38 -05:00
Jaidyn Ann a03746c034 Make ChatCommands archivable 2021-06-15 22:03:11 -05:00
Jaidyn Ann 66b8150eeb Basis for custom userlist pop-up menu items 2021-06-15 21:05:21 -05:00
Jaidyn Ann 83e98bd5a8 Remove obselete CayaProtocol::SaveLogs(), add ::Commands()
With the new use of RoomFlags for signifying whether or not a room's
chat should be populated with local logs (ROOM_POPULATE_LOGS),
SaveLogs() is redundant.

A Commands() method was added to the CayaProtocol class returning a
CommandMap, which will be used by Caya when searching for commands.

KeyList::AddList() and List::AddList() were also added to libsupport,
for convenience.
2021-06-15 14:40:28 -05:00
Jaidyn Ann dd77f246f8 Per-protocol commands, precedence over default commands
Fixes #10
2021-06-15 00:59:00 -05:00
Jaidyn Ann 7d72b5152c Add '/help' command 2021-06-15 00:48:00 -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
Jaidyn Ann a4e2b1dc5a Log receive-dates of messages
Fixes #15
2021-06-14 16:41:25 -05:00
Jaidyn Ann 577cfd1ae0 Show timestamps in RunView, with custom values
This makes it so RunView's built-in timestamps are used― but requires
that a time_t be sent with each newly-appended line. This allows for lines to
be backdated or forward-dated.
2021-06-14 14:42:38 -05:00
Jaidyn Ann 6c43311982 Program-wide avatar cache
Add a program-wide avatar cache― whenever a contact or user's avatar has
changed, it gets cached in ~/config/settings/Caya/Cache/$account/People
(for contacts) or $account/Users (for everyone else).

ImageCache is now used, only for caching the kPersonIcon resource image―
it might be useful later for other commonly used images (status
indicators, etc).

Fixes #4
2021-06-13 17:34:30 -05:00
Jaidyn Ann b2489a5551 Cache roomflags, autojoin/autocreate based on them
Fixes #3
2021-06-13 02:35:16 -05:00
Jaidyn Ann 1124e3cf2b Update ConversationView name when notified, resize JoinWindow 2021-06-13 01:25:28 -05:00
Jaidyn Ann 7c9d1d9eaa Rework communication of room metadata, add room flags
In the API, a firm distinction between initially fetching a room's
metadata and receiving further changes has been made:
IM_ROOM_METADATA will be sent to Caya on request (IM_GET_ROOM_METADATA)
with the room's name, subject, etc. The other metadata-related messages
should only be sent to Caya after the room is initialized, not as a
means of initially setting its metadata.

Basic room flags were added, though they aren't yet used― they should
allow the protocol/add-on/user to configure some room features. Logging,
auto-joining, etc.
2021-06-13 01:16:30 -05:00
Jaidyn Ann 07350b3a0a Auto-join cached rooms on log-in
Rooms are now cached in ~/config/settings/Caya/Cache/$account/Rooms/,
with each file representing a seperate room. The filename is used as the
identifier, and these files now also serve as log files. The log
attribute name has also changed from "logs" to "Caya:logs".

When a protocol has succesfuly connected, all cached rooms are
automatically joined.
2021-06-12 21:42:10 -05:00
Jaidyn Ann 9cd4ce18e1 Disable some menu items when no account is active
When no accounts are active, all items in the Menubar->Chat menu are
disabled, and some other menu items related to starting/managing chats
are disabled in other views.

One new message was added to the API― IM_PROTOCOL_READY, which tells
Caya that a given protocol has logged in and is ready to receive
messages (rather than just sending).

This is currently done in XMPP after the roster is loaded, which be a
process that stalls the protocol for a few seconds. IM_PROTOCOL_READY
should only be sent after those initial, potentially time-heavy
operations.
2021-06-12 16:13:52 -05:00
Jaidyn Ann fe2f2ecad2 Slight redesign of add-on loading 2021-06-11 21:43:50 -05:00
Jaidyn Ann dcc5e443d3 Support temporary disabling of accounts
Accounts can now be temporarily disabled (in a Pidgin-like style)
through Preferences->Accounts. Work is still required to allow
enabling/re-enabling of accounts on-the-fly, and for keeping an
account's disabled state persistent.
2021-06-11 20:33:28 -05:00
Jaidyn Ann 552e937e51 Group rooms in roomlist by account
The ConversationListView is now an BOutlineListView, and rooms are
added as subitems to the item of their associated account. Right now,
account items aren't selectable or useful.
2021-06-11 17:24:04 -05:00
Jaidyn Ann 86f64cfa40 Ensure MUC nicks are respected 2021-06-10 16:44:35 -05:00
Jaidyn Ann 883d06c610 Remove custom draw method for AccountListItem 2021-06-10 16:28:39 -05:00
Jaidyn Ann 5b5840a79e Explicitly tie Conversations, Contacts, and Users to their ProtocolLoopers
Previously, all Conversations/Contacts/Users were stored in the Server,
each in their respective KeyMaps, identified solely by their
identifiers. This leads to the glaring problem of overlap― if the user
has multiple accounts, some users/rooms might be used or present in multiple
accounts at the same time.

Now, each accounts' Contacts, Conversations, and Users are stored in
its ProtocolLooper, making this overlap impossible. An oversight of only
allowing one user identifier to be stored (fMySelf) in Server was also fixed
this way.

This is the bulk of the work required for multi-account support― now,
the user can join the same XMPP room on two seperate accounts, and it
works perfectly.
2021-06-10 15:16:43 -05:00
Jaidyn Ann 7767995400 Use account-based rather than protocol-based cache paths 2021-06-09 11:40:27 -05:00
Jaidyn Ann 5723f55433 Support sending invitations
Fixes #5
2021-06-08 21:43:41 -05:00
Jaidyn Ann 5ecf254ada Move window files to application/windows 2021-06-08 20:42:20 -05:00
Jaidyn Ann 3827787d38 Jabber support for receiving invitations 2021-06-08 19:59:22 -05:00
Jaidyn Ann 37512144a1 Receive room invitations, allow user to accept or deny
A BAlert is used to inform the user of room invitations― InviteDialogue―
and to send their response directly to the protocol's looper.

Some new protocol messages were added (and older ones were moved around
to compenstate)― IM_ROOM_SEND_INVITE, IM_ROOM_INVITE_REFUSED,
IM_ROOM_INVITE_RECEIVED, IM_ROOM_INVITE_ACCEPT, and
IM_ROOM_INVITE_REFUSE.
2021-06-08 15:32:04 -05:00
Jaidyn Ann bc2c211458 Show user-color in <> angle-brackets 2021-06-08 13:04:56 -05:00
Jaidyn Ann 242d29c3a6 Custom rgb_colors for use with RunView
Allows custom colors to be dictated to RunView directly from
CayaRenderView. Some colors that were reliant on hard-coded theme
have been replaced with system colors.
2021-06-08 07:34:10 -05:00
Jaidyn Ann c8a62610ca Use IM_USER_*_TYPING instead of IM_CONTACT_*_TYPING 2021-06-07 13:19:58 -05:00
Jaidyn Ann 26e99477fc Document protocol API 2021-06-07 11:45:30 -05:00
Jaidyn Ann 503c196d4f Generate unique foreground for each user 2021-06-07 00:56:26 -05:00
Jaidyn Ann 77d914312c Show users' joins/parts in chat view
New API messages were added to distinguish between a user leaving of
their own volition and being kicked/banned.

Messages are now shown in the chat view when a user leaves or or
kicked/banned, etc.
2021-06-07 00:03:15 -05:00
Jaidyn Ann fde681bbf4 Update conversation name & window title
Allow updating a conversation's name through IM_ROOM_NAME, and change
the Caya window's title whenever a new chat is selected.
2021-06-06 18:06:46 -05:00
Jaidyn Ann 260b36012e Support moderation (muting, kicking, etc)
Allow kicking/banning/muting/unmuting/deafening and undeafening through
the UserListView right-click menu (if permissions are sufficient).

Support for banning, kicking, and muting were added to the XMPP add-on―
deafening isn't supported, so is left out.
2021-06-06 17:51:22 -05:00
Jaidyn Ann dc3fdd65c8 Store chatlogs in binary and text formats
If chat logs are stored in an endless plain-text file, they're going to be a
pain to parse. If they're stored in a binary file, they're a pain for
the user to `grep` or go through manually, but they're easier to parse.

Why not both?

Logs are now stored with a BMessage (with BStringLists) in the 'logs'
attribute, and the plain-text logs in the file itself.

The attribute will only store 20 messages, but the file itself will be
appended to forever.

The logs directory also changed, from ~/config/settings/Caya/Cache/Logs
to ~/config/settings/Caya/Logs.

Useful functions for reading/writing messages to and from an attribute were
borrowed from BePodder's libfunky. :-)
2021-06-06 12:02:26 -05:00
Jaidyn Ann fe99f3d83a Show moderation items in right-click user menu, by perm 2021-06-06 01:49:11 -05:00
Jaidyn Ann 6e1ca87890 Support for "Roles" (user, moderator, admin, etc.)
Add scaffodling support for arbitrary roles and permission-based (and
varying!) UI.

A new class, Role, represents a user's role in a given room, with three
values:
	* The role's title
	* The role's permission-set
	* The role's priority

The permission set is a bitmask value for various permissions (e.g.,
PERM_WRITE, PERM_BAN, etc), and priority is position in the hierarchy.
A user with higher priority (and PERM_BAN) can ban a user with lower
priority, but not vice-versa. Two users with the same priority can't
ban/kick/mute each other, etc.

These permissions should be used to determine what UI elements are
displayed― if the user doesn't have permission to ban users, then a
"Ban" button shouldn't exist. If the user is muted, they shouldn't be
able to type. So on and so forth.

For now, permissions are sent with a IM_ROLECHANGE message and stored
by the Conversation, but aren't really in use yet.

This system should be flexible groundwork to account for the varying
administrative hierarchies and norms of different protocols.
2021-06-06 00:59:07 -05:00
Jaidyn Ann effd010b46 Allow leaving/getting booted from rooms
Now the user can leave or be forced to leave a chat.
For this, two protocol API messages were added: IM_LEAVE_ROOM, and IM_ROOM_LEFT.

Aside from that, IM_ROOM_BAN_PARTICIPANT and IM_ROOM_KICK_PARTICIPANT
were added, though they aren't used yet.
2021-06-04 16:32:18 -05:00
Jaidyn Ann 89905fe23c Show/receive room subjects, show protocol icon in conversation view
The conversation view now displays the protocol icon and room subject.
Messages for receiving room names (IM_ROOM_NAME) and subjects
(IM_ROOM_SUBJECT) were added, and support for the latter was given to
the XMPP add-on.

New message APIs were added, and several (room-related) im_what values were
moved into the 150s/160s.

UserItem::_TintColor() was moved to CayaUtils, because it can be used in
several different contexts.
2021-06-04 13:57:04 -05:00
Jaidyn Ann e00164c1aa Recolor user's item when status changes 2021-06-03 23:41:23 -05:00
Jaidyn Ann dd298281e2 Changes to Notifier→Observer relations
The new Notifier→Observer relation chain:
	* Conversation → ConversationItem, ConversationView
	* User → UserListItem, UserInfoWindow, UserPopUp
	* Contact → RosterItem

These line up pretty intuitively― if something changes in the conversation, you
want the list item and view to change too.

But there's one more here that's less intuitive:
	* User → Conversation

If Conversation observes something from a user (i.e., status change), it
immediately knows to do one thing only: invalidate the user list, because
something's changed.
2021-06-03 23:39:50 -05:00
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 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 3f62492b9c Change default window size 2021-06-01 22:12:01 -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 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 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
barrett 730e9d3d49 Added a simple WIP ContactInfoWindow that will be improved while we add new informations available in the ContactLiker, actually it's useful to get the contact id/email. 2012-03-11 15:11:29 +00:00
barrett b80c9b2b11 Modified the preferences to select if the chat window should be auto raised when a message is received or when a user is typing, or both. This fix the issue #555. 2012-03-09 00:35:02 +00:00
barrett 8516381043 Enabled notifications using the BNotification API, including enable/disable settings. The plugins that support it are XMPP and MSN. Added another tab in the preferences window named Replicant and moved the replicant settings here. 2012-03-08 22:55:13 +00:00
barrett 2f417339f4 Added the code to lock the window looper before to update the avatar. 2012-03-08 01:17:32 +00:00
barrett 3f2f2783ff The personal message of a contact is now show in the chat window, added also the needed code in Server.cpp to update the windows. Solved a bug with the contact avatar that was causing Caya to crash. 2012-03-08 00:47:00 +00:00
barrett c22310f510 Modified ContactLinker : moved some inline methods from class declaration, added Get* methods for contact status and status message. Added code in the ChatWindow to show the current avatar of the user. Modified the Server to allow a plugin set the status message when sending a IM_CONTACT_INFO notification to the server, as before it's already possible to do it using a IM_STATUS_SET message. 2012-03-07 19:22:09 +00:00
barrett 8d04f539c2 Added code that allow the deskbar replicant to be disabled/enabled from the preferences 2012-03-04 02:27:16 +00:00
barrett cf7646fb00 Modified preferences dialog, better look for Replicant settings, added a new tab for Chat Window settings 2012-03-02 02:23:21 +00:00
barrett f51f924b89 Fixed replicant issue, it's working as well, but only under a gcc4 Haiku atm. Modified disposition of the main gui widgets, now they are placed better. 2012-02-28 00:46:15 +00:00
barrett 9c43174dce AIM : Removed _declspec and removed a unuseful parameter, both were causing warnings. Replaced List<> a std::list wrapper, with BObjectList and removed the _TR macro in ProtocolSettings that is apparently not doing anything. 2012-02-25 20:33:28 +00:00
barrett 68e42252d6 Fixed a little build issue and a warning 2012-02-25 02:46:55 +00:00
barrett 4aff3e3422 Added a new deskbar replicant with related classes and icons, disabled libdownload and curl depencency, fixed some warnings and style violations around the code 2011-12-14 23:36:27 +00:00
plfiorini 98dd89fb55 Update copyright year. 2011-12-03 22:38:03 +00:00
plfiorini 2fabcc4fe8 Updated copyright notice. 2011-02-14 22:44:57 +00:00
plfiorini c0a63c8f26 Layout API changes. Tested on Haiku r39074, I really don't know what is the first revision with this changes. 2010-10-24 06:27:09 +00:00
plfiorini f8304f0c27 Added IM_CONTACT_GONE message, for contacts leaving the chat. 2010-10-24 06:26:01 +00:00
plfiorini 6ef31b44f1 Check protocol add-ons API version 2010-07-10 19:28:29 +00:00
plfiorini 082f2ad34e Added libdownload from xeD. 2010-07-10 13:37:58 +00:00
plfiorini 30470d4816 Exclude information notifications. 2010-07-03 08:40:04 +00:00
plfiorini fada1ba067 * Changes to notification code for my not yet merged Haiku patch (BNotification API changes).
* Exclude notification code for the moment, until the patch is merged.
2010-07-03 07:55:23 +00:00
plfiorini afe167b86b Bitmap as const argument. 2010-06-22 19:02:42 +00:00
plfiorini 1cd3ad8d26 Ops forgot one typo. 2010-05-30 22:02:50 +00:00
plfiorini ea78353c09 I'd rather prefer "Contact is typing..." than "Buddy is typing...". 2010-05-30 22:00:40 +00:00
plfiorini b172d6fb20 Fix typo, it's Incoming not Incomming. 2010-05-30 22:00:09 +00:00
plfiorini 183a682585 Handles detailed IM_ERROR messages. 2010-05-30 20:50:26 +00:00
plfiorini 5ddeef6e7b * Handle IM_NOTIFICATION.
* Shows notifications when contacts go online or offline. Unfortunately XMPP plugins will send presence notifications when the roster is populate so presence notification is shown for every online contact when the roster list view is populated the first time.
2010-05-30 18:56:24 +00:00
plfiorini d503077fac Implemented IM_PROGRESS, closes #479. 2010-05-30 12:17:32 +00:00
plfiorini f560943e6f Handle IM_OWN_AVATAR_SET.
There's only one little problem that will probably be solved after Alpha1: if you have multiple accounts, all of them will set the avatar icon and the user will see just the last icon set.
2010-05-30 08:51:19 +00:00
plfiorini 95657d52ba * More NULL checks for ContactLinkers.
* When you edit an account in the preferences dialog, this is not readded to the list anymore and so its login is not triggered another time.
2010-05-30 04:28:04 +00:00
urnenfeld 17fdd9b0ca Align Status in chat window
Clean the status when a message is received
2010-05-28 23:05:57 +00:00
urnenfeld 3a8af7c9f9 Forwarding messages to ChatWindow
Added stringview as status feedback
2010-05-28 22:38:16 +00:00
plfiorini ff80897441 Set name only if it's a non-empty string and handle IM_EXTENDED_CONTACT_INFO in order to use full name if the contact still don't have a name. 2010-05-28 21:31:53 +00:00
plfiorini 0fb4c94b82 Default avatar icon must be notified to observer. 2010-05-28 17:21:48 +00:00
plfiorini 12852eb377 Fix crash when msn plugin is not installed.
When the protocol looper is set we get its CayaProtocolAddOn and retrieve the protocol add-on's icon that is used as the default icon for the contact.
2010-05-28 17:20:02 +00:00
plfiorini af48b464ef Hide implementation details. 2010-05-28 17:11:16 +00:00
plfiorini d03a6fb884 Install headers for external protocols. 2010-05-28 01:08:18 +00:00
barrett a43602fb37 added basic functions to the plugin, contact list, chatting, nudges. 2010-05-25 03:19:09 +00:00
urnenfeld f45da3af40 Store preferences in a File 2010-05-22 14:18:11 +00:00
urnenfeld 8e956baea7 Remove ignored typedef warning for GCC4 2010-05-22 14:17:02 +00:00
plfiorini 88c5eedc9b Some style violations fixed. 2010-05-20 21:31:55 +00:00
plfiorini 4edae0a786 Caya icon! 2010-05-20 19:15:43 +00:00
urnenfeld 52b169b0ba Implement 'Ignore Emoticons' feature in preferences 2010-05-20 18:37:01 +00:00
plfiorini b314c7abd8 * Rewrote BitmapView's MinSize(), MaxSize() and PreferredSize() methods.
* Added BitmapView::Bitmap() method.
* BitmapView::SetBitmap() now doesn't resize the view anymore.
* BitmapView has now a minimum size of 32x32.
* Draw bitmap on BitmapView using B_FILTER_BITMAP_BILINEAR.
* StatusView sets now explicit max and preferred size to 50x50 for the avatar icon view and doesn't resize the bitmap explicitely.
* Small style violation fixes.
2010-05-20 18:11:32 +00:00
plfiorini 4412809657 Fix some style violations. 2010-05-19 22:28:26 +00:00
urnenfeld c67f1936c0 * Use all area provided in the window 2010-05-19 22:06:25 +00:00
plfiorini cc898075d2 Fixed what mankind will remember as the 'Massive Breakage due to "blind svn merge"'. 2010-05-19 21:36:36 +00:00
plfiorini 2ee14f4c14 * Some style violation fixes.
* Code aligned to recent multiprotocol branch changes.
* Fixed crash when Server filters IM_STATUS_SET messages and ContactLinker is NULL.
2010-05-19 20:37:26 +00:00
urnenfeld 533117dc61 * Fix GCC4 build 2010-05-19 18:49:41 +00:00
urnenfeld 818c28d43d * Add Behavior tab in Preferences with options in ticket #476
* Implement enabled ones
* Add canditate preferences
* Implement singleton-like preferences class CayaPreferences. These are working but they are not stored in file at closing
2010-05-19 18:05:30 +00:00
plfiorini 8d1c0d1a9d Merging r148, r154, r155 with trunk. 2010-05-19 17:11:22 +00:00
plfiorini 97ae80798d Fixed build with gcc2. 2010-05-16 21:19:35 +00:00
plfiorini 4bdc37a60e Merged multiprotocol branch with trunk. 2010-05-16 21:02:50 +00:00
plfiorini 8d6d06dbfe Adding AIM protocol from Alexander Botero-Lowry, but it needs polishing. 2010-05-12 20:42:46 +00:00
plfiorini 7d4a7d1c24 Use status icons instead of simple circles. 2010-05-12 18:59:17 +00:00
plfiorini 2f6f458fe0 About dialog. 2010-05-12 18:57:19 +00:00
plfiorini 8d7033efbb Adding more menus... 2010-05-12 18:15:21 +00:00
plfiorini b1ddb3c032 Use B_FILTER_BITMAP_BILINEAR. 2010-05-10 22:42:54 +00:00
plfiorini dd8d0d1f5a Gcc4 build fixes. 2010-05-10 21:54:28 +00:00
plfiorini affca15f8b Added utility functions to get account paths. 2010-05-09 09:38:30 +00:00
plfiorini 3127e2b049 Renamed caya.rdef to Caya.rdef. 2010-05-09 08:25:28 +00:00
plfiorini 2e8cd94f8c * Now using a grid layout.
* Implemented the "wrench" menu (it needs an icon).
2010-05-09 08:23:53 +00:00
plfiorini bcc5118ba4 Added AccountDialog and AccountView, previously the code was in PreferencesAccounts.cpp. 2010-05-09 06:27:48 +00:00
plfiorini 454762c7eb Preferences dialog is progressing... 2010-05-08 19:35:28 +00:00
plfiorini 4b01bd22bb Moved RescaleBitmap() utility function to BitmapUtils.{cpp,h}. 2010-05-08 16:21:36 +00:00
plfiorini b1388d17e8 * Moved KeyMap.h to libsupport.
* Added missing Singleton.cpp.
* Fixed List.
2010-05-08 00:23:36 +00:00
plfiorini 0bf4b59922 Usual SVN tree (branches, tags, trunk). 2010-05-07 09:47:10 +00:00