From f18466945a43718111ec93a79f1936157b02ce3f Mon Sep 17 00:00:00 2001 From: Conor Curran Date: Tue, 17 Aug 2010 17:43:34 +0100 Subject: we have mpris 2 basic stuff working with rb perfectly --- src/player-controller.vala | 32 ++------------------------------ 1 file changed, 2 insertions(+), 30 deletions(-) (limited to 'src/player-controller.vala') 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) { -- cgit v1.2.3