aboutsummaryrefslogtreecommitdiff
path: root/src/player-controller.vala
diff options
context:
space:
mode:
authorConor Curran <conor.curran@canonical.com>2011-03-16 18:15:18 +0000
committerConor Curran <conor.curran@canonical.com>2011-03-16 18:15:18 +0000
commit8418707f9e99f08b44e8cb7641ba50a110003784 (patch)
treebc70ffcc876c3a9b09451dfc2005e5b0c31083a3 /src/player-controller.vala
parent4c7f07ce4106f7e0f4e04ca034fd781b309e2985 (diff)
downloadayatana-indicator-sound-8418707f9e99f08b44e8cb7641ba50a110003784.tar.gz
ayatana-indicator-sound-8418707f9e99f08b44e8cb7641ba50a110003784.tar.bz2
ayatana-indicator-sound-8418707f9e99f08b44e8cb7641ba50a110003784.zip
only expose the play head if the player is banshee when its hibernated@
Diffstat (limited to 'src/player-controller.vala')
-rw-r--r--src/player-controller.vala26
1 files changed, 16 insertions, 10 deletions
diff --git a/src/player-controller.vala b/src/player-controller.vala
index 020109d..86dfe9b 100644
--- a/src/player-controller.vala
+++ b/src/player-controller.vala
@@ -144,19 +144,25 @@ public class PlayerController : GLib.Object
public void update_layout()
{
PlaylistsMenuitem playlists_menuitem = this.custom_items[widget_order.PLAYLISTS] as PlaylistsMenuitem;
-
if(this.current_state != state.CONNECTED){
- this.custom_items[widget_order.METADATA].property_set_bool(MENUITEM_PROP_VISIBLE,
- false);
- playlists_menuitem.root_item.property_set_bool ( MENUITEM_PROP_VISIBLE,
- false );
+ this.custom_items[widget_order.METADATA].property_set_bool (MENUITEM_PROP_VISIBLE,
+ false);
+ playlists_menuitem.root_item.property_set_bool (MENUITEM_PROP_VISIBLE,
+ false );
+ this.custom_items[widget_order.TRANSPORT].property_set_bool (MENUITEM_PROP_VISIBLE,
+ this.app_info.get_id() == "banshee-1.desktop");
return;
}
- this.custom_items[widget_order.METADATA].property_set_bool(MENUITEM_PROP_VISIBLE,
- this.custom_items[widget_order.METADATA].populated(MetadataMenuitem.attributes_format()));
- TransportMenuitem transport = this.custom_items[widget_order.TRANSPORT] as TransportMenuitem;
- transport.handle_cached_action();
-
+ this.custom_items[widget_order.METADATA].property_set_bool (MENUITEM_PROP_VISIBLE,
+ this.custom_items[widget_order.METADATA].populated(MetadataMenuitem.attributes_format()));
+ if (this.app_info.get_id() == "banshee-1.desktop"){
+ TransportMenuitem transport = this.custom_items[widget_order.TRANSPORT] as TransportMenuitem;
+ transport.handle_cached_action();
+ }
+ else{
+ this.custom_items[widget_order.TRANSPORT].property_set_bool (MENUITEM_PROP_VISIBLE,
+ true);
+ }
playlists_menuitem.root_item.property_set_bool ( MENUITEM_PROP_VISIBLE,
this.use_playlists );
}