[gimp] Bug 759105 - Patch to add icon theme selection



commit 6762bf5b9be9eeb3a8f214647f1460152e227af1
Author: Benoit Touchette <draekko sofware gmail com>
Date:   Tue Dec 8 14:52:12 2015 -0500

    Bug 759105 - Patch to add icon theme selection
    
    Add support for custom icon themes much like custom theme
    support. There is still work to be done but this is the
    basic functionality.

 app/config/gimpguiconfig.c         |   30 ++++
 app/config/gimpguiconfig.h         |    2 +
 app/config/gimprc-blurbs.h         |    6 +
 app/core/gimp-gui.c                |   12 ++
 app/core/gimp-gui.h                |    2 +
 app/core/gimp-user-install.c       |    1 +
 app/dialogs/preferences-dialog.c   |  112 +++++++++++++++-
 app/gui/Makefile.am                |    2 +
 app/gui/gui-vtable.c               |    9 ++
 app/gui/gui.c                      |    3 +
 app/gui/icon-themes.c              |  261 ++++++++++++++++++++++++++++++++++++
 app/gui/icon-themes.h              |   34 +++++
 app/widgets/gimphelp-ids.h         |    2 +
 icons/16/gimp-prefs-icon-theme.png |  Bin 0 -> 492 bytes
 icons/16/gimp-prefs-icon-theme.svg |  196 +++++++++++++++++++++++++++
 icons/22/gimp-prefs-icon-theme.png |  Bin 0 -> 653 bytes
 icons/22/gimp-prefs-icon-theme.svg |  202 ++++++++++++++++++++++++++++
 icons/Makefile.am                  |   30 +++--
 libgimpwidgets/gimpstock.c         |    7 +-
 19 files changed, 895 insertions(+), 16 deletions(-)
---
diff --git a/app/config/gimpguiconfig.c b/app/config/gimpguiconfig.c
index 833cb0f..c11f6b4 100644
--- a/app/config/gimpguiconfig.c
+++ b/app/config/gimpguiconfig.c
@@ -40,6 +40,7 @@
 #endif
 
 #define DEFAULT_THEME          "Default"
+#define DEFAULT_ICON_THEME     "Default"
 
 #define DEFAULT_USER_MANUAL_ONLINE_URI \
   "http://docs.gimp.org/"; GIMP_APP_VERSION_STRING
@@ -69,6 +70,8 @@ enum
   PROP_TOOLBOX_WILBER,
   PROP_THEME_PATH,
   PROP_THEME,
+  PROP_ICON_THEME_PATH,
+  PROP_ICON_THEME,
   PROP_USE_HELP,
   PROP_SHOW_HELP_BUTTON,
   PROP_HELP_LOCALES,
@@ -228,6 +231,17 @@ gimp_gui_config_class_init (GimpGuiConfigClass *klass)
                                    "theme", THEME_BLURB,
                                    DEFAULT_THEME,
                                    GIMP_PARAM_STATIC_STRINGS);
