aboutsummaryrefslogtreecommitdiff
path: root/src/player-controller.vala
diff options
context:
space:
mode:
authorConor Curran <conor.curran@canonical.com>2010-06-30 18:02:53 +0100
committerConor Curran <conor.curran@canonical.com>2010-06-30 18:02:53 +0100
commitedac78eadc5ddceb17b93bffa101eeffbab4437c (patch)
tree43b5c9e5b7208e9c7cfea6c75fa927764bd4bda3 /src/player-controller.vala
parent2d1c2058a7384a6dc0d4c1b900e223b6905df4c6 (diff)
downloadayatana-indicator-sound-edac78eadc5ddceb17b93bffa101eeffbab4437c.tar.gz
ayatana-indicator-sound-edac78eadc5ddceb17b93bffa101eeffbab4437c.tar.bz2
ayatana-indicator-sound-edac78eadc5ddceb17b93bffa101eeffbab4437c.zip
correct startup behaviour in place
Diffstat (limited to 'src/player-controller.vala')
-rw-r--r--src/player-controller.vala25
1 files changed, 17 insertions, 8 deletions
diff --git a/src/player-controller.vala b/src/player-controller.vala
index 0d8dc01..dfc2659 100644
--- a/src/player-controller.vala
+++ b/src/player-controller.vala
@@ -27,19 +27,20 @@ public class PlayerController : GLib.Object
private const int TRANSPORT = 3;
private Dbusmenu.Menuitem root_menu;
- private string name;
- private bool is_active;
+ public string name { get; set;}
+ public bool active { get; set;}
public ArrayList<PlayerItem> custom_items;
private MprisController mpris_adaptor;
- private string desktop_path;
-
- public PlayerController(Dbusmenu.Menuitem root, string client_name, bool active)
+ public AppInfo app_info { get; set;}
+
+ public PlayerController(Dbusmenu.Menuitem root, string client_name, AppInfo? info = null)
{
this.root_menu = root;
this.name = format_client_name(client_name.strip());
- this.is_active = active;
this.custom_items = new ArrayList<PlayerItem>();
+ this.app_info = info;
self_construct();
+ //app_info.launch(null, null);
// Temporary scenario to handle both v1 and v2 of MPRIS.
if(this.name == "Vlc"){
@@ -61,6 +62,14 @@ public class PlayerController : GLib.Object
root_menu.child_delete(item);
}
}
+
+ //public void switch_active(bool active){
+ // this.is_active = active;
+ //}
+
+ //public bool has_app_info(){
+ // return (this.app_info != null);
+ //}
private bool self_construct()
{
@@ -84,7 +93,7 @@ public class PlayerController : GLib.Object
}
return true;
}
-
+
private static string format_client_name(string client_name)
{
string formatted = client_name;
@@ -94,5 +103,5 @@ public class PlayerController : GLib.Object
}
return formatted;
}
-
+
} \ No newline at end of file