diff options
author | Conor Curran <conor.curran@canonical.com> | 2010-07-08 16:12:59 +0100 |
---|---|---|
committer | Conor Curran <conor.curran@canonical.com> | 2010-07-08 16:12:59 +0100 |
commit | e4f900efd1e48814a70e4351cc3d878312daef37 (patch) | |
tree | cbedf03dba7641079e1f7aa68b4c325a6d5044b3 /src/transport-widget.c | |
parent | 41747b032d2032c97fd7f1766157e2d846626880 (diff) | |
download | ayatana-indicator-sound-e4f900efd1e48814a70e4351cc3d878312daef37.tar.gz ayatana-indicator-sound-e4f900efd1e48814a70e4351cc3d878312daef37.tar.bz2 ayatana-indicator-sound-e4f900efd1e48814a70e4351cc3d878312daef37.zip |
event handling now plugged in crudely
Diffstat (limited to 'src/transport-widget.c')
-rw-r--r-- | src/transport-widget.c | 23 |
1 files changed, 17 insertions, 6 deletions
diff --git a/src/transport-widget.c b/src/transport-widget.c index 6d39a03..9852b50 100644 --- a/src/transport-widget.c +++ b/src/transport-widget.c @@ -132,13 +132,24 @@ transport_widget_button_press_event (GtkWidget *menuitem, return FALSE; } - //TransportWidgetPrivate * priv = TRANSPORT_WIDGET_GET_PRIVATE(TRANSPORT_WIDGET(menuitem)); + TransportWidgetPrivate * priv = TRANSPORT_WIDGET_GET_PRIVATE(TRANSPORT_WIDGET(menuitem)); - //GValue value = {0}; - //g_value_init(&value, G_TYPE_BOOLEAN); - //g_debug("TransportWidget::menu_press_event - going to send value %i", state); - //g_value_set_boolean(&value, state); - //dbusmenu_menuitem_handle_event (twin_item, "Transport state change", &value, 0); + GtkWidget *parent; + + // can we block emissions of "grab-notify" on parent?? + parent = gtk_widget_get_parent (GTK_WIDGET (menuitem)); + gint result = determine_button_event(priv->play_button, event); + + //GTK_OBJECT_FLAGS (scale) |= GTK_HAS_GRAB; + //gtk_widget_event (scale, + //((GdkEvent *)(void*)(event))); + //GTK_OBJECT_FLAGS (scale) &= ~(GTK_HAS_GRAB); + + 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); + dbusmenu_menuitem_handle_event (twin_item, "Transport state change", &value, 0); return TRUE; } |