[gimp] Revert "app: prepend the selected icon theme path to the search path..."
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] Revert "app: prepend the selected icon theme path to the search path..."
- Date: Wed, 9 Dec 2015 23:30:02 +0000 (UTC)
commit c700d2993dd4688c08fc5228382661f2e9388b88
Author: Michael Natterer <mitch gimp org>
Date: Thu Dec 10 00:29:32 2015 +0100
Revert "app: prepend the selected icon theme path to the search path..."
Don't infinitely prepend search paths when changing themes.
This reverts commit 6fe8f75f5dc5870741cdcd54f82a242da864c58c.
app/gui/icon-themes.c | 21 +++++++++++++++------
1 files changed, 15 insertions(+), 6 deletions(-)
---
diff --git a/app/gui/icon-themes.c b/app/gui/icon-themes.c
index 6ffc0f4..c148b52 100644
--- a/app/gui/icon-themes.c
+++ b/app/gui/icon-themes.c
@@ -204,8 +204,8 @@ icons_apply_theme (Gimp *gimp,
const gchar *icon_theme_name)
{
GtkIconTheme *icon_theme;
- GFile *icon_theme_dir;
- gchar *icon_theme_path;
+ gchar **paths;
+ gint n_paths;
g_return_if_fail (GIMP_IS_GIMP (gimp));
@@ -217,11 +217,20 @@ icons_apply_theme (Gimp *gimp,
icon_theme = gtk_icon_theme_get_default ();
- icon_theme_dir = icon_themes_get_theme_dir (gimp, icon_theme_name);
- icon_theme_path = g_file_get_path(icon_theme_dir);
+ gtk_icon_theme_get_search_path (icon_theme, &paths, &n_paths);
- gtk_icon_theme_prepend_search_path (icon_theme, icon_theme_path);
- g_free (icon_theme_path);
+ if (paths)
+ {
+ GFile *icon_theme_dir = icon_themes_get_theme_dir (gimp, icon_theme_name);
+
+ g_free (paths[0]);
+ paths[0] = g_file_get_path (icon_theme_dir);
+
+ gtk_icon_theme_set_search_path (icon_theme,
+ (const gchar **) paths, n_paths);
+
+ g_strfreev (paths);
+ }
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]