Re: [Evolution-hackers] Panel notification applet (bug #127516) C interface

Hi Plzik,

On Sun, 2004-08-22 at 12:35 +0200, Plzik Milan wrote:
A few days ago I started writig the email panel notification applet. I'd 
like to ask a few questions about the notification applet class interface. 
(there is a request in bugzilla that it would be nice to hook other things 
into it (comment #5) - f.x. for calendar notifications (#8)).
Well, we already have a mostly finished crack at this bug from Miguel Angel Lopez Hernandez.  We are really only waiting for 2.0 to get out the door before we can commit it, since 2.0 code is in feature freeze.  It just needs some minor changes to fit in with the plugin architecture.

So keep that in mind with the comments below.  With the plugin system its possible to have both running anyway; of course it would help if the plugin stuff was finished but unfortunately it is still work in progress.
UI changes:
I think there could be two configuration options added for actual 
	1) whether the applet is visible at all
	2) whether the applet is visible even if there is no new mail 
(small envelope icon is shown instead of big one).
If there is a new mail, the icon isn't blinking whole time - it blinks two 
times and then stops - icon of big envelope is shown. I think it's less 
annoying and it's more correct according to HIG.
You might also want it to do things differently for different folders, or even dump things to DBUS.
I use eggtrayicon for creating tray icons, so eggtrayicon.[ch] should be 
probably commited together with em-panel-applet.[ch] files.

The current class interface looks like this (except get_type:):
EMPanelApplet *em_panel_applet_new (void);
void em_panel_applet_no_new_mail(EMPanelApplet *applet);
void em_panel_applet_new_mail_arrived(EMPanelApplet *applet);
I'm not sure what your 'no new mail' call is for.  You really only care if you get new mail.  Or is the mailer supposed to let the applet know you've read mail now directly?

I would personally just do it like an event handler, e.g.
em_panel_applet_notify(applet, what)

where what is an enum of possible types.  This way if you need to add more notification types you don't need to add new functions or re-link, etc.

The event hook will let a plugin listen to events like 'new mail on folder x', and 'user has viewed message' (once its written), so you could combine those two events to say 'new mail arrived' and then clear the flag once the user starts reading their mail.
I have some ideas how to change this interface to be more 'hookable':
1, Add support for more status icons (that's the basic change:). 
	the interface should then change to something like:
	em_panel_applet_new(gboolean always_visible, GtkMenu *context_mnu, 
gchar *inactive_tooltip)
	em_panel_applet_notify(gchar *tooltip);
2, Bind events to the tray icons - put them into eventbox

I'd like to get some advices, if I'm doing something wrong, or if there 
are some feature-requests:).

BTW: I'm sorry for my English, I'm only learning it.

Michael Zucchi <notzed ximian com>
"born to die, live to work, it's all downhill from here"
Novell's Evolution and Free Software Developer

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