aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/title-widget.c2
-rw-r--r--src/transport-menu-item.vala17
2 files changed, 14 insertions, 5 deletions
diff --git a/src/title-widget.c b/src/title-widget.c
index bbb5e6d..675c59f 100644
--- a/src/title-widget.c
+++ b/src/title-widget.c
@@ -154,7 +154,7 @@ title_widget_property_update(DbusmenuMenuitem* item, gchar* property,
TitleWidget* mitem = TITLE_WIDGET(userdata);
if(g_ascii_strcasecmp(DBUSMENU_TITLE_MENUITEM_NAME, property) == 0){
gtk_menu_item_set_label (GTK_MENU_ITEM(mitem),
- g_value_get_string(value));
+ g_variant_get_string(value, NULL));
}
else if(g_ascii_strcasecmp(DBUSMENU_TITLE_MENUITEM_ICON, property) == 0){
title_widget_set_icon (mitem);
diff --git a/src/transport-menu-item.vala b/src/transport-menu-item.vala
index 55ee3b3..e93f0bb 100644
--- a/src/transport-menu-item.vala
+++ b/src/transport-menu-item.vala
@@ -47,11 +47,20 @@ public class TransportMenuitem : PlayerItem
this.property_set_int(MENUITEM_PLAY_STATE, update);
}
- public override void handle_event(string name, Variant input_value, uint timestamp)
+ public override void handle_event(string name,
+ Variant input_value,
+ uint timestamp)
{
- int input = input_value.get_int32();
- 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);
}