diff options
author | Conor Curran <conor.curran@canonical.com> | 2010-12-16 12:36:43 +0000 |
---|---|---|
committer | Conor Curran <conor.curran@canonical.com> | 2010-12-16 12:36:43 +0000 |
commit | de3ed4111ef50b847e1ba4d6ea06e13f913ba7a0 (patch) | |
tree | dd63dbbc059bd9a51564884d28ea704f18c1cfe9 /src/player-controller.vala | |
parent | bb13f9134c42480ada8128cfbd3b19ec2d68865b (diff) | |
download | ayatana-indicator-sound-de3ed4111ef50b847e1ba4d6ea06e13f913ba7a0.tar.gz ayatana-indicator-sound-de3ed4111ef50b847e1ba4d6ea06e13f913ba7a0.tar.bz2 ayatana-indicator-sound-de3ed4111ef50b847e1ba4d6ea06e13f913ba7a0.zip |
race condtion on playbackstatus accommodated for and dbus names changed over the new canonical naming
Diffstat (limited to 'src/player-controller.vala')
-rw-r--r-- | src/player-controller.vala | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/player-controller.vala b/src/player-controller.vala index 9e00258..b5c2d76 100644 --- a/src/player-controller.vala +++ b/src/player-controller.vala @@ -53,7 +53,7 @@ public class PlayerController : GLib.Object public PlayerController(Dbusmenu.Menuitem root, GLib.AppInfo app, - string dbus_name, + string? dbus_name, string icon_name, int offset, state initial_state) @@ -78,8 +78,9 @@ public class PlayerController : GLib.Object this.update_layout(); } - public void activate() + public void activate( string dbus_name ) { + this.dbus_name = dbus_name; this.establish_mpris_connection(); } @@ -103,7 +104,7 @@ public class PlayerController : GLib.Object private void establish_mpris_connection() { - if(this.current_state != state.READY){ + if(this.current_state != state.READY && this.dbus_name != null ){ debug("establish_mpris_connection - Not ready to connect"); return; } |