+  path = gimp_config_build_data_path ("icons");
+  GIMP_CONFIG_INSTALL_PROP_PATH (object_class, PROP_ICON_THEME_PATH,
+                                 "icon-theme-path", ICON_THEME_PATH_BLURB,
+                                 GIMP_CONFIG_PATH_DIR_LIST, path,
+                                 GIMP_PARAM_STATIC_STRINGS |
+                                 GIMP_CONFIG_PARAM_RESTART);
+  g_free (path);
+  GIMP_CONFIG_INSTALL_PROP_STRING (object_class, PROP_ICON_THEME,
+                                   "icon-theme", ICON_THEME_BLURB,
+                                   DEFAULT_ICON_THEME,
+                                   GIMP_PARAM_STATIC_STRINGS);
   GIMP_CONFIG_INSTALL_PROP_BOOLEAN (object_class, PROP_USE_HELP,
                                     "use-help", USE_HELP_BLURB,
                                     TRUE,
@@ -394,6 +408,8 @@ gimp_gui_config_finalize (GObject *object)
 
   g_free (gui_config->theme_path);
   g_free (gui_config->theme);
+  g_free (gui_config->icon_theme_path);
+  g_free (gui_config->icon_theme);
   g_free (gui_config->help_locales);
   g_free (gui_config->web_browser);
   g_free (gui_config->user_manual_online_uri);
@@ -476,6 +492,14 @@ gimp_gui_config_set_property (GObject      *object,
       g_free (gui_config->theme);
       gui_config->theme = g_value_dup_string (value);
       break;
+     case PROP_ICON_THEME_PATH:
+      g_free (gui_config->icon_theme_path);
+      gui_config->icon_theme_path = g_value_dup_string (value);
+      break;
+    case PROP_ICON_THEME:
+      g_free (gui_config->icon_theme);
+      gui_config->icon_theme = g_value_dup_string (value);
+      break;
     case PROP_USE_HELP:
       gui_config->use_help = g_value_get_boolean (value);
       break;
@@ -625,6 +649,12 @@ gimp_gui_config_get_property (GObject    *object,
     case PROP_THEME:
       g_value_set_string (value, gui_config->theme);
       break;
+    case PROP_ICON_THEME_PATH:
+      g_value_set_string (value, gui_config->icon_theme_path);
+      break;
+    case PROP_ICON_THEME:
+      g_value_set_string (value, gui_config->icon_theme);
+      break;
     case PROP_USE_HELP:
       g_value_set_boolean (value, gui_config->use_help);
       break;
diff --git a/app/config/gimpguiconfig.h b/app/config/gimpguiconfig.h
index 2452f3e..642025d 100644
--- a/app/config/gimpguiconfig.h
+++ b/app/config/gimpguiconfig.h
@@ -58,6 +58,8 @@ struct _GimpGuiConfig
   gboolean             toolbox_wilber;
   gchar               *theme_path;
   gchar               *theme;
+  gchar               *icon_theme_path;
+  gchar               *icon_theme;
   gboolean             use_help;
   gboolean             show_help_button;
   gchar               *help_locales;
diff --git a/app/config/gimprc-blurbs.h b/app/config/gimprc-blurbs.h
index 70e216a..76a4ab5 100644
--- a/app/config/gimprc-blurbs.h
+++ b/app/config/gimprc-blurbs.h
@@ -431,6 +431,12 @@ _("Sets the folder for temporary storage. Files will appear here " \
 #define THEME_PATH_BLURB \
 "Sets the theme search path."
 
+#define ICON_THEME_BLURB \
+"The name of the icon theme to use."
+
+#define ICON_THEME_PATH_BLURB \
+"Sets the icon theme search path."
+
 #define THUMBNAIL_SIZE_BLURB \
 _("Sets the size of the thumbnail shown in the Open dialog.")
 
diff --git a/app/core/gimp-gui.c b/app/core/gimp-gui.c
index 7ef7b5e..2988ce6 100644
--- a/app/core/gimp-gui.c
+++ b/app/core/gimp-gui.c
@@ -52,6 +52,7 @@ gimp_gui_init (Gimp *gimp)
   gimp->gui.get_display_name       = NULL;
   gimp->gui.get_user_time          = NULL;
   gimp->gui.get_theme_dir          = NULL;
+  gimp->gui.get_icon_theme_dir     = NULL;
   gimp->gui.display_get_by_id      = NULL;
   gimp->gui.display_get_id         = NULL;
   gimp->gui.display_get_window_id  = NULL;
@@ -266,6 +267,17 @@ gimp_get_theme_dir (Gimp *gimp)
   return NULL;
 }
 
+GFile *
+gimp_get_icon_theme_dir (Gimp *gimp)
+{
+  g_return_val_if_fail (GIMP_IS_GIMP (gimp), NULL);
+
+  if (gimp->gui.get_icon_theme_dir)
+    return gimp->gui.get_icon_theme_dir (gimp);
+
+  return NULL;
+}
+
 GimpObject *
 gimp_get_window_strategy (Gimp *gimp)
 {
diff --git a/app/core/gimp-gui.h b/app/core/gimp-gui.h
index 0f056a0..a485093 100644
--- a/app/core/gimp-gui.h
+++ b/app/core/gimp-gui.h
@@ -49,6 +49,7 @@ struct _GimpGui
   guint32        (* get_user_time)          (Gimp                *gimp);
 
   GFile        * (* get_theme_dir)          (Gimp                *gimp);
+  GFile        * (* get_icon_theme_dir)     (Gimp                *gimp);
 
   GimpObject   * (* get_window_strategy)    (Gimp                *gimp);
   GimpObject   * (* get_empty_display)      (Gimp                *gimp);
@@ -159,6 +160,7 @@ gchar        * gimp_get_display_name       (Gimp                *gimp,
                                             gint                *monitor);
 guint32        gimp_get_user_time          (Gimp                *gimp);
 GFile        * gimp_get_theme_dir          (Gimp                *gimp);
+GFile        * gimp_get_icon_theme_dir     (Gimp                *gimp);
 
 gboolean       gimp_pdb_dialog_new         (Gimp                *gimp,
                                             GimpContext         *context,
diff --git a/app/core/gimp-user-install.c b/app/core/gimp-user-install.c
index a752cd6..c87484c 100644
--- a/app/core/gimp-user-install.c
+++ b/app/core/gimp-user-install.c
@@ -102,6 +102,7 @@ gimp_user_install_items[] =
   { "scripts",         USER_INSTALL_MKDIR },
   { "templates",       USER_INSTALL_MKDIR },
   { "themes",          USER_INSTALL_MKDIR },
+  { "icons",           USER_INSTALL_MKDIR },
   { "tmp",             USER_INSTALL_MKDIR },
   { "curves",          USER_INSTALL_MKDIR },
   { "levels",          USER_INSTALL_MKDIR },
diff --git a/app/dialogs/preferences-dialog.c b/app/dialogs/preferences-dialog.c
index 5a2f278..49d6616 100644
--- a/app/dialogs/preferences-dialog.c
+++ b/app/dialogs/preferences-dialog.c
@@ -60,6 +60,7 @@
 #include "tools/gimp-tools.h"
 
 #include "gui/session.h"
+#include "gui/icon-themes.h"
 #include "gui/themes.h"
 
 #include "preferences-dialog.h"
@@ -723,7 +724,7 @@ prefs_theme_select_callback (GtkTreeSelection *sel,
       GValue val = { 0, };
 
       gtk_tree_model_get_value (model, &iter, 0, &val);
-      g_object_set (gimp->config, "theme", g_value_get_string (&val), NULL);
+      g_object_set_property (G_OBJECT (gimp->config), "theme", &val);
       g_value_unset (&val);
     }
 }
@@ -735,6 +736,24 @@ prefs_theme_reload_callback (GtkWidget *button,
   g_object_notify (G_OBJECT (gimp->config), "theme");
 }
 
+static void
+prefs_icon_theme_select_callback (GtkTreeSelection *sel,
+                                  Gimp             *gimp)
+{
+  GtkTreeModel *model;
+  GtkTreeIter   iter;
+
+  if (gtk_tree_selection_get_selected (sel, &model, &iter))
+    {
+      GtkWidget *dialog;
+      GValue     val = { 0, };
+
+      gtk_tree_model_get_value (model, &iter, 0, &val);
+      g_object_set_property (G_OBJECT (gimp->config), "icon-theme", &val);
+      g_value_unset (&val);
+    }
+}
+
 static GtkWidget *
 prefs_frame_new (const gchar  *label,
                  GtkContainer *parent,
@@ -1661,6 +1680,97 @@ prefs_dialog_new (Gimp       *gimp,
                     gimp);
 
 
+  /****************/
+  /*  Icon Theme  */
+  /****************/
+  pixbuf = prefs_get_pixbufs (dialog, "icon-theme", &small_pixbuf);
+  vbox = gimp_prefs_box_add_page (GIMP_PREFS_BOX (prefs_box),
+                                  _("Icon Theme"),
+                                  pixbuf,
+                                  NULL,
+                                  small_pixbuf,
+                                  GIMP_HELP_PREFS_ICON_THEME,
+                                  NULL,
+                                  &top_iter);
+
+  vbox2 = prefs_frame_new (_("Select an Icon Theme"), GTK_CONTAINER (vbox), TRUE);
+
+  {
+    GtkWidget         *scrolled_win;
+    GtkListStore      *list_store;
+    GtkWidget         *view;
+    GtkTreeSelection  *sel;
+    gchar            **icon_themes;
+    gint               n_icon_themes;
+    gint               i;
+
+    scrolled_win = gtk_scrolled_window_new (NULL, NULL);
+    gtk_widget_set_size_request (scrolled_win, -1, 80);
+    gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scrolled_win),
+                                         GTK_SHADOW_IN);
+    gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolled_win),
+                                    GTK_POLICY_NEVER,
+                                    GTK_POLICY_AUTOMATIC);
+    gtk_box_pack_start (GTK_BOX (vbox2), scrolled_win, TRUE, TRUE, 0);
+    gtk_widget_show (scrolled_win);
+
+    list_store = gtk_list_store_new (2, G_TYPE_STRING, G_TYPE_STRING);
+
+    view = gtk_tree_view_new_with_model (GTK_TREE_MODEL (list_store));
+    gtk_container_add (GTK_CONTAINER (scrolled_win), view);
+    gtk_widget_show (view);
+
+    g_object_unref (list_store);
+
+    gtk_tree_view_insert_column_with_attributes (GTK_TREE_VIEW (view), 0,
+                                                 _("Icon Theme"),
+                                                 gtk_cell_renderer_text_new (),
+                                                 "text", 0,
+                                                 NULL);
+    gtk_tree_view_insert_column_with_attributes (GTK_TREE_VIEW (view), 1,
+                                                 _("Folder"),
+                                                 gtk_cell_renderer_text_new (),
+                                                 "text", 1,
+                                                 NULL);
+
+    sel = gtk_tree_view_get_selection (GTK_TREE_VIEW (view));
+
+    icon_themes = icon_themes_list_themes (gimp, &n_icon_themes);
+
+    for (i = 0; i < n_icon_themes; i++)
+      {
+        GtkTreeIter  iter;
+        GFile       *icon_theme_dir = icon_themes_get_theme_dir (gimp, icon_themes[i]);
+
+        gtk_list_store_append (list_store, &iter);
+        gtk_list_store_set (list_store, &iter,
+                            0, icon_themes[i],
+                            1, gimp_file_get_utf8_name (icon_theme_dir),
+                            -1);
+
+        if (GIMP_GUI_CONFIG (object)->icon_theme &&
+            ! strcmp (GIMP_GUI_CONFIG (object)->icon_theme, icon_themes[i]))
+          {
+            GtkTreePath *path;
+
+            path = gtk_tree_model_get_path (GTK_TREE_MODEL (list_store), &iter);
+
+            gtk_tree_view_set_cursor (GTK_TREE_VIEW (view), path, NULL, FALSE);
+            gtk_tree_view_scroll_to_cell (GTK_TREE_VIEW (view), path,
+                                          NULL, FALSE, 0.0, 0.0);
+
+            gtk_tree_path_free (path);
+          }
+      }
+
+    g_strfreev (icon_themes);
+
+    g_signal_connect (sel, "changed",
+                      G_CALLBACK (prefs_icon_theme_select_callback),
+                      gimp);
+  }
+
+
   /*****************/
   /*  Help System  */
   /*****************/
diff --git a/app/gui/Makefile.am b/app/gui/Makefile.am
index a97a3cf..0ea4d0d 100644
--- a/app/gui/Makefile.am
+++ b/app/gui/Makefile.am
@@ -35,6 +35,8 @@ libappgui_a_sources = \
        gui-vtable.c            \
        gui-vtable.h            \
        gui-types.h             \
+       icon-themes.c           \
+       icon-themes.h           \
        session.c               \
        session.h               \
        splash.c                \
diff --git a/app/gui/gui-vtable.c b/app/gui/gui-vtable.c
index 9a16bdc..6a2d292 100644
--- a/app/gui/gui-vtable.c
+++ b/app/gui/gui-vtable.c
@@ -81,6 +81,7 @@
 #include "gui.h"
 #include "gui-message.h"
 #include "gui-vtable.h"
+#include "icon-themes.h"
 #include "themes.h"
 
 
@@ -105,6 +106,7 @@ static gchar        * gui_get_display_name       (Gimp                *gimp,
                                                   gint                *monitor);
 static guint32        gui_get_user_time          (Gimp                *gimp);
 static GFile        * gui_get_theme_dir          (Gimp                *gimp);
+static GFile        * gui_get_icon_theme_dir     (Gimp                *gimp);
 static GimpObject   * gui_get_window_strategy    (Gimp                *gimp);
 static GimpObject   * gui_get_empty_display      (Gimp                *gimp);
 static GimpObject   * gui_display_get_by_ID      (Gimp                *gimp,
@@ -176,6 +178,7 @@ gui_vtable_init (Gimp *gimp)
   gimp->gui.get_display_name       = gui_get_display_name;
   gimp->gui.get_user_time          = gui_get_user_time;
   gimp->gui.get_theme_dir          = gui_get_theme_dir;
+  gimp->gui.get_icon_theme_dir     = gui_get_icon_theme_dir;
   gimp->gui.get_window_strategy    = gui_get_window_strategy;
   gimp->gui.get_empty_display      = gui_get_empty_display;
   gimp->gui.display_get_by_id      = gui_display_get_by_ID;
@@ -306,6 +309,12 @@ gui_get_theme_dir (Gimp *gimp)
   return themes_get_theme_dir (gimp, GIMP_GUI_CONFIG (gimp->config)->theme);
 }
 
+static GFile *
+gui_get_icon_theme_dir (Gimp *gimp)
+{
+  return icon_themes_get_theme_dir (gimp, GIMP_GUI_CONFIG (gimp->config)->icon_theme);
+}
+
 static GimpObject *
 gui_get_window_strategy (Gimp *gimp)
 {
diff --git a/app/gui/gui.c b/app/gui/gui.c
index f3d7af5..e2f4441 100644
--- a/app/gui/gui.c
+++ b/app/gui/gui.c
@@ -74,6 +74,7 @@
 #include "gui.h"
 #include "gui-unique.h"
 #include "gui-vtable.h"
+#include "icon-themes.h"
 #include "session.h"
 #include "splash.h"
 #include "themes.h"
@@ -234,6 +235,8 @@ gui_init (Gimp     *gimp,
 
   themes_init (gimp);
 
+  icon_themes_init (gimp);
+
   initial_monitor = gimp_get_monitor_at_pointer (&initial_screen);
   gtk_widget_set_default_colormap (gdk_screen_get_rgb_colormap (initial_screen));
 
diff --git a/app/gui/icon-themes.c b/app/gui/icon-themes.c
new file mode 100644
index 0000000..c148b52
--- /dev/null
+++ b/app/gui/icon-themes.c
@@ -0,0 +1,261 @@
+/* GIMP - The GNU Image Manipulation Program
+ * Copyright (C) 1995 Spencer Kimball and Peter Mattis
+ *
+ * icon-themes.c
+ * Copyright (C) 2015 Benoit Touchette
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "config.h"
+
+#include <stdlib.h>
+
+#include <gegl.h>
+#include <gtk/gtk.h>
+
+#include "libgimpbase/gimpbase.h"
+#include "libgimpconfig/gimpconfig.h"
+#include "libgimpwidgets/gimpwidgets.h"
+
+#include "gui-types.h"
+
+#include "config/gimpguiconfig.h"
+
+#include "core/gimp.h"
+
+#include "icon-themes.h"
+
+#include "gimp-intl.h"
+
+
+static void   icons_list_icons_foreach  (gpointer       key,
+                                         gpointer       value,
+                                         gpointer       data);
+static gint   icons_name_compare        (const void    *p1,
+                                         const void    *p2);
+static void   icons_theme_change_notify (GimpGuiConfig *config,
+                                         GParamSpec    *pspec,
+                                         Gimp          *gimp);
+void          icons_set_icon_theme      (GtkIconTheme  *new_icon_theme);
+static void   icons_apply_theme         (Gimp          *gimp,
+                                         const gchar   *icon_theme_name);
+
+
+static GHashTable *icon_themes_hash = NULL;
+
+
+void
+icon_themes_init (Gimp *gimp)
+{
+  GimpGuiConfig *config;
+
+  g_return_if_fail (GIMP_IS_GIMP (gimp));
+
+  config = GIMP_GUI_CONFIG (gimp->config);
+
+  icon_themes_hash = g_hash_table_new_full (g_str_hash,
+                                            g_str_equal,
+                                            g_free,
+                                            g_object_unref);
+
+  if (config->icon_theme_path)
+    {
+      GList *path;
+      GList *list;
+
+      path = gimp_config_path_expand_to_files (config->icon_theme_path, NULL);
+
+      for (list = path; list; list = g_list_next (list))
+        {
+          GFile           *dir = list->data;
+          GFileEnumerator *enumerator;
+
+          enumerator =
+            g_file_enumerate_children (dir,
+                                       G_FILE_ATTRIBUTE_STANDARD_NAME ","
+                                       G_FILE_ATTRIBUTE_STANDARD_IS_HIDDEN ","
+                                       G_FILE_ATTRIBUTE_STANDARD_TYPE,
+                                       G_FILE_QUERY_INFO_NONE,
+                                       NULL, NULL);
+
+          if (enumerator)
+            {
+              GFileInfo *info;
+
+              while ((info = g_file_enumerator_next_file (enumerator,
+                                                          NULL, NULL)))
+                {
+                  if (! g_file_info_get_is_hidden (info) &&
+                      g_file_info_get_file_type (info) == G_FILE_TYPE_DIRECTORY)
+                    {
+                      GFile *file;
+                      GFile *index_theme;
+
+                      file = g_file_enumerator_get_child (enumerator, info);
+
+                      /* make sure there is a index.theme file */
+                      index_theme = g_file_get_child (file, "index.theme");
+
+                      if (index_theme)
+                        {
+                          const gchar *name;
+                          gchar       *basename;
+
+                          g_object_unref (index_theme);
+
+                          name     = gimp_file_get_utf8_name (file);
+                          basename = g_path_get_basename (name);
+
+                          if (gimp->be_verbose)
+                            g_print ("Adding icon theme '%s' (%s)\n",
+                                     basename, name);
+
+                          g_hash_table_insert (icon_themes_hash, basename, file);
+                        }
+                    }
+
+                  g_object_unref (info);
+                }
+
+              g_object_unref (enumerator);
+            }
+        }
+
+      g_list_free_full (path, (GDestroyNotify) g_object_unref);
+    }
+
+  g_signal_connect (config, "notify::icon-theme",
+                    G_CALLBACK (icons_theme_change_notify),
+                    gimp);
+
+  icons_theme_change_notify (config, NULL, gimp);
+}
+
+void
+icon_themes_exit (Gimp *gimp)
+{
+  g_return_if_fail (GIMP_IS_GIMP (gimp));
+
+  if (icon_themes_hash)
+    {
+      g_signal_handlers_disconnect_by_func (gimp->config,
+                                            icons_theme_change_notify,
+                                            gimp);
+
+      g_hash_table_destroy (icon_themes_hash);
+      icon_themes_hash = NULL;
+    }
+}
+
+gchar **
+icon_themes_list_themes (Gimp *gimp,
+                         gint *n_icon_themes)
+{
+  g_return_val_if_fail (GIMP_IS_GIMP (gimp), NULL);
+  g_return_val_if_fail (n_icon_themes != NULL, NULL);
+
+  *n_icon_themes = g_hash_table_size (icon_themes_hash);
+
+  if (*n_icon_themes > 0)
+    {
+      gchar **icon_themes;
+      gchar **index;
+
+      icon_themes = g_new0 (gchar *, *n_icon_themes + 1);
+
+      index = icon_themes;
+
+      g_hash_table_foreach (icon_themes_hash, icons_list_icons_foreach, &index);
+
+      qsort (icon_themes, *n_icon_themes, sizeof (gchar *), icons_name_compare);
+
+      return icon_themes;
+    }
+
+  return NULL;
+}
+
+GFile *
+icon_themes_get_theme_dir (Gimp        *gimp,
+                           const gchar *icon_theme_name)
+{
+  g_return_val_if_fail (GIMP_IS_GIMP (gimp), NULL);
+
+  if (! icon_theme_name)
+    icon_theme_name = "Default";
+
+  return g_hash_table_lookup (icon_themes_hash, icon_theme_name);
+}
+
+static void
+icons_apply_theme (Gimp        *gimp,
+                   const gchar *icon_theme_name)
+{
+  GtkIconTheme  *icon_theme;
+  gchar        **paths;
+  gint           n_paths;
+
+  g_return_if_fail (GIMP_IS_GIMP (gimp));
+
+  if (! icon_theme_name)
+    icon_theme_name = "Default";
+
+  if (gimp->be_verbose)
+    g_print ("Loading icon theme '%s'\n", icon_theme_name);
+
+  icon_theme = gtk_icon_theme_get_default ();
+
+  gtk_icon_theme_get_search_path (icon_theme, &paths, &n_paths);
+
+  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
+icons_list_icons_foreach (gpointer key,
+                          gpointer value,
+                          gpointer data)
+{
+  gchar ***index = data;
+
+  **index = g_strdup ((gchar *) key);
+
+  (*index)++;
+}
+
+static gint
+icons_name_compare (const void *p1,
+                     const void *p2)
+{
+  return strcmp (* (char **) p1, * (char **) p2);
+}
+
+static void
+icons_theme_change_notify (GimpGuiConfig *config,
+                           GParamSpec    *pspec,
+                           Gimp          *gimp)
+{
+  icons_apply_theme (gimp, config->icon_theme);
+}
diff --git a/app/gui/icon-themes.h b/app/gui/icon-themes.h
new file mode 100644
index 0000000..9192cb2
--- /dev/null
+++ b/app/gui/icon-themes.h
@@ -0,0 +1,34 @@
+/* GIMP - The GNU Image Manipulation Program
+ * Copyright (C) 1995 Spencer Kimball and Peter Mattis
+ *
+ * icon-themes.h
+ * Copyright (C) 2015 Benoit Touchette
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef __ICONS_THEMES_H__
+#define __ICONS_THEMES_H__
+
+
+void     icon_themes_init          (Gimp        *gimp);
+void     icon_themes_exit          (Gimp        *gimp);
+
+gchar ** icon_themes_list_themes   (Gimp        *gimp,
+                                    gint        *n_themes);
+GFile  * icon_themes_get_theme_dir (Gimp        *gimp,
+                                    const gchar *theme_name);
+
+
+#endif /* __ICONS_THEMES_H__ */
diff --git a/app/widgets/gimphelp-ids.h b/app/widgets/gimphelp-ids.h
index 9c55061..9ea7fcf 100644
--- a/app/widgets/gimphelp-ids.h
+++ b/app/widgets/gimphelp-ids.h
@@ -473,6 +473,7 @@
 #define GIMP_HELP_PREFS_INTERFACE                 "gimp-prefs-interface"
 #define GIMP_HELP_PREFS_HELP                      "gimp-prefs-help"
 #define GIMP_HELP_PREFS_THEME                     "gimp-prefs-theme"
+#define GIMP_HELP_PREFS_ICON_THEME                "gimp-prefs-icon-theme"
 #define GIMP_HELP_PREFS_TOOL_OPTIONS              "gimp-prefs-tool-options"
 #define GIMP_HELP_PREFS_TOOLBOX                   "gimp-prefs-toolbox"
 #define GIMP_HELP_PREFS_INPUT_DEVICES             "gimp-prefs-input-devices"
@@ -501,6 +502,7 @@
 #define GIMP_HELP_PREFS_FOLDERS_INTERPRETERS      "gimp-prefs-folders-interpreters"
 #define GIMP_HELP_PREFS_FOLDERS_ENVIRONMENT       "gimp-prefs-folders-environment"
 #define GIMP_HELP_PREFS_FOLDERS_THEMES            "gimp-prefs-folders-themes"
+#define GIMP_HELP_PREFS_FOLDERS_ICON_THEMES       "gimp-prefs-folders-icon-themes"
 
 #define GIMP_HELP_INPUT_DEVICES                   "gimp-help-input-devices"
 #define GIMP_HELP_KEYBOARD_SHORTCUTS              "gimp-help-keyboard-shortcuts"
diff --git a/icons/16/gimp-prefs-icon-theme.png b/icons/16/gimp-prefs-icon-theme.png
new file mode 100644
index 0000000..9411c62
Binary files /dev/null and b/icons/16/gimp-prefs-icon-theme.png differ
diff --git a/icons/16/gimp-prefs-icon-theme.svg b/icons/16/gimp-prefs-icon-theme.svg
new file mode 100644
index 0000000..e573c58
--- /dev/null
+++ b/icons/16/gimp-prefs-icon-theme.svg
@@ -0,0 +1,196 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/";
+   xmlns:cc="http://creativecommons.org/ns#";
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#";
+   xmlns:svg="http://www.w3.org/2000/svg";
+   xmlns="http://www.w3.org/2000/svg";
+   xmlns:xlink="http://www.w3.org/1999/xlink";
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd";
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape";
+   version="1.0"
+   x="0.0000000"
+   y="0.0000000"
+   width="16"
+   height="16"
+   id="svg1"
+   sodipodi:version="0.32"
+   inkscape:version="0.91 r13725"
+   sodipodi:docname="gimp-prefs-icon-theme.svg">
+  <metadata
+     id="metadata162">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage"; />
+        <dc:title></dc:title>
+        <dc:creator>
+          <cc:Agent>
+            <dc:title>Jakub Steiner</dc:title>
+          </cc:Agent>
+        </dc:creator>
+        <dc:date>2005-02-01</dc:date>
+        <cc:license
+           rdf:resource="http://creativecommons.org/licenses/GPL/2.0/"; />
+        <dc:identifier>http://jimmac.musichall.cz/</dc:identifier>
+        <dc:subject>
+          <rdf:Bag>
+            <rdf:li>folder</rdf:li>
+            <rdf:li>directory</rdf:li>
+            <rdf:li>storage</rdf:li>
+          </rdf:Bag>
+        </dc:subject>
+      </cc:Work>
+      <cc:License
+         rdf:about="http://creativecommons.org/licenses/GPL/2.0/";>
+        <cc:permits
+           rdf:resource="http://web.resource.org/cc/Reproduction"; />
+        <cc:permits
+           rdf:resource="http://web.resource.org/cc/Distribution"; />
+        <cc:requires
+           rdf:resource="http://web.resource.org/cc/Notice"; />
+        <cc:permits
+           rdf:resource="http://web.resource.org/cc/DerivativeWorks"; />
+        <cc:requires
+           rdf:resource="http://web.resource.org/cc/ShareAlike"; />
+        <cc:requires
+           rdf:resource="http://web.resource.org/cc/SourceCode"; />
+      </cc:License>
+    </rdf:RDF>
+  </metadata>
+  <sodipodi:namedview
+     id="base"
+     pagecolor="#ffffff"
+     bordercolor="#666"
+     borderopacity="1"
+     inkscape:pageopacity="0.0"
+     inkscape:pageshadow="2"
+     inkscape:window-width="1043"
+     inkscape:window-height="655"
+     inkscape:cy="2.1714916"
+     inkscape:cx="12.766286"
+     inkscape:zoom="16"
+     inkscape:document-units="px"
+     showgrid="false"
+     inkscape:window-x="515"
+     inkscape:window-y="217"
+     inkscape:current-layer="layer2"
+     inkscape:showpageshadow="false"
+     showborder="false"
+     inkscape:grid-points="true"
+     width="16px"
+     height="16px"
+     borderlayer="false"
+     inkscape:window-maximized="0">
+    <inkscape:grid
+       id="GridFromPre046Settings"
+       type="xygrid"
+       originx="0px"
+       originy="0px"
+       spacingx="0.5px"
+       spacingy="0.5px"
+       color="#3f3fff"
+       empcolor="#3f3fff"
+       opacity="0.15"
+       empopacity="0.38"
+       empspacing="2" />
+  </sodipodi:namedview>
+  <defs
+     id="defs3">
+    <linearGradient
+       id="linearGradient2846">
+      <stop
+         style="stop-color:#3465a4;stop-opacity:1"
+         offset="0"
+         id="stop2848" />
+      <stop
+         style="stop-color:#729fcf;stop-opacity:1"
+         offset="1"
+         id="stop2850" />
+    </linearGradient>
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient2846"
+       id="linearGradient1906"
+       x1="7.9999967"
+       y1="0.5625"
+       x2="7.9999967"
+       y2="11.4375"
+       gradientUnits="userSpaceOnUse" />
+    <filter
+       inkscape:label="Opacity"
+       style="color-interpolation-filters:sRGB;"
+       id="filter16829">
+      <feColorMatrix
+         values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 5 -1 "
+         result="colormatrix"
+         id="feColorMatrix16831" />
+      <feComposite
+         in2="colormatrix"
+         operator="arithmetic"
+         k2="0.569519"
+         result="fbSourceGraphic"
+         id="feComposite16833" />
+      <feColorMatrix
+         result="fbSourceGraphicAlpha"
+         in="fbSourceGraphic"
+         values="0 0 0 -1 0 0 0 0 -1 0 0 0 0 -1 0 0 0 0 1 0"
+         id="feColorMatrix16835" />
+      <feColorMatrix
+         id="feColorMatrix16837"
+         values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 5 -1 "
+         result="colormatrix"
+         in="fbSourceGraphic" />
+      <feComposite
+         id="feComposite16839"
+         in2="colormatrix"
+         operator="arithmetic"
+         k2="0.57"
+         result="composite" />
+    </filter>
+  </defs>
+  <g
+     inkscape:groupmode="layer"
+     id="layer1"
+     inkscape:label="pixmap"
+     style="display:inline" />
+  <g
+     inkscape:groupmode="layer"
+     id="layer2"
+     inkscape:label="vectors"
+     style="display:inline">
+    <g
+       id="g891"
+       transform="matrix(0.186703,0,0,0.186703,-21.1073,57.62299)" />
+    <path
+       
style="color:black;fill:url(#linearGradient1906);fill-opacity:1.0;fill-rule:evenodd;stroke:#204a87;stroke-width:0.99999964;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
+       d="M 5.4999976,0.4999914 C 3.4912384,0.4999914 1.8764691,0.72027076 0.4999996,1.0613557 L 
0.4999996,15.4697 L 15.499994,15.4697 L 15.499994,1.0613557 C 14.124852,0.72268687 12.519772,0.4999914 
10.499996,0.4999914 L 5.4999976,0.4999914 z "
+       id="rect1927"
+       sodipodi:nodetypes="ccccccc" />
+    <path
+       sodipodi:type="inkscape:offset"
+       inkscape:radius="-0.95928222"
+       inkscape:original="M 24.5 27.5 C 22.089488 27.5 20.151764 27.7943 18.5 28.25 L 18.5 47.5 L 36.5 47.5 
L 36.5 28.25 C 34.849829 27.797528 32.923733 27.5 30.5 27.5 L 24.5 27.5 z "
+       
style="opacity:0.35;color:black;fill:none;fill-opacity:1;fill-rule:evenodd;stroke:white;stroke-width:1.30871499;stroke-linecap:round;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
+       id="path2941"
+       d="M 24.5,28.46875 C 22.459316,28.46875 20.904224,28.749808 19.46875,29.09375 L 19.46875,46.53125 L 
35.53125,46.53125 L 35.53125,29.09375 C 34.097014,28.750791 32.551878,28.46875 30.5,28.46875 L 24.5,28.46875 
z "
+       transform="matrix(0.809206,0,0,0.721524,-14.28547,-19.07216)" />
+    <g
+       id="COPY"
+       transform="matrix(0.14453125,0,0,0.14453125,3.149495,3.533563)"
+       style="filter:url(#filter16829)">
+      <g
+         id="g16738">
+        <path
+           style="clip-rule:evenodd;fill-rule:evenodd"
+           inkscape:connector-curvature="0"
+           d="M 41,20 3,20 c -1.657,0 -3,1.343 -3,3 l 0,38 c 0,1.657 1.343,3 3,3 l 38,0 c 1.657,0 3,-1.343 
3,-3 l 0,-38 c 0,-1.657 -1.343,-3 -3,-3 z m -3,38 -32,0 0,-32 9,0 0,0 13,0 0,0 10,0 0,32 z M 61,0 23,0 c 
-1.657,0 -3,1.343 -3,3 l 0,14 6,0 0,-11 9,0 0,0 13,0 0,0 10,0 0,32 -11,0 0,6 14,0 c 1.657,0 3,-1.343 3,-3 L 
64,3 C 64,1.344 62.657,0 61,0 Z"
+           id="path16740" />
+      </g>
+    </g>
+  </g>
+</svg>
diff --git a/icons/22/gimp-prefs-icon-theme.png b/icons/22/gimp-prefs-icon-theme.png
new file mode 100644
index 0000000..c55a04f
Binary files /dev/null and b/icons/22/gimp-prefs-icon-theme.png differ
diff --git a/icons/22/gimp-prefs-icon-theme.svg b/icons/22/gimp-prefs-icon-theme.svg
new file mode 100644
index 0000000..de620a7
--- /dev/null
+++ b/icons/22/gimp-prefs-icon-theme.svg
@@ -0,0 +1,202 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/";
+   xmlns:cc="http://creativecommons.org/ns#";
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#";
+   xmlns:svg="http://www.w3.org/2000/svg";
+   xmlns="http://www.w3.org/2000/svg";
+   xmlns:xlink="http://www.w3.org/1999/xlink";
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd";
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape";
+   version="1.0"
+   x="0.0000000"
+   y="0.0000000"
+   width="16"
+   height="16"
+   id="svg1"
+   sodipodi:version="0.32"
+   inkscape:version="0.91 r13725"
+   sodipodi:docname="gimp-prefs-icon-theme.svg">
+  <metadata
+     id="metadata162">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage"; />
+        <dc:title></dc:title>
+        <dc:creator>
+          <cc:Agent>
+            <dc:title>Jakub Steiner</dc:title>
+          </cc:Agent>
+        </dc:creator>
+        <dc:date>2005-02-01</dc:date>
+        <cc:license
+           rdf:resource="http://creativecommons.org/licenses/GPL/2.0/"; />
+        <dc:identifier>http://jimmac.musichall.cz/</dc:identifier>
+        <dc:subject>
+          <rdf:Bag>
+            <rdf:li>folder</rdf:li>
+            <rdf:li>directory</rdf:li>
+            <rdf:li>storage</rdf:li>
+          </rdf:Bag>
+        </dc:subject>
+      </cc:Work>
+      <cc:License
+         rdf:about="http://creativecommons.org/licenses/GPL/2.0/";>
+        <cc:permits
+           rdf:resource="http://web.resource.org/cc/Reproduction"; />
+        <cc:permits
+           rdf:resource="http://web.resource.org/cc/Distribution"; />
+        <cc:requires
+           rdf:resource="http://web.resource.org/cc/Notice"; />
+        <cc:permits
+           rdf:resource="http://web.resource.org/cc/DerivativeWorks"; />
+        <cc:requires
+           rdf:resource="http://web.resource.org/cc/ShareAlike"; />
+        <cc:requires
+           rdf:resource="http://web.resource.org/cc/SourceCode"; />
+      </cc:License>
+    </rdf:RDF>
+  </metadata>
+  <sodipodi:namedview
+     id="base"
+     pagecolor="#ffffff"
+     bordercolor="#666"
+     borderopacity="1"
+     inkscape:pageopacity="0.0"
+     inkscape:pageshadow="2"
+     inkscape:window-width="1043"
+     inkscape:window-height="655"
+     inkscape:cy="11.180266"
+     inkscape:cx="7.847973"
+     inkscape:zoom="16"
+     inkscape:document-units="px"
+     showgrid="false"
+     inkscape:window-x="46"
+     inkscape:window-y="177"
+     inkscape:current-layer="layer2"
+     inkscape:showpageshadow="false"
+     showborder="false"
+     inkscape:grid-points="true"
+     width="16px"
+     height="16px"
+     borderlayer="false"
+     inkscape:window-maximized="0">
+    <inkscape:grid
+       id="GridFromPre046Settings"
+       type="xygrid"
+       originx="0px"
+       originy="0px"
+       spacingx="0.5px"
+       spacingy="0.5px"
+       color="#3f3fff"
+       empcolor="#3f3fff"
+       opacity="0.15"
+       empopacity="0.38"
+       empspacing="2" />
+  </sodipodi:namedview>
+  <defs
+     id="defs3">
+    <linearGradient
+       id="linearGradient2846">
+      <stop
+         style="stop-color:#3465a4;stop-opacity:1"
+         offset="0"
+         id="stop2848" />
+      <stop
+         style="stop-color:#729fcf;stop-opacity:1"
+         offset="1"
+         id="stop2850" />
+    </linearGradient>
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient2846"
+       id="linearGradient1906"
+       x1="7.9999967"
+       y1="0.5625"
+       x2="7.9999967"
+       y2="11.4375"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.99993706,0,0,1.0019602,-7.0962343,-0.05050075)" />
+    <filter
+       inkscape:label="Opacity"
+       style="color-interpolation-filters:sRGB;"
+       id="filter16829">
+      <feColorMatrix
+         values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 5 -1 "
+         result="colormatrix"
+         id="feColorMatrix16831" />
+      <feComposite
+         in2="colormatrix"
+         operator="arithmetic"
+         k2="0.569519"
+         result="fbSourceGraphic"
+         id="feComposite16833" />
+      <feColorMatrix
+         result="fbSourceGraphicAlpha"
+         in="fbSourceGraphic"
+         values="0 0 0 -1 0 0 0 0 -1 0 0 0 0 -1 0 0 0 0 1 0"
+         id="feColorMatrix16835" />
+      <feColorMatrix
+         id="feColorMatrix16837"
+         values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 5 -1 "
+         result="colormatrix"
+         in="fbSourceGraphic" />
+      <feComposite
+         id="feComposite16839"
+         in2="colormatrix"
+         operator="arithmetic"
+         k2="0.57"
+         result="composite" />
+    </filter>
+  </defs>
+  <g
+     inkscape:groupmode="layer"
+     id="layer1"
+     inkscape:label="pixmap"
+     style="display:inline" />
+  <g
+     inkscape:groupmode="layer"
+     id="layer2"
+     inkscape:label="vectors"
+     style="display:inline">
+    <g
+       id="g17376"
+       transform="translate(7.09674,0.05000383)">
+      <g
+         transform="matrix(0.18669126,0,0,0.18706897,-28.202206,57.685436)"
+         id="g891" />
+      <path
+         inkscape:connector-curvature="0"
+         sodipodi:nodetypes="ccccccc"
+         id="rect1927"
+         d="m -1.5965826,0.45047035 c -2.0086329,0 -3.6233007,0.22071202 -4.9996835,0.56246475 l 
0,14.4365869 14.9990521,0 0,-14.4365869 C 7.0277305,0.67360245 5.4227514,0.45047035 3.4031018,0.45047035 l 
-4.9996844,0 z"
+         
style="color:#000000;display:inline;overflow:visible;visibility:visible;fill:url(#linearGradient1906);fill-opacity:1;fill-rule:evenodd;stroke:#204a87;stroke-width:1.00094795;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none"
 />
