Re: Libnotify support



On 07/17/05 07:15:16, Johan Brannlund wrote:
[snip]
Hopefully I can fix that - among other things I'd have to learn
something about the autotools, since I suppose a proper configure
check should be implemented. I also have a question:

I'd like to display the Subject and From headers in the notification.
Do you have a suggestion for the easiest way of getting those? From a
cursory look, it seems like I'd have to search the msg_tree in
check_new_messages_count(). Or would it be more easily done in
update_mailbox_idle() ?

check_new_messages_count() might be a better place since it already figures out whether there are new messages. You should be aware of a difference between cases when balsa knows that there *may* be new messages (discovered by a quick check on closed mailboxes) and knows precisely the number of new messages arriving to open mailboxes. There may be also several messages arriving at once, and not all of them may be unseen (check_new_messages_count() will be called when messages are copied by the user, that's why there is notify parameter). Regarding getting Subject and from, using libbalsa_mailbox_get_message() is probably simplest.

Did you think of providing "system tray" support as well? It is probably slighly less intrusive than libnotify and has no external dependencies. gaim contains an example code in eggtrayicon.c

Pawel




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]