diff options
author | Conor Curran <conor.curran@canonical.com> | 2010-07-08 17:52:51 +0100 |
---|---|---|
committer | Conor Curran <conor.curran@canonical.com> | 2010-07-08 17:52:51 +0100 |
commit | 50b2e070852b5eab299b8c3612a86adf6d21e901 (patch) | |
tree | 18c40c1b61ce93552767ef3f02055a3d9e92dfcb /src/transport-menu-item.vala | |
parent | 41747b032d2032c97fd7f1766157e2d846626880 (diff) | |
parent | 0f2a6b2736713951fb4b88848e79849a8f1dc72a (diff) | |
download | ayatana-indicator-sound-50b2e070852b5eab299b8c3612a86adf6d21e901.tar.gz ayatana-indicator-sound-50b2e070852b5eab299b8c3612a86adf6d21e901.tar.bz2 ayatana-indicator-sound-50b2e070852b5eab299b8c3612a86adf6d21e901.zip |
merged the event handling plus code tidy ups and proper icon loading from the theme
Diffstat (limited to 'src/transport-menu-item.vala')
-rw-r--r-- | src/transport-menu-item.vala | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/transport-menu-item.vala b/src/transport-menu-item.vala index 7a1bb4a..e0710a8 100644 --- a/src/transport-menu-item.vala +++ b/src/transport-menu-item.vala @@ -23,6 +23,11 @@ using DbusmenuTransport; public class TransportMenuitem : PlayerItem { + public enum action{ + PREVIOUS, + PLAY_PAUSE, + NEXT + } public TransportMenuitem(PlayerController parent) { @@ -36,8 +41,10 @@ public class TransportMenuitem : PlayerItem public override void handle_event(string name, GLib.Value input_value, uint timestamp) { - debug("handle_event with bool value %s", input_value.get_boolean().to_string()); - this.owner.mpris_adaptor.toggle_playback(input_value.get_boolean()); + int input = input_value.get_int(); + debug("handle_event with value %s", input.to_string()); + // Fire and forgot - the widget would not have sent it over it didn't think it was relevant. + this.owner.mpris_adaptor.transport_event((action)input); } public static HashSet<string> attributes_format() |