GNOME Bugzilla – Bug 656533
Banshee notification icon sometimes appears with label "notify-sharp" under gnome-shell
Last modified: 2012-04-20 05:35:45 UTC
On Oneiric Alpha 3, using Banshee 2.1.0 in gnome-shell with notification extension turned on. Sometimes the label appears correctly (as "Banshee"), sometimes not (as "notify-sharp"). Here are instructions to reproduce this: 1. Start Banshee: the label in the gnome-shell "notification area" (at the bottom right of the screen), should read "Banshee". 2. Now play a tune, minimize it and click on fast forward/next key on the keyboard to get to the next tune (or wait for it): the you should see the regular gnome-shell notification announcing the tune, at the bottom centre, and, if you get to the notification area, the label for the Banshee icon should read "notifcation-sharp". See related report on Ubuntu Launchpad: https://bugs.launchpad.net/ubuntu/+source/banshee/+bug/825769 ProblemType: Bug DistroRelease: Ubuntu 11.10 Package: banshee 2.1.0-1ubuntu5 ProcVersionSignature: Ubuntu 3.0.0-8.10-generic-pae 3.0.1 Uname: Linux 3.0.0-8-generic-pae i686 NonfreeKernelModules: wl Architecture: i386 Date: Sat Aug 13 07:35:27 2011 InstallationMedia: Ubuntu 11.04 "Natty Narwhal" - Beta i386 (20110413) ProcEnviron: LANGUAGE=fr_CA:fr:en_CA:en PATH=(custom, no user) LANG=fr_CA.UTF-8 SHELL=/bin/bash SourcePackage: banshee UpgradeStatus: Upgraded to oneiric on 2011-07-22 (21 days ago)
*** Bug 661674 has been marked as a duplicate of this bug. ***
This bug belongs to notify-sharp, but I have no idea where notify-sharp bugs go these days, so I'm just going to brain-dump here. I looked through the notify-sharp code for this, and I believe it comes from this line:- this.app_name = Assembly.GetCallingAssembly().GetName().Name; This line is present in the Notification() constructor, which is used as the base constructor, chained by other constructors. I believe that Banshee uses one of the constructors that accepts a parameter, which results in Assembly.GetCallingAssembly() returning notify-sharp. A quick, naive workaround in notify-sharp would be to duplicate the this.app_name line to each constructor (all 8 of them), which should get the appropriate assembly. It feels like a quick hack though. Is there a better way to get the application name?
System.Reflection.Assembly.GetExecutingAssembly() looks like it could work, but in Banshee's case, this is very likely to return Nereid rather than Banshee.
Created attachment 199890 [details] [review] Fix for Banshee' s internal notify# Here's a patch for making Banshee's internal notify# correctly determine the app_name. It won't work for distros that have an up-to-date notify# though, as the patch will need to be applied on the notify# package, which seems to be unmaintained these days.
Comment on attachment 199890 [details] [review] Fix for Banshee' s internal notify# Thanks for the patch, committed. The fix works, but it's probably not the ideal solution. I think the application should be able to tell notify-sharp its name. But that would break the notify-sharp API, so it's probably not worth it for now.
This problem has been fixed in the development version. The fix will be available in the next major software release. Thank you for your bug report.
(In reply to comment #5) > (From update of attachment 199890 [details] [review]) > Thanks for the patch, committed. > > The fix works, but it's probably not the ideal solution. I think the > application should be able to tell notify-sharp its name. But that would break > the notify-sharp API, so it's probably not worth it for now. Yeah, that's what I figured as well. Until upstream comes around, making API changes would be a bad idea.
(In reply to comment #5) > (From update of attachment 199890 [details] [review]) > Thanks for the patch, committed. Bertrand, did you forget to push? I don't see this in http://git.gnome.org/browse/banshee/log/ . Thanks
Oops, I had only done a "git push --dry-run". Now the fix is really available in git master.
This seems to still be a problem in Banshee 2.4.0 I'm using Fedora 16, Gnome Shell 3.2 The only difference now is that it says "Banshee" on startup but then when the song is changed and a notification is shown, it changes "notify-s..." or "notify..."
That would probably be a bug in the Fedora version of notify-sharp. See https://github.com/hyperair/notify-sharp/commit/11a101815479554f1d45104f97b7c173e5076a2c for the commit that fixes this.
Ah i see, so I would think its fixed in Fedora 17 then?
I have no idea, really. That patch is not in any notify-sharp release, so it needs to be cherry-picked and applied by the package maintainer like it is in Debian.
I'll have to file a bug with Fedora then if it's not fixed after I upgrade. Thanks for your help!
Looking at the notify-sharp package sources in Fedora, I don't see any sign of this particular patch being pulled in. I've gone ahead and filed a bug: https://bugzilla.redhat.com/show_bug.cgi?id=814536