Commit 69335f34 authored by Chow Loong Jin's avatar Chow Loong Jin Committed by Bertrand Lorentz

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's avatarBertrand Lorentz <bertrand.lorentz@gmail.com>
parent d30ff8d1
......@@ -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 () {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment