After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 351421 - Deprecate EggTrayIcon in favour of GtkStatusIcon
Deprecate EggTrayIcon in favour of GtkStatusIcon
Status: RESOLVED FIXED
Product: gossip
Classification: Deprecated
Component: General
unspecified
Other Linux
: Normal enhancement
: ---
Assigned To: Gossip Maintainers
Gossip Maintainers
: 349296 355016 (view as bug list)
Depends on:
Blocks: 349256
 
 
Reported: 2006-08-15 10:50 UTC by Xavier Claessens
Modified: 2006-09-22 09:27 UTC
See Also:
GNOME target: ---
GNOME version: Unversioned Enhancement


Attachments
first patch (20.76 KB, patch)
2006-08-15 14:13 UTC, Xavier Claessens
needs-work Details | Review
updated patch (23.90 KB, patch)
2006-08-15 17:15 UTC, Xavier Claessens
none Details | Review
Use gtk_status_icon_position_menu (23.95 KB, patch)
2006-08-16 18:07 UTC, Xavier Claessens
needs-work Details | Review
updated patch (26.19 KB, patch)
2006-09-20 17:51 UTC, Xavier Claessens
committed Details | Review

Description Xavier Claessens 2006-08-15 10:50:34 UTC
GTK 2.10 introduce GtkStatusIcon API to replace Egg trayicon. If it is Ok for gossip to depend on Gtk 2.10 I would be happy to work on porting gossip to Gtk's new API.
Comment 1 Martyn Russell 2006-08-15 10:59:49 UTC
Yes, of course.

This is already the plan, but we are waiting for desktop usage of GTK+ 2.10. This should be in Ubuntu Edgy or FC6 I think.
Comment 2 Richard Hult 2006-08-15 11:58:28 UTC
It would be nice to finish breaking out the tray stuff into a separate file from gossip-app.c at the same time.
Comment 3 Richard Hult 2006-08-15 12:03:41 UTC
*** Bug 349296 has been marked as a duplicate of this bug. ***
Comment 4 Xavier Claessens 2006-08-15 14:13:55 UTC
Created attachment 70951 [details] [review]
first patch

Here is a first patch. I didn't split the code to another file yet.

Any comment ?
Comment 5 Martyn Russell 2006-08-15 16:11:34 UTC
#1:  Please try not to include other patches in different bug patches:

    @@ -932,7 +916,8 @@ app_main_window_delete_event_cb (GtkWidg
 	    			 GdkEvent  *event,
     				 GossipApp *app)
     {
    -	return app_main_window_quit_confirm (app, window);
    +	gossip_app_set_visibility (FALSE);
    +	return TRUE;


#2: I would rather NOT change this API: gossip_notify_set_widget() ---> gossip_notify_set_status_icon(), because you can attach notifications to any widget.

Other than that, I got most of the way through it, but it overlaps in places and I would have to see the source after applying the patch. It looks good so far.

Richard: it looks like we are removing a lot of crap with this patch (which I suspected) is there anything in particular you wanted in the new gossip-tray.c?
Comment 6 Xavier Claessens 2006-08-15 17:15:12 UTC
Created attachment 70962 [details] [review]
updated patch

Thanks for reviewing.

#1 Oops, sorry ! Reversed this patch.

#2 GtkStatusIcon isn't a GtkWidget but a GObject. So I added a new gossip_notify_set_attach_status_icon() and we can now choose to attach to the StatusIcon or a Widget. For now the attach_widget isn't used but it can be used in the future.

In previous patch I forgot to replace gossip_have_tray() by gtk_status_icon_is_embedded(), it's now done. I also forgot to remove some eggs from the Makefile.am.
Comment 7 Richard Hult 2006-08-15 20:22:04 UTC
We might not need a gossip-tray I guess. It's just that there were so much logic in -app that didn't really belong there. We can look at that later if needed, and just get rid of the bad eggs now.
Comment 8 Xavier Claessens 2006-08-16 18:07:33 UTC
Created attachment 71029 [details] [review]
Use gtk_status_icon_position_menu

I didn't see this useful function. The popup menu is now better positioned, it is always on the bottom of the icon and never overlaps it.
Comment 9 Richard Hult 2006-08-18 09:35:13 UTC
Note that in the latest libnotify version there is support for positioning the bubbles close to the status icon. We need to depend on that as well and use it.
Comment 10 Xavier Claessens 2006-08-18 11:05:23 UTC
I already use notify_notification_attach_to_status_icon() if that's what you're talking about.
Comment 11 Richard Hult 2006-08-18 11:07:23 UTC
Yes, great!
Comment 12 Richard Hult 2006-09-09 08:03:34 UTC
*** Bug 355016 has been marked as a duplicate of this bug. ***
Comment 13 Martyn Russell 2006-09-17 08:55:43 UTC
Any chance you could redo this patch? It all applies except for gossip-app.c and some simple header file issue in gossip-notify.h.

HEAD now has GTK+2.10 deps so we can commit this as soon as it is ready.

Sorry about this, but this is why I tend to wait before writing patches ahead of time.
Comment 14 Xavier Claessens 2006-09-20 17:51:01 UTC
Created attachment 73098 [details] [review]
updated patch

updated to last HEAD. I also bumped the dependency for libnotify to 0.4.1 because notify_notification_attach_to_status_icon() is a new symbol is this release.
Comment 15 Xavier Claessens 2006-09-20 18:18:57 UTC
I get warnings on ubuntu edgy that I reported at bug #356941, I don't see how it can be a gossip bug...
Comment 16 Martyn Russell 2006-09-22 09:27:00 UTC
Committed, thanks Xavier!