diff options
Diffstat (limited to 'src/player-controller.vala')
-rw-r--r-- | src/player-controller.vala | 32 |
1 files changed, 2 insertions, 30 deletions
diff --git a/src/player-controller.vala b/src/player-controller.vala index 79b63d7..2aa4382 100644 --- a/src/player-controller.vala +++ b/src/player-controller.vala @@ -23,7 +23,7 @@ using Gee; public class PlayerController : GLib.Object { - public const int WIDGET_QUANTITY = 6; + public const int WIDGET_QUANTITY = 5; public static enum widget_order{ SEPARATOR, @@ -31,7 +31,6 @@ public class PlayerController : GLib.Object METADATA, SCRUB, TRANSPORT, - PLAYLIST } public enum state{ @@ -128,8 +127,6 @@ public class PlayerController : GLib.Object false); this.custom_items[widget_order.METADATA].property_set_bool(MENUITEM_PROP_VISIBLE, false); - this.custom_items[widget_order.PLAYLIST].property_set_bool(MENUITEM_PROP_VISIBLE, - false); return; } this.custom_items[widget_order.METADATA].property_set_bool(MENUITEM_PROP_VISIBLE, @@ -138,8 +135,6 @@ public class PlayerController : GLib.Object this.custom_items[widget_order.SCRUB].populated(ScrubMenuitem.attributes_format())); this.custom_items[widget_order.TRANSPORT].property_set_bool(MENUITEM_PROP_VISIBLE, true); - this.custom_items[widget_order.PLAYLIST].property_set_bool(MENUITEM_PROP_VISIBLE, - true); } private void construct_widgets() @@ -162,34 +157,11 @@ public class PlayerController : GLib.Object // Transport item TransportMenuitem transport_item = new TransportMenuitem(this); this.custom_items.add(transport_item); - - this.custom_items.add(create_playlist()); - + foreach(PlayerItem item in this.custom_items){ root_menu.child_add_position(item, this.menu_offset + this.custom_items.index_of(item)); } } - - private PlayerItem create_playlist() - { - PlayerItem playlist_root = new PlayerItem(CLIENT_TYPES_DEFAULT); - playlist_root.property_set(MENUITEM_PROP_LABEL, "Choose Playlist"); - - PlayerItem subentry_1 = new PlayerItem(CLIENT_TYPES_DEFAULT); - subentry_1.property_set(MENUITEM_PROP_LABEL, "Raster-noton selection"); - - PlayerItem subentry_2 = new PlayerItem(CLIENT_TYPES_DEFAULT); - subentry_2.property_set(MENUITEM_PROP_LABEL, "Rune Grammofon selection"); - - PlayerItem subentry_3 = new PlayerItem(CLIENT_TYPES_DEFAULT); - subentry_3.property_set(MENUITEM_PROP_LABEL, "Kranky selection"); - - playlist_root.child_append(subentry_1); - playlist_root.child_append(subentry_2); - playlist_root.child_append(subentry_3); - - return playlist_root; - } private static string format_client_name(string client_name) { |