+      <path
+         transform="matrix(0.80915515,0,0,0.72293828,-21.380808,-19.160045)"
+         d="m 24.5,28.458984 c -2.046906,0 -3.602578,0.281183 -5.041016,0.626954 l 0,17.455078 16.082032,0 
0,-17.453125 C 34.1041,28.74332 32.557458,28.458984 30.5,28.458984 l -6,0 z"
+         id="path2941"
+         
style="color:#000000;display:inline;overflow:visible;visibility:visible;opacity:0.35;fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#ffffff;stroke-width:1.30871499;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none"
+         inkscape:original="M 24.5 27.5 C 22.089488 27.5 20.151764 27.7943 18.5 28.25 L 18.5 47.5 L 36.5 
47.5 L 36.5 28.25 C 34.849829 27.797528 32.923733 27.5 30.5 27.5 L 24.5 27.5 z "
+         inkscape:radius="-0.95928222"
+         sodipodi:type="inkscape:offset" />
+      <g
+         style="filter:url(#filter16829)"
+         transform="matrix(0.14452216,0,0,0.14481456,-3.9469375,3.4899879)"
+         id="COPY">
+        <g
+           id="g16738">
+          <path
+             id="path16740"
+             d="M 41,20 3,20 c -1.657,0 -3,1.343 -3,3 l 0,38 c 0,1.657 1.343,3 3,3 l 38,0 c 1.657,0 3,-1.343 
3,-3 l 0,-38 c 0,-1.657 -1.343,-3 -3,-3 z m -3,38 -32,0 0,-32 9,0 0,0 13,0 0,0 10,0 0,32 z M 61,0 23,0 c 
-1.657,0 -3,1.343 -3,3 l 0,14 6,0 0,-11 9,0 0,0 13,0 0,0 10,0 0,32 -11,0 0,6 14,0 c 1.657,0 3,-1.343 3,-3 L 
64,3 C 64,1.344 62.657,0 61,0 Z"
+             inkscape:connector-curvature="0"
+             style="clip-rule:evenodd;fill-rule:evenodd" />
+        </g>
+      </g>
+    </g>
+  </g>
+</svg>
diff --git a/icons/Makefile.am b/icons/Makefile.am
index 7b65932..aaa6d40 100644
--- a/icons/Makefile.am
+++ b/icons/Makefile.am
@@ -1,19 +1,19 @@
 ## Process this file with automake to produce Makefile.in
 
