aboutsummaryrefslogtreecommitdiff
path: root/src/transport-widget.c
diff options
context:
space:
mode:
authorConor Curran <conor.curran@canonical.com>2010-07-13 17:31:19 +0100
committerConor Curran <conor.curran@canonical.com>2010-07-13 17:31:19 +0100
commit3866f14c102eec187e6fddbb7cf470df148053a3 (patch)
treec173145667204b1b2bcc53cb86e35d70dad6e18d /src/transport-widget.c
parentec287ed34db17df23ab16d9199fbbb48bd6b246f (diff)
downloadayatana-indicator-sound-3866f14c102eec187e6fddbb7cf470df148053a3.tar.gz
ayatana-indicator-sound-3866f14c102eec187e6fddbb7cf470df148053a3.tar.bz2
ayatana-indicator-sound-3866f14c102eec187e6fddbb7cf470df148053a3.zip
button press background done
Diffstat (limited to 'src/transport-widget.c')
-rw-r--r--src/transport-widget.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/transport-widget.c b/src/transport-widget.c
index 9450ea5..da4f7ad 100644
--- a/src/transport-widget.c
+++ b/src/transport-widget.c
@@ -137,9 +137,7 @@ static gboolean
transport_widget_button_press_event (GtkWidget *menuitem,
GdkEventButton *event)
{
- if(IS_TRANSPORT_WIDGET(menuitem) == FALSE){
- return FALSE;
- }
+ g_return_val_if_fail(IS_TRANSPORT_WIDGET(menuitem), FALSE);
TransportWidgetPrivate * priv = TRANSPORT_WIDGET_GET_PRIVATE(TRANSPORT_WIDGET(menuitem));
@@ -155,6 +153,7 @@ transport_widget_button_press_event (GtkWidget *menuitem,
g_debug("TransportWidget::menu_press_event - going to send value %i", result);
g_value_set_int(&value, result);
dbusmenu_menuitem_handle_event (priv->twin_item, "Transport state change", &value, 0);
+ play_button_react_to_button_press(priv->play_button, result);
}
return TRUE;
}
@@ -165,9 +164,9 @@ transport_widget_button_release_event (GtkWidget *menuitem,
GdkEventButton *event)
{
g_debug("TransportWidget::menu_release_event");
- if(IS_TRANSPORT_WIDGET(menuitem) == FALSE){
- return FALSE;
- }
+ g_return_val_if_fail(IS_TRANSPORT_WIDGET(menuitem), FALSE);
+ TransportWidgetPrivate * priv = TRANSPORT_WIDGET_GET_PRIVATE(TRANSPORT_WIDGET(menuitem));
+ play_button_react_to_button_release(priv->play_button);
return TRUE;
}