diff options
| author | Chow Loong Jin <hyperair@ubuntu.com> | 2011-10-25 05:33:38 (GMT) |
|---|---|---|
| committer | Bertrand Lorentz <bertrand.lorentz@gmail.com> | 2011-10-26 19:23:21 (GMT) |
| commit | 69335f34422e5361db30d29ba6a37cdd363e55e6 (patch) | |
| tree | 8ced94964e24442937e62525466a91d349626264 | |
| parent | d30ff8d1ab2e1aab61862ed0074eb55ffb98adb2 (diff) | |
| download | banshee-69335f34422e5361db30d29ba6a37cdd363e55e6.zip banshee-69335f34422e5361db30d29ba6a37cdd363e55e6.tar.xz | |
Notification: Fix application name used in internal notify#
GetCallingAssembly() returns the notify-sharp assembly when you use
constructors which chain upon the base constructor of Notification.
That means some notification systems, like the one in GNOME shell 3.2,
would then display "notify-sharp".
To work around this, use GetEntryAssembly() instead to get the
application's assembly name. Fixes bgo#656533.
Signed-off-by: Bertrand Lorentz <bertrand.lorentz@gmail.com>
| -rw-r--r-- | src/Extensions/Banshee.NotificationArea/Notifications/Notification.cs | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/Extensions/Banshee.NotificationArea/Notifications/Notification.cs b/src/Extensions/Banshee.NotificationArea/Notifications/Notification.cs index aa5a0e2..c7afafd 100644 --- a/src/Extensions/Banshee.NotificationArea/Notifications/Notification.cs +++ b/src/Extensions/Banshee.NotificationArea/Notifications/Notification.cs @@ -114,7 +114,13 @@ namespace Notifications { nf.NotificationClosed += OnClosed; nf.ActionInvoked += OnActionInvoked; - this.app_name = Assembly.GetCallingAssembly().GetName().Name; + Assembly app_asm = Assembly.GetEntryAssembly (); + + if (app_asm == null) { + app_asm = Assembly.GetCallingAssembly (); + } + + this.app_name = app_asm.GetName ().Name; } public Notification (string summary, string body) : this () { |
