aboutsummaryrefslogtreecommitdiff
path: root/src/transport-widget.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/transport-widget.c')
-rw-r--r--src/transport-widget.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/src/transport-widget.c b/src/transport-widget.c
index c616fff..702b472 100644
--- a/src/transport-widget.c
+++ b/src/transport-widget.c
@@ -118,8 +118,6 @@ transport_widget_finalize (GObject *object)
static gboolean
transport_widget_expose_event(GtkWidget* widget, GdkEventExpose* event)
{
- //TransportWidgetPrivate * priv = TRANSPORT_WIDGET_GET_PRIVATE(widget);
- //gtk_container_propagate_expose(GTK_CONTAINER(widget),priv->play_button, event);
return TRUE;
}
@@ -152,8 +150,8 @@ transport_widget_button_press_event (GtkWidget *menuitem,
g_value_init(&value, G_TYPE_INT);
g_debug("TransportWidget::menu_press_event - going to send value %i", (int)result);
g_value_set_int(&value, (int)result);
- dbusmenu_menuitem_handle_event (priv->twin_item, "Transport state change", &value, 0);
play_button_react_to_button_press(priv->play_button, result);
+ dbusmenu_menuitem_handle_event (priv->twin_item, "Transport state change", &value, 0);
}
return TRUE;
}
@@ -182,11 +180,14 @@ transport_widget_property_update(DbusmenuMenuitem* item, gchar* property,
g_debug("transport_widget_update_state - with property %s", property);
TransportWidget* bar = (TransportWidget*)userdata;
g_return_if_fail(IS_TRANSPORT_WIDGET(bar));
-
- TransportWidgetPrivate *priv = TRANSPORT_WIDGET_GET_PRIVATE(bar);
- int update_value = g_value_get_int(value);
- g_debug("transport_widget_update_state - with value %i", update_value);
- play_button_toggle_play_pause(priv->play_button, (PlayButtonState)update_value);
+
+ if(g_ascii_strcasecmp(DBUSMENU_TRANSPORT_MENUITEM_PLAY_STATE, property) == 0)
+ {
+ TransportWidgetPrivate *priv = TRANSPORT_WIDGET_GET_PRIVATE(bar);
+ int update_value = g_value_get_int(value);
+ g_debug("transport_widget_update_state - with value %i", update_value);
+ play_button_toggle_play_pause(priv->play_button, (PlayButtonState)update_value);
+ }
}
/**