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/playlists-menu-item.vala | 6 ++++++ src/sound-service-dbus.c | 5 ++++- src/sound-service.c | 4 ++-- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/src/playlists-menu-item.vala b/src/playlists-menu-item.vala index f4d7233..4ed6cf4 100644 --- a/src/playlists-menu-item.vala +++ b/src/playlists-menu-item.vala @@ -47,6 +47,12 @@ public class PlaylistsMenuitem : PlayerItem Dbusmenu.Menuitem menuitem = new Menuitem(); menuitem.property_set (MENUITEM_PROP_LABEL, detail.name); + + var icon_file = File.new_for_path (detail.icon_path); + if (icon_file.query_exists () == true) { + menuitem.property_set (MENUITEM_PROP_ICON_NAME, + icon_file.get_basename () ); + } menuitem.property_set (MENUITEM_PROP_ICON_NAME, detail.icon_path); menuitem.property_set (MENUITEM_PATH, (string)detail.path); menuitem.property_set_bool (MENUITEM_PROP_VISIBLE, true); 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); diff --git a/src/sound-service.c b/src/sound-service.c index c79b9f6..553f07a 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; -- cgit v1.2.3