diff options
| author | Ken VanDine <ken.vandine@canonical.com> | 2010-10-14 06:40:13 -0400 |
|---|---|---|
| committer | Bazaar Package Importer <james.westby@ubuntu.com> | 2010-10-14 06:40:13 -0400 |
| commit | 6db5598e3ec6ddf626c7335105fde807ff964e72 (patch) | |
| tree | 529ffd73ebd0c0c50d857fa0f849218aeca1aa03 /src/player-controller.vala | |
| parent | 1ccd374f4757568a1f676d4814e700330a7b3a04 (diff) | |
| parent | 7620afcd008217151fc02d6440df9741ed3d7e48 (diff) | |
| download | ayatana-indicator-sound-6db5598e3ec6ddf626c7335105fde807ff964e72.tar.gz ayatana-indicator-sound-6db5598e3ec6ddf626c7335105fde807ff964e72.tar.bz2 ayatana-indicator-sound-6db5598e3ec6ddf626c7335105fde807ff964e72.zip | |
Import upstream version 0.4.9
Diffstat (limited to 'src/player-controller.vala')
| -rw-r--r-- | src/player-controller.vala | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/player-controller.vala b/src/player-controller.vala index f5ec205..ad8e989 100644 --- a/src/player-controller.vala +++ b/src/player-controller.vala @@ -44,6 +44,7 @@ public class PlayerController : GLib.Object private Dbusmenu.Menuitem root_menu; public string name { get; set;} + public string mpris_name { get; set;} public ArrayList<PlayerItem> custom_items; public Mpris2Controller mpris_bridge; public AppInfo? app_info { get; set;} @@ -51,11 +52,13 @@ public class PlayerController : GLib.Object public PlayerController(Dbusmenu.Menuitem root, string client_name, + string mpris_name, int offset, state initial_state) { this.root_menu = root; this.name = format_client_name(client_name.strip()); + this.mpris_name = mpris_name; this.custom_items = new ArrayList<PlayerItem>(); this.current_state = initial_state; this.menu_offset = offset; @@ -160,8 +163,8 @@ public class PlayerController : GLib.Object private static string format_client_name(string client_name) { string formatted = client_name; - if(formatted.len() > 1){ - formatted = client_name.up(1).concat(client_name.slice(1, client_name.len())); + if(formatted.length > 1){ + formatted = client_name.up(1).concat(client_name.slice(1, client_name.length)); debug("PlayerController->format_client_name - : %s", formatted); } return formatted; |
