aboutsummaryrefslogtreecommitdiff
path: root/src/player-controller.vala
diff options
context:
space:
mode:
authorConor Curran <conor.curran@canonical.com>2010-08-17 17:43:34 +0100
committerConor Curran <conor.curran@canonical.com>2010-08-17 17:43:34 +0100
commitf18466945a43718111ec93a79f1936157b02ce3f (patch)
treeec71788e99e1c1c404aa61f1d3fff0052790311e /src/player-controller.vala
parent7aa4517861e27a0857d36e83844d670446c22ee6 (diff)
downloadayatana-indicator-sound-f18466945a43718111ec93a79f1936157b02ce3f.tar.gz
ayatana-indicator-sound-f18466945a43718111ec93a79f1936157b02ce3f.tar.bz2
ayatana-indicator-sound-f18466945a43718111ec93a79f1936157b02ce3f.zip
we have mpris 2 basic stuff working with rb perfectly
Diffstat (limited to 'src/player-controller.vala')
-rw-r--r--src/player-controller.vala32
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)
{