aboutsummaryrefslogtreecommitdiff
path: root/src/player-controller.vala
diff options
context:
space:
mode:
authorConor Curran <conor.curran@canonical.com>2011-06-22 14:18:38 +0200
committerConor Curran <conor.curran@canonical.com>2011-06-22 14:18:38 +0200
commit01fc374f65b6c552891d3f0d2dad5c7eb8031596 (patch)
treeb4015c076733c7c8aa5d57f6dffeaed7a172aa75 /src/player-controller.vala
parent83240c1cfd0c46bf46d616088d5d9ad12f3e2730 (diff)
downloadayatana-indicator-sound-01fc374f65b6c552891d3f0d2dad5c7eb8031596.tar.gz
ayatana-indicator-sound-01fc374f65b6c552891d3f0d2dad5c7eb8031596.tar.bz2
ayatana-indicator-sound-01fc374f65b6c552891d3f0d2dad5c7eb8031596.zip
properly plug the track / player specific together
Diffstat (limited to 'src/player-controller.vala')
-rw-r--r--src/player-controller.vala19
1 files changed, 13 insertions, 6 deletions
diff --git a/src/player-controller.vala b/src/player-controller.vala
index 52adb23..e988682 100644
--- a/src/player-controller.vala
+++ b/src/player-controller.vala
@@ -51,6 +51,7 @@ public class PlayerController : GLib.Object
public int menu_offset { get; set;}
public string icon_name { get; set; }
public bool? use_playlists;
+ public Client track_specific_client;
public PlayerController(Dbusmenu.Menuitem root,
GLib.AppInfo app,
@@ -107,12 +108,19 @@ public class PlayerController : GLib.Object
}
}
- public void enable_track_specific_items()
+ public void enable_track_specific_items (string object_path)
{
debug ("enable_track_specific_items");
- TrackSpecificMenuitem menuitem = this.custom_items[widget_order.TRACK_SPECIFIC] as TrackSpecificMenuitem;
+ track_specific_client = new Client (this.dbus_name, object_path);
+ track_specific_client.new_menuitem.connect (on_new_track_specific_menuitem);
+ /*TrackSpecificMenuitem menuitem = this.custom_items[widget_order.TRACK_SPECIFIC] as TrackSpecificMenuitem;
menuitem.root_item.property_set_bool (MENUITEM_PROP_VISIBLE, true);
- menuitem.root_item.property_set_bool (MENUITEM_PROP_ENABLED, true);
+ menuitem.root_item.property_set_bool (MENUITEM_PROP_ENABLED, true);*/
+ }
+
+ private void on_new_track_specific_menuitem (GLib.Object item)
+ {
+ debug ("New track specific item for %s", this.app_info.get_name());
}
private void establish_mpris_connection()
@@ -123,9 +131,8 @@ public class PlayerController : GLib.Object
}
debug ( " establish mpris connection - use playlists value = %s ",
this.use_playlists.to_string() );
-
- this.mpris_bridge = new Mpris2Controller(this);
- this.determine_state();
+ this.mpris_bridge = new Mpris2Controller (this);
+ this.determine_state ();
}
public void remove_from_menu()