diff options
author | Conor Curran <conor.curran@canonical.com> | 2011-01-28 11:29:18 -0600 |
---|---|---|
committer | Conor Curran <conor.curran@canonical.com> | 2011-01-28 11:29:18 -0600 |
commit | 7cd90199beb0b10bfc22a669ca1954c16573abd5 (patch) | |
tree | 10e3774dc24b2fe4c15ece65d2498c986e025c32 /src/indicator-sound.c | |
parent | 6b2132fb4e700fe84a26adeac5126e8afbc507b3 (diff) | |
download | ayatana-indicator-sound-7cd90199beb0b10bfc22a669ca1954c16573abd5.tar.gz ayatana-indicator-sound-7cd90199beb0b10bfc22a669ca1954c16573abd5.tar.bz2 ayatana-indicator-sound-7cd90199beb0b10bfc22a669ca1954c16573abd5.zip |
deal with dbusmenu api changes
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"); |