aboutsummaryrefslogtreecommitdiff
path: root/src/transport-widget.c
diff options
context:
space:
mode:
authorConor Curran <conor.curran@canonical.com>2010-07-15 15:46:54 +0100
committerConor Curran <conor.curran@canonical.com>2010-07-15 15:46:54 +0100
commit42f71fbdeb2beb78a3c4381caaa75c66e5b1b6b4 (patch)
tree67d188d00f92f8c18b71bbb14a4a846356632a1a /src/transport-widget.c
parent858c43dbd4be74c8979bc778b83a1642784a7e02 (diff)
downloadayatana-indicator-sound-42f71fbdeb2beb78a3c4381caaa75c66e5b1b6b4.tar.gz
ayatana-indicator-sound-42f71fbdeb2beb78a3c4381caaa75c66e5b1b6b4.tar.bz2
ayatana-indicator-sound-42f71fbdeb2beb78a3c4381caaa75c66e5b1b6b4.zip
tidied up some enums using typedefs and some more bits and pieces
Diffstat (limited to 'src/transport-widget.c')
-rw-r--r--src/transport-widget.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/transport-widget.c b/src/transport-widget.c
index 17dfee1..3174afe 100644
--- a/src/transport-widget.c
+++ b/src/transport-widget.c
@@ -145,13 +145,13 @@ transport_widget_button_press_event (GtkWidget *menuitem,
parent = gtk_widget_get_parent (GTK_WIDGET (menuitem));
- gint result = determine_button_event(priv->play_button, event);
+ PlayButtonEvent result = determine_button_event(priv->play_button, event);
- if(result >= 0){
+ if(result != TRANSPORT_NADA){
GValue value = {0};
g_value_init(&value, G_TYPE_INT);
- g_debug("TransportWidget::menu_press_event - going to send value %i", result);
- g_value_set_int(&value, result);
+ 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);
}
@@ -181,7 +181,7 @@ transport_widget_property_update(DbusmenuMenuitem* item, gchar* property,
{
g_debug("transport_widget_update_state - with property %s", property);
TransportWidget* bar = (TransportWidget*)userdata;
- g_return_val_if_fail(IS_TRANSPORT_WIDGET(bar), FALSE);
+ g_return_if_fail(IS_TRANSPORT_WIDGET(bar));
TransportWidgetPrivate *priv = TRANSPORT_WIDGET_GET_PRIVATE(bar);
int update_value = g_value_get_int(value);