diff options
author | Conor Curran <conor.curran@canonical.com> | 2010-09-08 16:10:36 +0100 |
---|---|---|
committer | Conor Curran <conor.curran@canonical.com> | 2010-09-08 16:10:36 +0100 |
commit | 3bc35728a37c2a9453a262f49175f5bd87297958 (patch) | |
tree | 5ff3da7977395829c5d396d2d765bb4572fdc28d /src/mpris2-controller.vala | |
parent | dad11c32d68b0f09eb52232a3d3da300e2e63702 (diff) | |
parent | 1f038d6725571f8e80530a96112d427d5b051022 (diff) | |
download | ayatana-indicator-sound-3bc35728a37c2a9453a262f49175f5bd87297958.tar.gz ayatana-indicator-sound-3bc35728a37c2a9453a262f49175f5bd87297958.tar.bz2 ayatana-indicator-sound-3bc35728a37c2a9453a262f49175f5bd87297958.zip |
player title icon now in the gutter
Diffstat (limited to 'src/mpris2-controller.vala')
-rw-r--r-- | src/mpris2-controller.vala | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/mpris2-controller.vala b/src/mpris2-controller.vala index cf5a39e..dab5e2c 100644 --- a/src/mpris2-controller.vala +++ b/src/mpris2-controller.vala @@ -105,7 +105,7 @@ public class Mpris2Controller : GLib.Object if(play_v != null){ string state = play_v.get_string(); debug("new playback state = %s", state); - int p = this.determine_play_state(state); + TransportMenuitem.state p = (TransportMenuitem.state)this.determine_play_state(state); (this.owner.custom_items[PlayerController.widget_order.TRANSPORT] as TransportMenuitem).change_play_state(p); } @@ -143,29 +143,29 @@ public class Mpris2Controller : GLib.Object } - private int determine_play_state(string status){ + private TransportMenuitem.state determine_play_state(string status){ if(status == null) - return 1; + return TransportMenuitem.state.PAUSED; if(status != null && status == "Playing"){ debug("determine play state - state = %s", status); - return 0; + return TransportMenuitem.state.PLAYING; } - return 1; + return TransportMenuitem.state.PAUSED; } public void initial_update() { - int32 status; + TransportMenuitem.state update; if(this.player.PlaybackStatus == null){ - status = 1; + update = TransportMenuitem.state.PAUSED; } else{ - status = determine_play_state(this.player.PlaybackStatus); + update = determine_play_state(this.player.PlaybackStatus); } - debug("initial update - play state %i", status); + debug("initial update - play state %i", (int)update); - (this.owner.custom_items[PlayerController.widget_order.TRANSPORT] as TransportMenuitem).change_play_state(status); + (this.owner.custom_items[PlayerController.widget_order.TRANSPORT] as TransportMenuitem).change_play_state(update); GLib.HashTable<string, Value?> cleaned_metadata = this.clean_metadata(); this.owner.custom_items[PlayerController.widget_order.METADATA].update(cleaned_metadata, MetadataMenuitem.attributes_format()); @@ -260,7 +260,7 @@ public class Mpris2Controller : GLib.Object this.mpris2_root.Raise(); } catch(DBus.Error e){ - error("Exception thrown while calling root function Raise - %s", e.message); + error("Exception thrown while calling function Raise - %s", e.message); } } } |