diff options
author | Conor Curran <conor.curran@canonical.com> | 2010-06-11 15:09:07 +0100 |
---|---|---|
committer | Conor Curran <conor.curran@canonical.com> | 2010-06-11 15:09:07 +0100 |
commit | 448e45e3fa53620804ab8ec9c5940946f45a8b62 (patch) | |
tree | dc1499102d21729c584ba3beee848e87aeb1358c /src/player-controller.vala | |
parent | da91c666d6b66163077ddb9e59bf556fb4d44953 (diff) | |
download | ayatana-indicator-sound-448e45e3fa53620804ab8ec9c5940946f45a8b62.tar.gz ayatana-indicator-sound-448e45e3fa53620804ab8ec9c5940946f45a8b62.tar.bz2 ayatana-indicator-sound-448e45e3fa53620804ab8ec9c5940946f45a8b62.zip |
new widget for the metadata
Diffstat (limited to 'src/player-controller.vala')
-rw-r--r-- | src/player-controller.vala | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/src/player-controller.vala b/src/player-controller.vala index a92d8bf..26ad1ff 100644 --- a/src/player-controller.vala +++ b/src/player-controller.vala @@ -8,7 +8,7 @@ public class PlayerController : GLib.Object private bool is_active; private ArrayList<Dbusmenu.Menuitem> custom_items; - // TODO: pass in the appropriate position for the menu + // TODO: pass in the appropriate position for the menu (to handle multiple players) public PlayerController(Dbusmenu.Menuitem root, string client_name, bool active) { this.root_menu = root; @@ -38,8 +38,12 @@ public class PlayerController : GLib.Object title_item.property_set(MENUITEM_PROP_ICON_NAME, "applications-multimedia"); this.custom_items.add(title_item); + // Metadata item + MetadataMenuitem metadata_item = new MetadataMenuitem(); + this.custom_items.add(metadata_item); + // Transport item - TransportMenuItem transport_item = new TransportMenuItem(); + TransportMenuitem transport_item = new TransportMenuitem(); this.custom_items.add(transport_item); int offset = 2; @@ -48,12 +52,6 @@ public class PlayerController : GLib.Object } return true; } -// if(!root_menu.child_add_position(client_item, 2) || -// !root_menu.child_add_position(transport_item, 3)){ -// //TODO raise here! -// return false; -// } -// return true; private static string format_client_name(string client_name) @@ -62,8 +60,7 @@ public class PlayerController : GLib.Object if(formatted.len() > 1){ formatted = client_name.up(1).concat(client_name.slice(1, client_name.len())); debug("PlayerController->format_client_name - : %s", formatted); - } - + } return formatted; } |