From 8f41c4e6e74805c63944f73d4acebef3f9efafe9 Mon Sep 17 00:00:00 2001 From: Conor Curran Date: Thu, 8 Sep 2011 19:27:52 +0100 Subject: fixes for new valac compilation --- src/player-controller.vala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/player-controller.vala') diff --git a/src/player-controller.vala b/src/player-controller.vala index ced7d96..2f5569c 100644 --- a/src/player-controller.vala +++ b/src/player-controller.vala @@ -24,7 +24,7 @@ public class PlayerController : GLib.Object { public const int WIDGET_QUANTITY = 4; - public static enum widget_order{ + public enum widget_order{ SEPARATOR, METADATA, TRANSPORT, -- cgit v1.2.3 From b6fb30caf2354f05dbe496c1a2820acd37a1f2bf Mon Sep 17 00:00:00 2001 From: Conor Curran Date: Fri, 9 Sep 2011 18:47:00 +0100 Subject: increased the max playlist count to 20, fixed a bug which was prohibiting the playlists being shown --- src/player-controller.vala | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/player-controller.vala') diff --git a/src/player-controller.vala b/src/player-controller.vala index 2f5569c..0fe7104 100644 --- a/src/player-controller.vala +++ b/src/player-controller.vala @@ -30,6 +30,8 @@ public class PlayerController : GLib.Object TRANSPORT, PLAYLISTS } + + public enum state{ OFFLINE, @@ -169,7 +171,6 @@ public class PlayerController : GLib.Object public void update_layout() { - debug ("a call to update layout"); PlaylistsMenuitem playlists_menuitem = this.custom_items[widget_order.PLAYLISTS] as PlaylistsMenuitem; MetadataMenuitem metadata_menuitem = this.custom_items[widget_order.METADATA] as MetadataMenuitem; if(this.current_state != state.CONNECTED){ @@ -190,6 +191,7 @@ public class PlayerController : GLib.Object this.custom_items[widget_order.TRANSPORT].property_set_bool (MENUITEM_PROP_VISIBLE, true); } + debug ("SETTING PLAYLISTS MENUITEM TO %s", this.use_playlists.to_string()); playlists_menuitem.root_item.property_set_bool ( MENUITEM_PROP_VISIBLE, this.use_playlists ); } @@ -212,7 +214,7 @@ public class PlayerController : GLib.Object this.custom_items.add(playlist_menuitem); foreach(PlayerItem item in this.custom_items){ - if (this.custom_items.index_of(item) == 4) { + if (this.custom_items.index_of(item) == WIDGET_QUANTITY-1) { PlaylistsMenuitem playlists_menuitem = item as PlaylistsMenuitem; root_menu.child_add_position(playlists_menuitem.root_item, this.menu_offset + this.custom_items.index_of(item)); } -- cgit v1.2.3 From 41e5d2ef85dd8f53a70464affdb9bbcab441f788 Mon Sep 17 00:00:00 2001 From: Conor Curran Date: Fri, 9 Sep 2011 18:49:49 +0100 Subject: tidy up --- src/player-controller.vala | 2 -- 1 file changed, 2 deletions(-) (limited to 'src/player-controller.vala') diff --git a/src/player-controller.vala b/src/player-controller.vala index 0fe7104..04d0bf9 100644 --- a/src/player-controller.vala +++ b/src/player-controller.vala @@ -174,7 +174,6 @@ public class PlayerController : GLib.Object PlaylistsMenuitem playlists_menuitem = this.custom_items[widget_order.PLAYLISTS] as PlaylistsMenuitem; MetadataMenuitem metadata_menuitem = this.custom_items[widget_order.METADATA] as MetadataMenuitem; if(this.current_state != state.CONNECTED){ - // TODO metadata_menuitem.should_collapse (true); playlists_menuitem.root_item.property_set_bool (MENUITEM_PROP_VISIBLE, false ); @@ -191,7 +190,6 @@ public class PlayerController : GLib.Object this.custom_items[widget_order.TRANSPORT].property_set_bool (MENUITEM_PROP_VISIBLE, true); } - debug ("SETTING PLAYLISTS MENUITEM TO %s", this.use_playlists.to_string()); playlists_menuitem.root_item.property_set_bool ( MENUITEM_PROP_VISIBLE, this.use_playlists ); } -- cgit v1.2.3