From 5819385d28106fd7f511fc4e8eb4960b46a5fc37 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Fri, 30 Sep 2011 17:54:29 +0200 Subject: simplify --- src/app-indicator.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'src/app-indicator.c') diff --git a/src/app-indicator.c b/src/app-indicator.c index 7b5e0f2..13c7ce4 100644 --- a/src/app-indicator.c +++ b/src/app-indicator.c @@ -1523,13 +1523,10 @@ status_icon_changes (AppIndicator * self, gpointer data) GtkStatusIcon * icon = GTK_STATUS_ICON(data); gchar *longname = NULL; - GtkIconTheme *icon_theme; + GtkIconTheme *icon_theme = gtk_icon_theme_get_default(); if (self->priv->icon_theme_path != NULL) { - icon_theme = gtk_icon_theme_new(); - gtk_icon_theme_prepend_search_path(icon_theme, self->priv->icon_theme_path); - } else { - icon_theme = gtk_icon_theme_get_default(); + gtk_icon_theme_append_search_path(icon_theme, self->priv->icon_theme_path); } switch (app_indicator_get_status(self)) { @@ -1563,9 +1560,6 @@ status_icon_changes (AppIndicator * self, gpointer data) if (longname) { g_free(longname); } - if (icon_theme != gtk_icon_theme_get_default()) { - g_object_unref(icon_theme); - } return; } -- cgit v1.2.3