diff options
Diffstat (limited to 'src/indicator-sound.c')
-rw-r--r-- | src/indicator-sound.c | 41 |
1 files changed, 28 insertions, 13 deletions
diff --git a/src/indicator-sound.c b/src/indicator-sound.c index 42560c8..8972844 100644 --- a/src/indicator-sound.c +++ b/src/indicator-sound.c @@ -77,19 +77,22 @@ static gboolean key_release_cb(GtkWidget* widget, GdkEventKey* event, gpointer d //custom widget realisation methods static gboolean new_volume_slider_widget (DbusmenuMenuitem * newitem, DbusmenuMenuitem * parent, - DbusmenuClient * client); + DbusmenuClient * client, + gboolean user_data); static gboolean new_transport_widget (DbusmenuMenuitem * newitem, DbusmenuMenuitem * parent, - DbusmenuClient * client); + DbusmenuClient * client, + gboolean user_data); static gboolean new_metadata_widget (DbusmenuMenuitem * newitem, DbusmenuMenuitem * parent, - DbusmenuClient * client); + DbusmenuClient * client, + gboolean user_data); static gboolean new_title_widget (DbusmenuMenuitem * newitem, DbusmenuMenuitem * parent, - DbusmenuClient * client); + DbusmenuClient * client, + gboolean user_data); // DBUS communication - static GDBusNodeInfo *node_info = NULL; static GDBusInterfaceInfo *interface_info = NULL; static void create_connection_to_service (GObject *source_object, @@ -185,10 +188,18 @@ get_menu (IndicatorObject * io) DbusmenuGtkClient *client = dbusmenu_gtkmenu_get_client(menu); g_object_set_data (G_OBJECT (client), "indicator", io); - dbusmenu_client_add_type_handler(DBUSMENU_CLIENT(client), DBUSMENU_VOLUME_MENUITEM_TYPE, new_volume_slider_widget); - dbusmenu_client_add_type_handler(DBUSMENU_CLIENT(client), DBUSMENU_TRANSPORT_MENUITEM_TYPE, new_transport_widget); - dbusmenu_client_add_type_handler(DBUSMENU_CLIENT(client), DBUSMENU_METADATA_MENUITEM_TYPE, new_metadata_widget); - dbusmenu_client_add_type_handler(DBUSMENU_CLIENT(client), DBUSMENU_TITLE_MENUITEM_TYPE, new_title_widget); + dbusmenu_client_add_type_handler (DBUSMENU_CLIENT(client), + DBUSMENU_VOLUME_MENUITEM_TYPE, + (DbusmenuClientTypeHandler)new_volume_slider_widget); + dbusmenu_client_add_type_handler (DBUSMENU_CLIENT(client), + DBUSMENU_TRANSPORT_MENUITEM_TYPE, + (DbusmenuClientTypeHandler)new_transport_widget); + dbusmenu_client_add_type_handler (DBUSMENU_CLIENT(client), + DBUSMENU_METADATA_MENUITEM_TYPE, + (DbusmenuClientTypeHandler)new_metadata_widget); + dbusmenu_client_add_type_handler (DBUSMENU_CLIENT(client), + DBUSMENU_TITLE_MENUITEM_TYPE, + (DbusmenuClientTypeHandler)new_title_widget); // Note: Not ideal but all key handling needs to be managed here and then // delegated to the appropriate widget. g_signal_connect (menu, "key-press-event", G_CALLBACK(key_press_cb), io); @@ -286,7 +297,8 @@ static void create_connection_to_service (GObject *source_object, static gboolean new_transport_widget (DbusmenuMenuitem * newitem, DbusmenuMenuitem * parent, - DbusmenuClient * client) + DbusmenuClient * client, + gboolean user_data) { g_debug("indicator-sound: new_transport_bar() called "); @@ -314,7 +326,8 @@ new_transport_widget (DbusmenuMenuitem * newitem, static gboolean new_metadata_widget (DbusmenuMenuitem * newitem, DbusmenuMenuitem * parent, - DbusmenuClient * client) + DbusmenuClient * client, + gboolean user_data) { g_debug("indicator-sound: new_metadata_widget"); @@ -335,7 +348,8 @@ new_metadata_widget (DbusmenuMenuitem * newitem, static gboolean new_title_widget(DbusmenuMenuitem * newitem, DbusmenuMenuitem * parent, - DbusmenuClient * client) + DbusmenuClient * client, + gboolean user_data) { g_return_val_if_fail(DBUSMENU_IS_MENUITEM(newitem), FALSE); g_return_val_if_fail(DBUSMENU_IS_GTKCLIENT(client), FALSE); @@ -358,7 +372,8 @@ new_title_widget(DbusmenuMenuitem * newitem, static gboolean new_volume_slider_widget(DbusmenuMenuitem * newitem, DbusmenuMenuitem * parent, - DbusmenuClient * client) + DbusmenuClient * client, + gboolean user_data) { g_debug("indicator-sound: new_volume_slider_widget"); |