Commit 3cc77b03 authored by Massimo Valentini's avatar Massimo Valentini

Bug 759904: Some icons can't be set from the icon theme

make it possible to use themed standard named icons
so to have also gtk dialogs show icons in the same style
as GIMP ui.
parent 12ac114f
......@@ -1945,12 +1945,16 @@ prefs_dialog_new (Gimp *gimp,
{
GtkTreeIter iter;
GFile *icon_theme_dir = icon_themes_get_theme_dir (gimp, icon_themes[i]);
GFile *icon_theme_search_path = g_file_get_parent (icon_theme_dir);
GtkIconTheme *theme;
gchar *example;
GdkPixbuf *pixbuf;
theme = gtk_icon_theme_new ();
gtk_icon_theme_prepend_search_path (theme, gimp_file_get_utf8_name(icon_theme_dir));
gtk_icon_theme_prepend_search_path (theme, gimp_file_get_utf8_name(icon_theme_search_path));
g_object_unref (icon_theme_search_path);
gtk_icon_theme_set_custom_theme (theme, icon_themes[i]);
example = gtk_icon_theme_get_example_icon_name (theme);
if (! example)
{
......
......@@ -101,14 +101,12 @@ icon_themes_init (Gimp *gimp)
g_file_info_get_file_type (info) == G_FILE_TYPE_DIRECTORY)
{
GFile *file;
GFile *hicolor;
GFile *index_theme;
file = g_file_enumerator_get_child (enumerator, info);
/* make sure there is a hicolor/index.theme file */
hicolor = g_file_get_child (file, "hicolor");
index_theme = g_file_get_child (hicolor, "index.theme");
index_theme = g_file_get_child (file, "index.theme");
if (g_file_query_exists (index_theme, NULL))
{
......@@ -118,16 +116,22 @@ icon_themes_init (Gimp *gimp)
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,
g_object_ref (file));
if (strcmp ("hicolor", basename))
{
if (gimp->be_verbose)
g_print ("Adding icon theme '%s' (%s)\n",
basename, name);
g_hash_table_insert (icon_themes_hash, basename,
g_object_ref (file));
}
else
{
g_free (basename);
}
}
g_object_unref (index_theme);
g_object_unref (hicolor);
g_object_unref (file);
}
......
## Process this file with automake to produce Makefile.in
iconsdir = $(gimpdatadir)/icons/Color/hicolor
iconsdir = $(gimpdatadir)/icons/Color
icons_DATA = \
index.theme
......
## Process this file with automake to produce Makefile.in
iconsdir = $(gimpdatadir)/icons/Legacy/hicolor
icons12dir = $(gimpdatadir)/icons/Legacy/hicolor/12x12/apps
icons16dir = $(gimpdatadir)/icons/Legacy/hicolor/16x16/apps
icons18dir = $(gimpdatadir)/icons/Legacy/hicolor/18x18/apps
icons20dir = $(gimpdatadir)/icons/Legacy/hicolor/20x20/apps
icons22dir = $(gimpdatadir)/icons/Legacy/hicolor/22x22/apps
iconsdir = $(gimpdatadir)/icons/Legacy/
icons12dir = $(gimpdatadir)/icons/Legacy/12x12/apps
icons16dir = $(gimpdatadir)/icons/Legacy/16x16/apps
icons18dir = $(gimpdatadir)/icons/Legacy/18x18/apps
icons20dir = $(gimpdatadir)/icons/Legacy/20x20/apps
icons22dir = $(gimpdatadir)/icons/Legacy/22x22/apps
# 22x22 tool icons will go in their own directory and we tell GTK+
# that this directory contains icons for 24x24 requests.
# This is a special trick to let the theme override the default
# 24x24 size request.
tools22dir = $(gimpdatadir)/icons/Legacy/hicolor/22x22/tools
icons24dir = $(gimpdatadir)/icons/Legacy/hicolor/24x24/apps
icons32dir = $(gimpdatadir)/icons/Legacy/hicolor/32x32/apps
icons48dir = $(gimpdatadir)/icons/Legacy/hicolor/48x48/apps
icons64dir = $(gimpdatadir)/icons/Legacy/hicolor/64x64/apps
icons96dir = $(gimpdatadir)/icons/Legacy/hicolor/96x96/apps
icons128dir = $(gimpdatadir)/icons/Legacy/hicolor/128x128/apps
icons192dir = $(gimpdatadir)/icons/Legacy/hicolor/192x192/apps
icons256dir = $(gimpdatadir)/icons/Legacy/hicolor/256x256/apps
tools22dir = $(gimpdatadir)/icons/Legacy/22x22/tools
icons24dir = $(gimpdatadir)/icons/Legacy/24x24/apps
icons32dir = $(gimpdatadir)/icons/Legacy/32x32/apps
icons48dir = $(gimpdatadir)/icons/Legacy/48x48/apps
icons64dir = $(gimpdatadir)/icons/Legacy/64x64/apps
icons96dir = $(gimpdatadir)/icons/Legacy/96x96/apps
icons128dir = $(gimpdatadir)/icons/Legacy/128x128/apps
icons192dir = $(gimpdatadir)/icons/Legacy/192x192/apps
icons256dir = $(gimpdatadir)/icons/Legacy/256x256/apps
## The icon theme images
......
......@@ -3,6 +3,7 @@ Name=Hicolor
Comment=Legacy icon theme (GIMP 2.8)
Example=gimp-wilber
Hidden=true
Inherits=Color
Directories=12x12/apps,18x18/apps,20x20/apps,16x16/actions,16x16/animations,16x16/apps,16x16/categories,16x16/devices,16x16/emblems,16x16/emotes,16x16/filesystems,16x16/intl,16x16/mimetypes,16x16/places,16x16/status,16x16/stock/chart,16x16/stock/code,16x16/stock/data,16x16/stock/form,16x16/stock/image,16x16/stock/io,16x16/stock/media,16x16/stock/navigation,16x16/stock/net,16x16/stock/object,16x16/stock/table,16x16/stock/text,22x22/actions,22x22/animations,22x22/apps,22x22/categories,22x22/devices,22x22/emblems,22x22/emotes,22x22/filesystems,22x22/intl,22x22/mimetypes,22x22/places,22x22/status,22x22/stock/chart,22x22/stock/code,22x22/stock/data,22x22/stock/form,22x22/stock/image,22x22/stock/io,22x22/stock/media,22x22/stock/navigation,22x22/stock/net,22x22/stock/object,22x22/stock/table,22x22/stock/text,22x22/tools,24x24/actions,24x24/animations,24x24/apps,24x24/categories,24x24/devices,24x24/emblems,24x24/emotes,24x24/filesystems,24x24/intl,24x24/mimetypes,24x24/places,24x24/status,24x24/stock/chart,24x24/stock/code,24x24/stock/data,24x24/stock/form,24x24/stock/image,24x24/stock/io,24x24/stock/media,24x24/stock/navigation,24x24/stock/net,24x24/stock/object,24x24/stock/table,24x24/stock/text,32x32/actions,32x32/animations,32x32/apps,32x32/categories,32x32/devices,32x32/emblems,32x32/emotes,32x32/filesystems,32x32/intl,32x32/mimetypes,32x32/places,32x32/status,32x32/stock/chart,32x32/stock/code,32x32/stock/data,32x32/stock/form,32x32/stock/image,32x32/stock/io,32x32/stock/media,32x32/stock/navigation,32x32/stock/net,32x32/stock/object,32x32/stock/table,32x32/stock/text,36x36/actions,36x36/animations,36x36/apps,36x36/categories,36x36/devices,36x36/emblems,36x36/emotes,36x36/filesystems,36x36/intl,36x36/mimetypes,36x36/places,36x36/status,36x36/stock/chart,36x36/stock/code,36x36/stock/data,36x36/stock/form,36x36/stock/image,36x36/stock/io,36x36/stock/media,36x36/stock/navigation,36x36/stock/net,36x36/stock/object,36x36/stock/table,36x36/stock/text,48x48/actions,48x48/animations,48x48/apps,48x48/categories,48x48/devices,48x48/emblems,48x48/emotes,48x48/filesystems,48x48/intl,48x48/mimetypes,48x48/places,48x48/status,48x48/stock/chart,48x48/stock/code,48x48/stock/data,48x48/stock/form,48x48/stock/image,48x48/stock/io,48x48/stock/media,48x48/stock/navigation,48x48/stock/net,48x48/stock/object,48x48/stock/table,48x48/stock/text,64x64/actions,64x64/animations,64x64/apps,64x64/categories,64x64/devices,64x64/emblems,64x64/emotes,64x64/filesystems,64x64/intl,64x64/mimetypes,64x64/places,64x64/status,64x64/stock/chart,64x64/stock/code,64x64/stock/data,64x64/stock/form,64x64/stock/image,64x64/stock/io,64x64/stock/media,64x64/stock/navigation,64x64/stock/net,64x64/stock/object,64x64/stock/table,64x64/stock/text,72x72/actions,72x72/animations,72x72/apps,72x72/categories,72x72/devices,72x72/emblems,72x72/emotes,72x72/filesystems,72x72/intl,72x72/mimetypes,72x72/places,72x72/status,72x72/stock/chart,72x72/stock/code,72x72/stock/data,72x72/stock/form,72x72/stock/image,72x72/stock/io,72x72/stock/media,72x72/stock/navigation,72x72/stock/net,72x72/stock/object,72x72/stock/table,72x72/stock/text,96x96/actions,96x96/animations,96x96/apps,96x96/categories,96x96/devices,96x96/emblems,96x96/emotes,96x96/filesystems,96x96/intl,96x96/mimetypes,96x96/places,96x96/status,96x96/stock/chart,96x96/stock/code,96x96/stock/data,96x96/stock/form,96x96/stock/image,96x96/stock/io,96x96/stock/media,96x96/stock/navigation,96x96/stock/net,96x96/stock/object,96x96/stock/table,96x96/stock/text,128x128/actions,128x128/animations,128x128/apps,128x128/categories,128x128/devices,128x128/emblems,128x128/emotes,128x128/filesystems,128x128/intl,128x128/mimetypes,128x128/places,128x128/status,128x128/stock/chart,128x128/stock/code,128x128/stock/data,128x128/stock/form,128x128/stock/image,128x128/stock/io,128x128/stock/media,128x128/stock/navigation,128x128/stock/net,128x128/stock/object,128x128/stock/table,128x128/stock/text,192x192/actions,192x192/animations,192x192/apps,192x192/categories,192x192/devices,192x192/emblems,192x192/emotes,192x192/filesystems,192x192/intl,192x192/mimetypes,192x192/places,192x192/status,192x192/stock/chart,192x192/stock/code,192x192/stock/data,192x192/stock/form,192x192/stock/image,192x192/stock/io,192x192/stock/media,192x192/stock/navigation,192x192/stock/net,192x192/stock/object,192x192/stock/table,192x192/stock/text,256x256/actions,256x256/animations,256x256/apps,256x256/categories,256x256/devices,256x256/emblems,256x256/emotes,256x256/filesystems,256x256/intl,256x256/mimetypes,256x256/places,256x256/status,256x256/stock/chart,256x256/stock/code,256x256/stock/data,256x256/stock/form,256x256/stock/image,256x256/stock/io,256x256/stock/media,256x256/stock/navigation,256x256/stock/net,256x256/stock/object,256x256/stock/table,256x256/stock/text,512x512/actions,512x512/animations,512x512/apps,512x512/categories,512x512/devices,512x512/emblems,512x512/emotes,512x512/filesystems,512x512/intl,512x512/mimetypes,512x512/places,512x512/status,512x512/stock/chart,512x512/stock/code,512x512/stock/data,512x512/stock/form,512x512/stock/image,512x512/stock/io,512x512/stock/media,512x512/stock/navigation,512x512/stock/net,512x512/stock/object,512x512/stock/table,512x512/stock/text,scalable/actions,scalable/animations,scalable/apps,scalable/categories,scalable/devices,scalable/emblems,scalable/emotes,scalable/filesystems,scalable/intl,scalable/mimetypes,scalable/places,scalable/status,scalable/stock/chart,scalable/stock/code,scalable/stock/data,scalable/stock/form,scalable/stock/image,scalable/stock/io,scalable/stock/media,scalable/stock/navigation,scalable/stock/net,scalable/stock/object,scalable/stock/table,scalable/stock/text
......
......@@ -3,3 +3,11 @@ SUBDIRS = \
Legacy \
Symbolic \
Symbolic-Inverted
iconsdir = $(gimpdatadir)/icons/hicolor
icons_DATA = \
index.theme
EXTRA_DIST = \
$(icons_DATA)
## Process this file with automake to produce Makefile.in
iconsdir = $(gimpdatadir)/icons/Symbolic-Inverted/hicolor
iconsdir = $(gimpdatadir)/icons/Symbolic-Inverted
icons_DATA = \
index.theme
......
## Process this file with automake to produce Makefile.in
iconsdir = $(gimpdatadir)/icons/Symbolic/hicolor
iconsdir = $(gimpdatadir)/icons/Symbolic
icons_DATA = \
index.theme
......
[Icon Theme]
Name=Hicolor
Comment=Fallback icon theme
Hidden=true
Directories=
This diff is collapsed.
......@@ -15,19 +15,19 @@ style "gimp-default-style"
{
stock["gtk-dialog-error"] =
{
{ "../../icons/Color/hicolor/64x64/apps/gimp-error.png", *, *, "gtk-dialog" }
{ "../../icons/Color/64x64/apps/gimp-error.png", *, *, "gtk-dialog" }
}
stock["gtk-dialog-info"] =
{
{ "../../icons/Color/hicolor/64x64/apps/gimp-info.png", *, *, "gtk-dialog" }
{ "../../icons/Color/64x64/apps/gimp-info.png", *, *, "gtk-dialog" }
}
stock["gtk-dialog-question"] =
{
{ "../../icons/Color/hicolor/64x64/apps/gimp-question.png", *, *, "gtk-dialog" }
{ "../../icons/Color/64x64/apps/gimp-question.png", *, *, "gtk-dialog" }
}
stock["gtk-dialog-warning"] =
{
{ "../../icons/Color/hicolor/64x64/apps/gimp-warning.png", *, *, "gtk-dialog" }
{ "../../icons/Color/64x64/apps/gimp-warning.png", *, *, "gtk-dialog" }
}
# Uncommenting this line allows to set a different (smaller) font for GIMP.
......
......@@ -21,19 +21,19 @@ style "gimp-default-style"
{
stock["gtk-dialog-error"] =
{
{ "../../icons/Color/hicolor/64x64/apps/gimp-error.png", *, *, "gtk-dialog" }
{ "../../icons/Color/64x64/apps/gimp-error.png", *, *, "gtk-dialog" }
}
stock["gtk-dialog-info"] =
{
{ "../../icons/Color/hicolor/64x64/apps/gimp-info.png", *, *, "gtk-dialog" }
{ "../../icons/Color/64x64/apps/gimp-info.png", *, *, "gtk-dialog" }
}
stock["gtk-dialog-question"] =
{
{ "../../icons/Color/hicolor/64x64/apps/gimp-question.png", *, *, "gtk-dialog" }
{ "../../icons/Color/64x64/apps/gimp-question.png", *, *, "gtk-dialog" }
}
stock["gtk-dialog-warning"] =
{
{ "../../icons/Color/hicolor/64x64/apps/gimp-warning.png", *, *, "gtk-dialog" }
{ "../../icons/Color/64x64/apps/gimp-warning.png", *, *, "gtk-dialog" }
}
GtkPaned::handle-size = 6
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment