app: prepend the selected icon theme path to the search path...

... instead of replacing the first path.
This allows to fallback to our complete default theme icons when the
selected icon theme has missing icons.
This commit is contained in:
Jehan
2015-12-09 23:46:58 +01:00
parent 0ff7d3ba14
commit 6fe8f75f5d

View File

@ -204,8 +204,8 @@ icons_apply_theme (Gimp *gimp,
const gchar *icon_theme_name)
{
GtkIconTheme *icon_theme;
gchar **paths;
gint n_paths;
GFile *icon_theme_dir;
gchar *icon_theme_path;
g_return_if_fail (GIMP_IS_GIMP (gimp));
@ -217,20 +217,11 @@ icons_apply_theme (Gimp *gimp,
icon_theme = gtk_icon_theme_get_default ();
gtk_icon_theme_get_search_path (icon_theme, &paths, &n_paths);
icon_theme_dir = icon_themes_get_theme_dir (gimp, icon_theme_name);
icon_theme_path = g_file_get_path(icon_theme_dir);
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);
}
gtk_icon_theme_prepend_search_path (icon_theme, icon_theme_path);
g_free (icon_theme_path);
}
static void