aboutsummaryrefslogtreecommitdiff
path: root/src/player-controller.vala
diff options
context:
space:
mode:
authorConor Curran <conor.curran@canonical.com>2011-09-09 18:47:00 +0100
committerConor Curran <conor.curran@canonical.com>2011-09-09 18:47:00 +0100
commitb6fb30caf2354f05dbe496c1a2820acd37a1f2bf (patch)
tree2e0e87f9d0048487f42e978e6841ee1b77687548 /src/player-controller.vala
parent9f05fc93fc37dd326a68174be212cc23d270e00d (diff)
downloadayatana-indicator-sound-b6fb30caf2354f05dbe496c1a2820acd37a1f2bf.tar.gz
ayatana-indicator-sound-b6fb30caf2354f05dbe496c1a2820acd37a1f2bf.tar.bz2
ayatana-indicator-sound-b6fb30caf2354f05dbe496c1a2820acd37a1f2bf.zip
increased the max playlist count to 20, fixed a bug which was prohibiting the playlists being shown
Diffstat (limited to 'src/player-controller.vala')
-rw-r--r--src/player-controller.vala6
1 files changed, 4 insertions, 2 deletions
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));
}