From 76ef80de4f8f51d2907c24730387230f06d3fd63 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Thu, 14 Jan 2010 15:40:49 -0600 Subject: Actually unref'ing the dir and fixing the truth there. --- src/indicator-application.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/indicator-application.c b/src/indicator-application.c index d697d96..06159f9 100644 --- a/src/indicator-application.c +++ b/src/indicator-application.c @@ -347,6 +347,7 @@ application_removed (DBusGProxy * proxy, gint position, IndicatorApplication * a g_signal_emit(G_OBJECT(application), INDICATOR_OBJECT_SIGNAL_ENTRY_REMOVED_ID, 0, &(app->entry), TRUE); if (app->icon_path != NULL) { + theme_dir_unref(application, app->icon_path); g_free(app->icon_path); } if (app->entry.image != NULL) { @@ -457,10 +458,9 @@ static void theme_dir_ref(IndicatorApplication * ia, const gchar * dir) { IndicatorApplicationPrivate * priv = INDICATOR_APPLICATION_GET_PRIVATE(ia); - g_debug("\tAppending search path: %s", dir); int count = 0; - if ((count = GPOINTER_TO_INT(g_hash_table_lookup(priv->theme_dirs, dir))) == 0) { + if ((count = GPOINTER_TO_INT(g_hash_table_lookup(priv->theme_dirs, dir))) != 0) { /* It exists so what we need to do is increase the ref count of this dir. */ count++; @@ -468,6 +468,7 @@ theme_dir_ref(IndicatorApplication * ia, const gchar * dir) /* It doesn't exist, so we need to add it to the table and to the search path. */ gtk_icon_theme_append_search_path(gtk_icon_theme_get_default(), dir); + g_debug("\tAppending search path: %s", dir); count = 1; } -- cgit v1.2.3