From c8c7681e7b9e2995d29fa58c931aa09e451c4fee Mon Sep 17 00:00:00 2001 From: Conor Curran Date: Mon, 20 Dec 2010 18:02:50 +0000 Subject: playlists working --- src/player-controller.vala | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'src/player-controller.vala') diff --git a/src/player-controller.vala b/src/player-controller.vala index 24fd090..638c44d 100644 --- a/src/player-controller.vala +++ b/src/player-controller.vala @@ -131,21 +131,23 @@ 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.TRANSPORT].property_set_bool(MENUITEM_PROP_VISIBLE, false); this.custom_items[widget_order.METADATA].property_set_bool(MENUITEM_PROP_VISIBLE, false); - this.custom_items[widget_order.PLAYLISTS].property_set_bool ( MENUITEM_PROP_ENABLED, - false ); + playlists_menuitem.root_item.property_set_bool ( MENUITEM_PROP_VISIBLE, + false ); return; } this.custom_items[widget_order.METADATA].property_set_bool(MENUITEM_PROP_VISIBLE, this.custom_items[widget_order.METADATA].populated(MetadataMenuitem.attributes_format())); this.custom_items[widget_order.TRANSPORT].property_set_bool(MENUITEM_PROP_VISIBLE, true); - this.custom_items[widget_order.PLAYLISTS].property_set_bool(MENUITEM_PROP_VISIBLE, - true); + playlists_menuitem.root_item.property_set_bool ( MENUITEM_PROP_VISIBLE, + this.mpris_bridge.playlists_support_exist() ); } private void construct_widgets() -- cgit v1.2.3