aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/app-indicator.c17
1 files changed, 16 insertions, 1 deletions
diff --git a/src/app-indicator.c b/src/app-indicator.c
index 13c7ce4..285abd6 100644
--- a/src/app-indicator.c
+++ b/src/app-indicator.c
@@ -1523,10 +1523,25 @@ status_icon_changes (AppIndicator * self, gpointer data)
GtkStatusIcon * icon = GTK_STATUS_ICON(data);
gchar *longname = NULL;
+ /* add the icon_theme_path once if needed */
GtkIconTheme *icon_theme = gtk_icon_theme_get_default();
if (self->priv->icon_theme_path != NULL)
{
- gtk_icon_theme_append_search_path(icon_theme, self->priv->icon_theme_path);
+ gchar **path;
+ gint n_elements, i;
+ gboolean found=FALSE;
+ gtk_icon_theme_get_search_path(icon_theme, &path, &n_elements);
+ for (i=0; i< n_elements || path[i] == NULL; i++)
+ {
+ if(g_strcmp0(path[i], self->priv->icon_theme_path) == 0)
+ {
+ found=TRUE;
+ break;
+ }
+ }
+ if(!found)
+ gtk_icon_theme_append_search_path(icon_theme, self->priv->icon_theme_path);
+ g_strfreev (path);
}
switch (app_indicator_get_status(self)) {