diff options
author | Ted Gould <ted@gould.cx> | 2009-12-20 22:16:01 -0600 |
---|---|---|
committer | Ted Gould <ted@gould.cx> | 2009-12-20 22:16:01 -0600 |
commit | cd57997811b56c369eb3891ff0d92bc0cf503133 (patch) | |
tree | 4a97771fe2a7406bf574e0798845b9904774d0d8 /src | |
parent | 3915de95c9d64765cae653d02d124ca82127235e (diff) | |
download | ayatana-indicator-application-cd57997811b56c369eb3891ff0d92bc0cf503133.tar.gz ayatana-indicator-application-cd57997811b56c369eb3891ff0d92bc0cf503133.tar.bz2 ayatana-indicator-application-cd57997811b56c369eb3891ff0d92bc0cf503133.zip |
Appending the new icon path to the theme search.
Diffstat (limited to 'src')
-rw-r--r-- | src/indicator-application.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/indicator-application.c b/src/indicator-application.c index 02c13c8..e07386a 100644 --- a/src/indicator-application.c +++ b/src/indicator-application.c @@ -276,7 +276,12 @@ application_added (DBusGProxy * proxy, const gchar * iconname, gint position, co IndicatorApplicationPrivate * priv = INDICATOR_APPLICATION_GET_PRIVATE(application); ApplicationEntry * app = g_new(ApplicationEntry, 1); - app->icon_path = g_strdup(icon_path); + app->icon_path = NULL; + if (icon_path != NULL && icon_path[0] != '\0') { + app->icon_path = g_strdup(icon_path); + gtk_icon_theme_append_search_path(gtk_icon_theme_get_default(), app->icon_path); + } + app->entry.image = GTK_IMAGE(gtk_image_new_from_icon_name(iconname, GTK_ICON_SIZE_MENU)); app->entry.label = NULL; app->entry.menu = GTK_MENU(dbusmenu_gtkmenu_new((gchar *)dbusaddress, (gchar *)dbusobject)); |