diff options
author | Conor Curran <conor.curran@canonical.com> | 2011-02-01 09:54:44 -0600 |
---|---|---|
committer | Conor Curran <conor.curran@canonical.com> | 2011-02-01 09:54:44 -0600 |
commit | 9e8c509c0f321f322c3b9d0a0a23050cb3b30a3f (patch) | |
tree | 67e66dfe3044ac447d61fe9c83d88b538fab1175 /src/player-controller.vala | |
parent | 19938ac8e993a14d8320b75091aaa56894e8175a (diff) | |
parent | 2ea739c1cc14bbfdafbebec79aeae78cbf440145 (diff) | |
download | ayatana-indicator-sound-9e8c509c0f321f322c3b9d0a0a23050cb3b30a3f.tar.gz ayatana-indicator-sound-9e8c509c0f321f322c3b9d0a0a23050cb3b30a3f.tar.bz2 ayatana-indicator-sound-9e8c509c0f321f322c3b9d0a0a23050cb3b30a3f.zip |
merged dbus blacklisting
Diffstat (limited to 'src/player-controller.vala')
-rw-r--r-- | src/player-controller.vala | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/src/player-controller.vala b/src/player-controller.vala index 024b88b..3ce121e 100644 --- a/src/player-controller.vala +++ b/src/player-controller.vala @@ -119,10 +119,14 @@ public class PlayerController : GLib.Object this.determine_state(); } - public void vanish() + public void remove_from_menu() { - foreach(Dbusmenu.Menuitem item in this.custom_items){ - root_menu.child_delete(item); + foreach(PlayerItem item in this.custom_items){ + this.root_menu.child_delete(item); + } + if (this.use_playlists == true){ + PlaylistsMenuitem playlists_menuitem = this.custom_items[widget_order.PLAYLISTS] as PlaylistsMenuitem; + this.root_menu.child_delete (playlists_menuitem.root_item); } } @@ -180,7 +184,7 @@ public class PlayerController : GLib.Object foreach(PlayerItem item in this.custom_items){ if (this.custom_items.index_of(item) != 4) { - root_menu.child_add_position(item, this.menu_offset + this.custom_items.index_of(item)); + root_menu.child_add_position(item, this.menu_offset + this.custom_items.index_of(item)); } else{ PlaylistsMenuitem playlists_menuitem = item as PlaylistsMenuitem; @@ -188,7 +192,7 @@ public class PlayerController : GLib.Object } } } - + private void determine_state() { if(this.mpris_bridge.connected() == true){ |