File notify-sharp-fix-app-name-derivation.patch of Package notify-sharp

Subject: Use GetEntryAssembly() to derive app_name
Bug-Ubuntu: https://bugs.launchpad.net/bugs/825769
Bug: https://bugzilla.gnome.org/show_bug.cgi?id=656533
From: Chow Loong Jin <hyperair@ubuntu.com>
Forwarded: no
diff --git a/src/Notification.cs b/src/Notification.cs
index d40683c..778c917 100644
--- a/src/Notification.cs
+++ b/src/Notification.cs
@@ -112,7 +112,12 @@ 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 () {
-- 
openSUSE Build Service is sponsored by