Skip to content

Commit

Permalink
Use GetEntryAssembly() to derive app_name
Browse files Browse the repository at this point in the history
This fixes an issue where notify-sharp users (e.g. Banshee) which use one of
the Notification constructors that accept arguments end up sending an app_name
of "notify-sharp" to notification daemons, which causes issues between Banshee
and GNOME Shell where notifications are concerned. (bgo#656533 and lp#825769)
  • Loading branch information
hyperair committed Nov 13, 2011
1 parent 84d1666 commit 11a1018
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/Notification.cs
Expand Up @@ -112,7 +112,12 @@ private struct ActionTuple {
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 () {
Expand Down

0 comments on commit 11a1018

Please sign in to comment.