aboutsummaryrefslogtreecommitdiff
path: root/src/player-controller.vala
diff options
context:
space:
mode:
authorConor Curran <conor.curran@canonical.com>2010-12-16 12:36:43 +0000
committerConor Curran <conor.curran@canonical.com>2010-12-16 12:36:43 +0000
commitde3ed4111ef50b847e1ba4d6ea06e13f913ba7a0 (patch)
treedd63dbbc059bd9a51564884d28ea704f18c1cfe9 /src/player-controller.vala
parentbb13f9134c42480ada8128cfbd3b19ec2d68865b (diff)
downloadayatana-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.vala7
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;
}