Re: [Banshee-List] 'notify-sharp' window pops up on song change?



On Thu, 2009-05-21 at 03:22 -0700, hpm wrote:
> Hi there!
> 
> I compiled the current Banshee version from source to install a patch (add
> genre browser). Except for specifying --disable-ipod I didn't make any
> changes to the configuration.
> 
> Now, whenever one song finishes and another song starts a dialog window with
> the title 'notify-sharp' pops up. It says "Now playing / *track* / *artist*"
> and I can choose between 'Skip this item', 'Cancel' and 'Ok'.
> The message does not pop up when I manually select another song in the
> library, but only when I use the previous/next button or when Banshee
> automatically goes to the next song after one song has finished.
> I always get notifications through the Ubuntu notification system, even when
> I manually select a song. (Not sure if that's related).
> 
> I would like to get rid of the 'notify-sharp' window, as it is quite
> annoying and has no use for me.
> I did not have the window popping up when I used the official Banshee
> package before. It's only since I compiled myself.
> 
> How can I switch of the notifications?
> 
> thanks for your help!
> malte
Right click the tray icon, uncheck "Show Notifications". But before
that, since you're compiling, why don't you compile from git master?
This bug is fixed there already.

Otherwise, the attached patch should alleviate issues for you. This
patch is in all of Debian (and Ubuntu)'s Banshee packages.
-- 
Regards,
Chow Loong Jin
diff -Nur -x '*.orig' -x '*~' banshee-1.4.2/src/Extensions/Banshee.NotificationArea/Banshee.NotificationArea/NotificationAreaService.cs banshee-1.4.2.new/src/Extensions/Banshee.NotificationArea/Banshee.NotificationArea/NotificationAreaService.cs
--- banshee-1.4.2/src/Extensions/Banshee.NotificationArea/Banshee.NotificationArea/NotificationAreaService.cs	2008-10-06 20:10:39.000000000 +0100
+++ banshee-1.4.2.new/src/Extensions/Banshee.NotificationArea/Banshee.NotificationArea/NotificationAreaService.cs	2009-02-25 13:28:44.000000000 +0000
@@ -59,7 +59,8 @@
         private RatingMenuItem rating_menu_item;
         private BansheeActionGroup actions;
         private uint ui_manager_id;
-        
+
+        private bool? actions_supported;
         private bool show_notifications;
         private string notify_last_title;
         private string notify_last_artist;
@@ -200,6 +201,17 @@
             
             disposed = true;
         }
+
+	private bool ActionsSupported {
+		get {
+			if (!actions_supported.HasValue) {
+				actions_supported = Notifications.Global.Capabilities != null &&
+					Array.IndexOf (Notifications.Global.Capabilities, "actions") > -1;
+			}
+
+			return actions_supported.Value;
+		}
+	}
         
         private bool BuildNotificationArea () 
         {
@@ -405,8 +417,8 @@
                     message, image, notif_area.Widget);
                 nf.Urgency = Urgency.Low;
                 nf.Timeout = 4500;
-                if (interface_action_service.PlaybackActions["NextAction"].Sensitive) {
-                    nf.AddAction ("skip-song", Catalog.GetString("Skip this item"), OnSongSkipped);
+                if (interface_action_service.PlaybackActions["NextAction"].Sensitive && ActionsSupported) {
+			nf.AddAction ("skip-song", Catalog.GetString("Skip this item"), OnSongSkipped);
                 }
                 nf.Show ();
                 

Attachment: signature.asc
Description: This is a digitally signed message part



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