diff options
author | Conor Curran <conor.curran@canonical.com> | 2010-11-15 13:17:22 +0000 |
---|---|---|
committer | Conor Curran <conor.curran@canonical.com> | 2010-11-15 13:17:22 +0000 |
commit | 41284d027bd0c0eeff0e83e10b365f98a6977f59 (patch) | |
tree | 5bf386df9dfcd316deafdfd218ec8c34aa599d30 /src/transport-widget.c | |
parent | 5fd2c5e12a059ab8c59306676d18dfc56c818077 (diff) | |
download | ayatana-indicator-sound-41284d027bd0c0eeff0e83e10b365f98a6977f59.tar.gz ayatana-indicator-sound-41284d027bd0c0eeff0e83e10b365f98a6977f59.tar.bz2 ayatana-indicator-sound-41284d027bd0c0eeff0e83e10b365f98a6977f59.zip |
keyboard handling for the transport controls underway
Diffstat (limited to 'src/transport-widget.c')
-rw-r--r-- | src/transport-widget.c | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/src/transport-widget.c b/src/transport-widget.c index 26b7a98..3329acc 100644 --- a/src/transport-widget.c +++ b/src/transport-widget.c @@ -270,7 +270,6 @@ transport_widget_button_release_event (GtkWidget *menuitem, g_return_val_if_fail(IS_TRANSPORT_WIDGET(menuitem), FALSE); TransportWidget* transport = TRANSPORT_WIDGET(menuitem); TransportWidgetPrivate * priv = TRANSPORT_WIDGET_GET_PRIVATE ( transport ); - TransportWidgetEvent result = transport_widget_determine_button_event ( transport, event ); if(result != TRANSPORT_NADA){ @@ -289,6 +288,26 @@ transport_widget_button_release_event (GtkWidget *menuitem, return TRUE; } +void +transport_widget_react_to_key_event ( TransportWidget* transport, + TransportWidgetEvent transport_event ) +{ + if(transport_event != TRANSPORT_NADA){ + TransportWidgetPrivate * priv = TRANSPORT_WIDGET_GET_PRIVATE ( transport ); + GValue value = {0}; + 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)transport_event); + dbusmenu_menuitem_handle_event ( priv->twin_item, + "Transport state change", + &value, + 0 ); + } + + transport_widget_react_to_button_release ( transport, + transport_event ); +} + static TransportWidgetEvent transport_widget_determine_button_event( TransportWidget* button, GdkEventButton* event ) |