aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/indicator-sound.c41
-rw-r--r--src/sound-service.c4
-rw-r--r--src/transport-widget.c1
3 files changed, 30 insertions, 16 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");
diff --git a/src/sound-service.c b/src/sound-service.c
index 2cb33d3..c1bb9b4 100644
--- a/src/sound-service.c
+++ b/src/sound-service.c
@@ -40,8 +40,8 @@ service_shutdown (IndicatorService *service, gpointer user_data)
{
if (mainloop != NULL) {
g_debug("Service shutdown !");
- close_pulse_activites();
- g_main_loop_quit(mainloop);
+ //close_pulse_activites();
+ //g_main_loop_quit(mainloop);
}
return;
}
diff --git a/src/transport-widget.c b/src/transport-widget.c
index 6ddd4bc..5c8e732 100644
--- a/src/transport-widget.c
+++ b/src/transport-widget.c
@@ -422,7 +422,6 @@ transport_widget_determine_button_event( TransportWidget* button,
//g_debug("event x coordinate = %f", event->x);
//g_debug("event y coordinate = %f", event->y);
TransportWidgetEvent button_event = TRANSPORT_NADA;
- // For now very simple rectangular collision detection
if(event->x > 67 && event->x < 112
&& event->y > 12 && event->y < 40){
button_event = TRANSPORT_PREVIOUS;