aboutsummaryrefslogtreecommitdiff
path: root/src/transport-menu-item.vala
diff options
context:
space:
mode:
authorKen VanDine <ken.vandine@canonical.com>2011-01-14 10:53:50 -0600
committerKen VanDine <ken.vandine@canonical.com>2011-01-14 10:53:50 -0600
commit500000a82b6785e2bf7732ee87f36c6a44d2767c (patch)
treefdac470fe96ff3f2f2ee1e70fcf093a8403915db /src/transport-menu-item.vala
parent412bffad64182bfae1e2408b89f9488f0da38481 (diff)
parent991d41fa7c9b5b51942f836ca68265513de6ef8c (diff)
downloadayatana-indicator-sound-500000a82b6785e2bf7732ee87f36c6a44d2767c.tar.gz
ayatana-indicator-sound-500000a82b6785e2bf7732ee87f36c6a44d2767c.tar.bz2
ayatana-indicator-sound-500000a82b6785e2bf7732ee87f36c6a44d2767c.zip
Import upstream version 0.5.6
Diffstat (limited to 'src/transport-menu-item.vala')
-rw-r--r--src/transport-menu-item.vala21
1 files changed, 15 insertions, 6 deletions
diff --git a/src/transport-menu-item.vala b/src/transport-menu-item.vala
index 0e4e6ee..e93f0bb 100644
--- a/src/transport-menu-item.vala
+++ b/src/transport-menu-item.vala
@@ -36,8 +36,8 @@ public class TransportMenuitem : PlayerItem
public TransportMenuitem(PlayerController parent)
{
- Object(item_type: MENUITEM_TYPE, owner: parent);
- this.property_set_int(MENUITEM_PLAY_STATE, 1);
+ Object(item_type: MENUITEM_TYPE, owner: parent);
+ this.property_set_int(MENUITEM_PLAY_STATE, 1);
}
public void change_play_state(state update)
@@ -47,11 +47,20 @@ public class TransportMenuitem : PlayerItem
this.property_set_int(MENUITEM_PLAY_STATE, update);
}
- public override void handle_event(string name, GLib.Value input_value, uint timestamp)
+ public override void handle_event(string name,
+ Variant input_value,
+ uint timestamp)
{
- int input = input_value.get_int();
- debug("handle_event with value %s", input.to_string());
- debug("transport owner name = %s", this.owner.app_info.get_name());
+ /*debug ( "Handle event in transport menu item - input variant is of type %s",
+ input_value.get_type_string() );*/
+ Variant v = input_value;
+ if ( input_value.is_of_type ( VariantType.VARIANT) ){
+ v = input_value.get_variant();
+ }
+
+ int32 input = v.get_int32();
+ debug("transport menu item -> handle_event with value %s", input.to_string());
+ //debug("transport owner name = %s", this.owner.app_info.get_name());
this.owner.mpris_bridge.transport_update((action)input);
}