From 16bdc89ecb9aa7e31d7efd8b34b0a632d4440f5e Mon Sep 17 00:00:00 2001 From: Conor Curran Date: Fri, 4 Mar 2011 14:30:17 +0000 Subject: iconthemepath work in progress --- src/sound-service-dbus.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/sound-service-dbus.c') diff --git a/src/sound-service-dbus.c b/src/sound-service-dbus.c index b493ce8..ce32beb 100644 --- a/src/sound-service-dbus.c +++ b/src/sound-service-dbus.c @@ -147,7 +147,10 @@ sound_service_dbus_create_root_item (SoundServiceDbus* self) SoundServiceDbusPrivate * priv = SOUND_SERVICE_DBUS_GET_PRIVATE(self); priv->root_menuitem = dbusmenu_menuitem_new(); g_debug("Root ID: %d", dbusmenu_menuitem_get_id(priv->root_menuitem)); - DbusmenuServer *server = dbusmenu_server_new(INDICATOR_SOUND_MENU_DBUS_OBJECT_PATH); + DbusmenuServer *server = dbusmenu_server_new (INDICATOR_SOUND_MENU_DBUS_OBJECT_PATH); + gchar** paths = {'/usr/share/banshee-1/icons'}; + dbusmenu_server_set_icon_paths (server, + g_strdupv(paths)); dbusmenu_server_set_root (server, priv->root_menuitem); g_object_unref (priv->root_menuitem); priv->active_sink = active_sink_new (self); -- cgit v1.2.3 From 0146cc8f82bca83ce7bff34ff412db762022ea06 Mon Sep 17 00:00:00 2001 From: Conor Curran Date: Fri, 4 Mar 2011 14:37:01 +0000 Subject: free the string array, plug the leaks --- src/sound-service-dbus.c | 1 + 1 file changed, 1 insertion(+) (limited to 'src/sound-service-dbus.c') diff --git a/src/sound-service-dbus.c b/src/sound-service-dbus.c index ce32beb..67c7e47 100644 --- a/src/sound-service-dbus.c +++ b/src/sound-service-dbus.c @@ -151,6 +151,7 @@ sound_service_dbus_create_root_item (SoundServiceDbus* self) gchar** paths = {'/usr/share/banshee-1/icons'}; dbusmenu_server_set_icon_paths (server, g_strdupv(paths)); + g_strfreev (paths); dbusmenu_server_set_root (server, priv->root_menuitem); g_object_unref (priv->root_menuitem); priv->active_sink = active_sink_new (self); -- cgit v1.2.3 From f01207e8ee86d4fd36cfefc1520be5b758799572 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Fri, 4 Mar 2011 09:51:30 -0600 Subject: Fix the GStrv to use a string and be NULL terminated --- src/sound-service-dbus.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/sound-service-dbus.c') diff --git a/src/sound-service-dbus.c b/src/sound-service-dbus.c index 67c7e47..580304f 100644 --- a/src/sound-service-dbus.c +++ b/src/sound-service-dbus.c @@ -148,10 +148,9 @@ sound_service_dbus_create_root_item (SoundServiceDbus* self) priv->root_menuitem = dbusmenu_menuitem_new(); g_debug("Root ID: %d", dbusmenu_menuitem_get_id(priv->root_menuitem)); DbusmenuServer *server = dbusmenu_server_new (INDICATOR_SOUND_MENU_DBUS_OBJECT_PATH); - gchar** paths = {'/usr/share/banshee-1/icons'}; + gchar* paths[] = {"/usr/share/banshee-1/icons", NULL}; dbusmenu_server_set_icon_paths (server, - g_strdupv(paths)); - g_strfreev (paths); + paths); dbusmenu_server_set_root (server, priv->root_menuitem); g_object_unref (priv->root_menuitem); priv->active_sink = active_sink_new (self); -- cgit v1.2.3 From 6b0f3ffcaf55d151d87f8dc60d16388b8f4557a2 Mon Sep 17 00:00:00 2001 From: Conor Curran Date: Fri, 11 Mar 2011 15:16:09 +0000 Subject: applied Mikkel's suggestions --- src/sound-service-dbus.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/sound-service-dbus.c') diff --git a/src/sound-service-dbus.c b/src/sound-service-dbus.c index 580304f..9e5cffe 100644 --- a/src/sound-service-dbus.c +++ b/src/sound-service-dbus.c @@ -148,7 +148,7 @@ sound_service_dbus_create_root_item (SoundServiceDbus* self) priv->root_menuitem = dbusmenu_menuitem_new(); g_debug("Root ID: %d", dbusmenu_menuitem_get_id(priv->root_menuitem)); DbusmenuServer *server = dbusmenu_server_new (INDICATOR_SOUND_MENU_DBUS_OBJECT_PATH); - gchar* paths[] = {"/usr/share/banshee-1/icons", NULL}; + const gchar* paths[] = {"/usr/share/banshee-1/icons", NULL}; dbusmenu_server_set_icon_paths (server, paths); dbusmenu_server_set_root (server, priv->root_menuitem); -- cgit v1.2.3