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 656533 - Banshee notification icon sometimes appears with label "notify-sharp" under gnome-shell
Banshee notification icon sometimes appears with label "notify-sharp" under g...
Status: RESOLVED FIXED
Product: banshee
Classification: Other
Component: User Interface
2.1.0
Other Linux
: Normal normal
: ---
Assigned To: Banshee Maintainers
Banshee Maintainers
: 661674 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2011-08-14 21:36 UTC by mlaverdiere
Modified: 2012-04-20 05:35 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Fix for Banshee' s internal notify# (1.34 KB, patch)
2011-10-25 05:38 UTC, Chow Loong Jin
committed Details | Review

Description mlaverdiere 2011-08-14 21:36:37 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)
Comment 1 Michael Martin-Smucker 2011-10-13 17:14:33 UTC
*** Bug 661674 has been marked as a duplicate of this bug. ***
Comment 2 Chow Loong Jin 2011-10-24 23:35:43 UTC
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?
Comment 3 Chow Loong Jin 2011-10-24 23:51:17 UTC
System.Reflection.Assembly.GetExecutingAssembly() looks like it could work, but in Banshee's case, this is very likely to return Nereid rather than Banshee.
Comment 4 Chow Loong Jin 2011-10-25 05:38:52 UTC
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 5 Bertrand Lorentz 2011-10-26 19:36:34 UTC
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.
Comment 6 Bertrand Lorentz 2011-10-26 19:36:48 UTC
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.
Comment 7 Chow Loong Jin 2011-10-26 19:39:42 UTC
(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.
Comment 8 Andrés G. Aragoneses (IRC: knocte) 2011-10-26 21:58:50 UTC
(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
Comment 9 Bertrand Lorentz 2011-10-27 05:39:53 UTC
Oops, I had only done a "git push --dry-run".
Now the fix is really available in git master.
Comment 10 Jeremy Newton 2012-04-19 18:58:43 UTC
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..."
Comment 11 Chow Loong Jin 2012-04-19 19:39:51 UTC
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.
Comment 12 Jeremy Newton 2012-04-19 20:07:25 UTC
Ah i see, so I would think its fixed in Fedora 17 then?
Comment 13 Chow Loong Jin 2012-04-20 01:29:26 UTC
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.
Comment 14 Jeremy Newton 2012-04-20 02:02:35 UTC
I'll have to file a bug with Fedora then if it's not fixed after I upgrade.
Thanks for your help!
Comment 15 Theodore Lee 2012-04-20 05:35:45 UTC
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