aboutsummaryrefslogtreecommitdiff
path: root/src/music-player-bridge.vala
diff options
context:
space:
mode:
authorConor Curran <conor.curran@canonical.com>2010-06-09 18:36:12 +0100
committerConor Curran <conor.curran@canonical.com>2010-06-09 18:36:12 +0100
commit8e51465790989d6b8ed8194a0d9a86fe7b3412d5 (patch)
tree40982781446d91ff6230d4d352b6bc4c7051aac9 /src/music-player-bridge.vala
parent664a45a398020f82f1e8f8e22f1627392a06a0c2 (diff)
downloadayatana-indicator-sound-8e51465790989d6b8ed8194a0d9a86fe7b3412d5.tar.gz
ayatana-indicator-sound-8e51465790989d6b8ed8194a0d9a86fe7b3412d5.tar.bz2
ayatana-indicator-sound-8e51465790989d6b8ed8194a0d9a86fe7b3412d5.zip
play controls in progress
Diffstat (limited to 'src/music-player-bridge.vala')
-rw-r--r--src/music-player-bridge.vala11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/music-player-bridge.vala b/src/music-player-bridge.vala
index dc66101..92f9dc5 100644
--- a/src/music-player-bridge.vala
+++ b/src/music-player-bridge.vala
@@ -48,10 +48,15 @@ public class MusicPlayerBridge : GLib.Object
if(server_is_not_of_interest(type)) return;
string client_name = type.split(".")[1];
if (root_menu != null && client_name != null){
+ Dbusmenu.Menuitem client_item = new Dbusmenu.Menuitem();
+ client_item.property_set(MENUITEM_PROP_LABEL, client_name.concat(" is registered"));
TransportMenuItem transport_item = new TransportMenuItem();
- //client_item.property_set(MENUITEM_PROP_LABEL, client_name.concat(" is registered"));
- registered_clients.set(client_name, transport_item);
+ root_menu.child_append(client_item);
root_menu.child_append(transport_item);
+
+ registered_clients.set(client_name, client_item);
+ // hackery -> need to wrap player sections into its own object
+ registered_clients.set("transport", transport_item);
debug("client of name %s has successfully registered with us", client_name);
}
}
@@ -63,7 +68,9 @@ public class MusicPlayerBridge : GLib.Object
string client_name = type.split(".")[1];
if (root_menu != null && client_name != null){
root_menu.child_delete(registered_clients[client_name]);
+ root_menu.child_delete(registered_clients["transport"]);
registered_clients.remove(client_name);
+ registered_clients.remove("transport");
debug("Successively removed menu_item for client %s from registered_clients", client_name);
}
}