[banshee] Notification: Fix application name used in internal notify#



commit 69335f34422e5361db30d29ba6a37cdd363e55e6
Author: Chow Loong Jin <hyperair ubuntu com>
Date:   Tue Oct 25 13:33:38 2011 +0800

    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>

 .../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 () {



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]