GNOME Bugzilla – Bug 407246
Display app icon (rhythmbox.png) in notifications and tray tooltips
Last modified: 2008-12-27 13:58:32 UTC
On Mon, 2007-02-12 at 14:35 -0500, William Jon McCann wrote: > On 2/12/07, Ed Catmur <ed@catmur.co.uk> wrote: > > On Mon, 2007-02-12 at 11:24 -0500, Andrew Conkling wrote: > > > On 2/12/07, Ed Catmur <ed@catmur.co.uk> wrote: > > > > On Mon, 2007-02-12 at 01:35 -0500, Andrew Conkling wrote: > > > > > It's a tasteful X, but I'd prefer nothing: > > > > > http://img361.imageshack.us/img361/975/rbcoverartzb8.png > > > > > > > > Ah. That's wrong; it should be the Rhythmbox icon. Currently it uses > > > > "gnome-media-player"; maybe that should be changed to "rhythmbox"? > > > > > > Not sure, but apparently (if only in Ubuntu) the icon isn't being > > > registered correctly. > > Hm - "gnome-media-player" isn't in hicolor, but "rhythmbox" is. This > > might be the problem. > > http://svn.gnome.org/viewcvs/gnome-icon-theme?rev=1112&view=rev > > Looks like that icon has been axed. Right, yeah. This patch against current svn uses RB_APP_ICON from rb-stock-icons.[ch], which was always the correct thing to do - and uses it in notifications as well. Attached patch restores behaviour of showing a placeholder icon in tooltips, on the assumption that the proper rhythmbox icon looks better there.
Created attachment 82426 [details] [review] 25tray-icon-default-image.patch
Created attachment 82459 [details] [review] use transparent pixbuf This is a different approach to the issue, using a transparent pixbuf of the correct size. To me, using Rhythmbox's icon still causes some flicker because it's only there for a fraction of a second. One other issue causing flicker is that we re-create the notification when the art arrives, rather than just telling libnotify that the icon has changed.
Uh, you uploaded the same patch. Did you select the wrong file? > One other issue causing flicker is that we re-create the notification when the > art arrives, rather than just telling libnotify that the icon has changed. I'll look into fixing that; I think the libnotify API has got significantly better over the last year or so.
Created attachment 82517 [details] [review] really the "use transparent pixbuf" pathc > Uh, you uploaded the same patch. Did you select the wrong file? Oops. Correct patch attached this time.
Created attachment 82612 [details] [review] 26update-notification.patch use notify_notification_update(). Hm - we could probably rip out a fair chunk of code if we could use GTK+-2.10 and libnotify 0.4.1 (GtkStatusIcon and notify_notification_attach_to_status_icon()). Is this feasible?
Patches committed to cvs. Bug 349280 is about using GtkStatusIcon. Using it would be good, but there are a couple of caveats: either we drop support for Gtk 2.8 or keep the old code too, and it doesn't support mouse-wheel or middle-click events on the tray icon.
Created attachment 82857 [details] [review] 25tray-icon-default-image.patch I don't really like the side effects of the "transparent icon" approach: * blank space for tracks without art * blank space when there isn't a currently playing track With the flicker-free update, I find the rhythmbox application icon to be fairly unobtrusive; plus, it reflects the state of the art widget. I suppose we could get the art plugin to export the "searching/succeeded/failed" process state, if that'd help.
Created attachment 90585 [details] [review] 25tray-icon-default-image.patch to 0.11.0
2008-12-27 Jonathan Matthew <jonathan@d14n.org> * lib/rb-stock-icons.h: * shell/rb-tray-icon.c: (rb_tray_icon_init), (rb_tray_icon_dispose), (rb_tray_icon_set_tooltip_icon), (rb_tray_icon_notify), (tray_icon_tooltip_cb): If no pixbuf is supplied, use the app icon instead. If a pixbuf is supplied, add a thin black border around it to help separate it from the rest of the bits in the tooltip. * widgets/eggtrayicon.c: (egg_tray_icon_notify): If no pixbuf is supplied, use the app icon instead. Fixes #407246, sort of relates to #435950.