[banshee] Commit patch from Ubuntu that only adds notification area actions if supported
- From: Gabriel Burt <gburt src gnome org>
- To: svn-commits-list gnome org
- Subject: [banshee] Commit patch from Ubuntu that only adds notification area actions if supported
- Date: Thu, 14 May 2009 13:10:27 -0400 (EDT)
commit b1ccfb3f28155270d3d4ea0f8fce88acd192b8b4
Author: Gabriel Burt <gabriel burt gmail com>
Date: Thu May 14 12:08:04 2009 -0500
Commit patch from Ubuntu that only adds notification area actions if supported
---
.../NotificationAreaService.cs | 16 ++++++++++++++--
1 files changed, 14 insertions(+), 2 deletions(-)
diff --git a/src/Extensions/Banshee.NotificationArea/Banshee.NotificationArea/NotificationAreaService.cs b/src/Extensions/Banshee.NotificationArea/Banshee.NotificationArea/NotificationAreaService.cs
index 447acc0..95431ae 100644
--- a/src/Extensions/Banshee.NotificationArea/Banshee.NotificationArea/NotificationAreaService.cs
+++ b/src/Extensions/Banshee.NotificationArea/Banshee.NotificationArea/NotificationAreaService.cs
@@ -59,7 +59,8 @@ namespace Banshee.NotificationArea
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 @@ namespace Banshee.NotificationArea
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,7 +417,7 @@ namespace Banshee.NotificationArea
message, image, notif_area.Widget);
nf.Urgency = Urgency.Low;
nf.Timeout = 4500;
- if (!current_track.IsLive && interface_action_service.PlaybackActions["NextAction"].Sensitive) {
+ if (!current_track.IsLive && ActionsSupported && interface_action_service.PlaybackActions["NextAction"].Sensitive) {
nf.AddAction ("skip-song", Catalog.GetString("Skip this item"), OnSongSkipped);
}
nf.Show ();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]