[Pkg-cli-libs-commits] [notify-sharp-3.0] 32/44: Fix app_name derivation issue

Chow Loong Jin hyperair at debian.org
Sun Nov 3 17:49:03 UTC 2013


This is an automated email from the git hooks/post-receive script.

hyperair pushed a commit to branch master
in repository notify-sharp-3.0.

commit f647f185d9bf2bc403b7392b5bd992cd3b09d5e4
Author: Chow Loong Jin <hyperair at ubuntu.com>
Date:   Tue Oct 25 12:19:18 2011 +0800

    Fix app_name derivation issue
    
    This fixes the issue where applications using notify-sharp end up sending
    notifications with app_name = "notify-sharp". This used to be a non-issue until
    GNOME Shell started using the app_name as the title for its notifications.
    
    LP: #825769
---
 debian/patches/04-fix-app-name-derivation.patch |   24 +++++++++++++++++++++++
 debian/patches/series                           |    1 +
 2 files changed, 25 insertions(+)

diff --git a/debian/patches/04-fix-app-name-derivation.patch b/debian/patches/04-fix-app-name-derivation.patch
new file mode 100644
index 0000000..c9af643
--- /dev/null
+++ b/debian/patches/04-fix-app-name-derivation.patch
@@ -0,0 +1,24 @@
+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 at 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 () {
+-- 
diff --git a/debian/patches/series b/debian/patches/series
index 1d03723..1e38f89 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,3 +1,4 @@
 01_pkg-config-path.patch
 02_reverse_cap_check.patch
 03-use-dbus-sharp.patch
+04-fix-app-name-derivation.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-cli-libs/packages/notify-sharp-3.0.git



More information about the Pkg-cli-libs-commits mailing list