-iconsdir   = $(gimpdatadir)/icons/hicolor
-icons12dir = $(gimpdatadir)/icons/hicolor/12x12/apps
-icons16dir = $(gimpdatadir)/icons/hicolor/16x16/apps
-icons18dir = $(gimpdatadir)/icons/hicolor/18x18/apps
-icons20dir = $(gimpdatadir)/icons/hicolor/20x20/apps
-icons22dir = $(gimpdatadir)/icons/hicolor/22x22/apps
-icons24dir = $(gimpdatadir)/icons/hicolor/24x24/apps
-icons32dir = $(gimpdatadir)/icons/hicolor/32x32/apps
-icons48dir = $(gimpdatadir)/icons/hicolor/48x48/apps
-icons64dir = $(gimpdatadir)/icons/hicolor/64x64/apps
-icons96dir = $(gimpdatadir)/icons/hicolor/96x96/apps
-icons128dir = $(gimpdatadir)/icons/hicolor/128x128/apps
-icons192dir = $(gimpdatadir)/icons/hicolor/192x192/apps
-icons256dir = $(gimpdatadir)/icons/hicolor/256x256/apps
+iconsdir   = $(gimpdatadir)/icons/Default/hicolor
+icons12dir = $(gimpdatadir)/icons/Default/hicolor/12x12/apps
+icons16dir = $(gimpdatadir)/icons/Default/hicolor/16x16/apps
+icons18dir = $(gimpdatadir)/icons/Default/hicolor/18x18/apps
+icons20dir = $(gimpdatadir)/icons/Default/hicolor/20x20/apps
+icons22dir = $(gimpdatadir)/icons/Default/hicolor/22x22/apps
+icons24dir = $(gimpdatadir)/icons/Default/hicolor/24x24/apps
+icons32dir = $(gimpdatadir)/icons/Default/hicolor/32x32/apps
+icons48dir = $(gimpdatadir)/icons/Default/hicolor/48x48/apps
+icons64dir = $(gimpdatadir)/icons/Default/hicolor/64x64/apps
+icons96dir = $(gimpdatadir)/icons/Default/hicolor/96x96/apps
+icons128dir = $(gimpdatadir)/icons/Default/hicolor/128x128/apps
+icons192dir = $(gimpdatadir)/icons/Default/hicolor/192x192/apps
+icons256dir = $(gimpdatadir)/icons/Default/hicolor/256x256/apps
 
 
 ## The icon theme images
