diff options
author | Ken VanDine <ken.vandine@canonical.com> | 2010-07-29 11:26:41 -0400 |
---|---|---|
committer | Ken VanDine <ken.vandine@canonical.com> | 2010-07-29 11:26:41 -0400 |
commit | 986fc648fc6544aaa3bb40a17e1345e0247a4b57 (patch) | |
tree | da2904b0c642c44d65629a9657b550c2c26a7b08 /src/transport-widget.c | |
parent | 1777ee4291dc792ca3d4df087c8af23cd8458961 (diff) | |
parent | 859c48c87009fb12e0acc15fdeb8d69e42247176 (diff) | |
download | ayatana-indicator-sound-986fc648fc6544aaa3bb40a17e1345e0247a4b57.tar.gz ayatana-indicator-sound-986fc648fc6544aaa3bb40a17e1345e0247a4b57.tar.bz2 ayatana-indicator-sound-986fc648fc6544aaa3bb40a17e1345e0247a4b57.zip |
Import upstream version 0.3.9
Diffstat (limited to 'src/transport-widget.c')
-rw-r--r-- | src/transport-widget.c | 17 |
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); + } } /** |