aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/metadata-menu-item.vala3
-rw-r--r--src/mpris2-controller.vala4
-rw-r--r--src/player-controller.vala2
3 files changed, 6 insertions, 3 deletions
diff --git a/src/metadata-menu-item.vala b/src/metadata-menu-item.vala
index bcd4378..a81c143 100644
--- a/src/metadata-menu-item.vala
+++ b/src/metadata-menu-item.vala
@@ -176,7 +176,8 @@ public class MetadataMenuitem : PlayerItem
{
this.owner.instantiate(timestamp);
}
- else if(this.owner.current_state == PlayerController.state.CONNECTED){
+ else if (this.owner.current_state == PlayerController.state.CONNECTED) {
+ this.owner.gtk_app_player.activate(timestamp);
this.owner.mpris_bridge.expose(timestamp);
}
}
diff --git a/src/mpris2-controller.vala b/src/mpris2-controller.vala
index 5015f80..9230a59 100644
--- a/src/mpris2-controller.vala
+++ b/src/mpris2-controller.vala
@@ -208,9 +208,9 @@ public class Mpris2Controller : GLib.Object
return (this.player != null && this.mpris2_root != null);
}
- public void expose(uint timestamp)
+ public void expose(uint timestmap)
{
- if(this.connected() == true){
+ if (this.connected() == true) {
this.mpris2_root.Raise.begin();
}
}
diff --git a/src/player-controller.vala b/src/player-controller.vala
index 764efa5..dbe7c3c 100644
--- a/src/player-controller.vala
+++ b/src/player-controller.vala
@@ -45,6 +45,7 @@ public class PlayerController : GLib.Object
public string dbus_name { get; set;}
public ArrayList<PlayerItem> custom_items;
public Mpris2Controller mpris_bridge;
+ public GtkApplicationPlayer gtk_app_player;
public AppInfo? app_info { get; set;}
public int menu_offset { get; set;}
public string icon_name { get; set; }
@@ -149,6 +150,7 @@ 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.gtk_app_player = new GtkApplicationPlayer (this);
this.determine_state ();
}