@@ -132,6 +132,7 @@ icons16_DATA = \
        16/gimp-prefs-image-windows.png                 \
        16/gimp-prefs-interface.png                     \
        16/gimp-prefs-theme.png                         \
+       16/gimp-prefs-icon-theme.png                    \
        16/gimp-prefs-toolbox.png                       \
        16/gimp-prefs-window-management.png             \
        16/gimp-print-resolution.png                    \
@@ -271,6 +272,7 @@ icons22_DATA = \
        22/gimp-prefs-playground.png            \
        22/gimp-prefs-session.png               \
        22/gimp-prefs-theme.png                 \
+       22/gimp-prefs-icon-theme.png            \
        22/gimp-prefs-tool-options.png          \
        22/gimp-prefs-toolbox.png               \
        22/gimp-prefs-window-management.png     \
diff --git a/libgimpwidgets/gimpstock.c b/libgimpwidgets/gimpstock.c
index 02ca890..1eec15a 100644
--- a/libgimpwidgets/gimpstock.c
+++ b/libgimpwidgets/gimpstock.c
@@ -361,6 +361,7 @@ gimp_stock_init (void)
 
   GdkPixbuf *pixbuf;
   GError    *error = NULL;
+  gchar     *icon_theme;
   gchar     *icons_dir;
   gint       i;
 
@@ -397,7 +398,11 @@ gimp_stock_init (void)
   gtk_stock_add_static (gimp_compat_stock_items,
                         G_N_ELEMENTS (gimp_compat_stock_items));
 
-  icons_dir = g_build_filename (gimp_data_directory (), "icons", NULL);
+  icon_theme = g_strdup ("Default"); /* FIXME */
+  icons_dir = g_build_filename (gimp_data_directory (), "icons", icon_theme,
+                                NULL);
+  g_free (icon_theme);
+
   gtk_icon_theme_prepend_search_path (gtk_icon_theme_get_default (),
                                       icons_dir);
   g_free (icons_dir);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]