Commit 033719bf authored by Michael Natterer's avatar Michael Natterer 😴

icons, themes, app: move the preferences images into the icon theme

parent 102a2362
......@@ -1211,43 +1211,22 @@ prefs_idle_unref (gpointer data)
static GdkPixbuf *
prefs_get_pixbufs (Gimp *gimp,
GtkWidget *widget,
const gchar *name,
GdkPixbuf **small_pixbuf)
{
GdkPixbuf *pixbuf = NULL;
gchar *basename;
gchar *filename;
*small_pixbuf = NULL;
basename = g_strconcat (name, ".png", NULL);
filename = themes_get_theme_file (gimp, "images", "preferences",
basename, NULL);
if (g_file_test (filename, G_FILE_TEST_IS_REGULAR))
pixbuf = gdk_pixbuf_new_from_file (filename, NULL);
gchar *icon_name;
g_free (filename);
g_free (basename);
basename = g_strconcat (name, "-22.png", NULL);
filename = themes_get_theme_file (gimp, "images", "preferences",
basename, NULL);
icon_name = g_strconcat ("gimp-prefs-", name, NULL);
if (g_file_test (filename, G_FILE_TEST_IS_REGULAR))
*small_pixbuf = gdk_pixbuf_new_from_file (filename, NULL);
else if (pixbuf)
*small_pixbuf = gdk_pixbuf_scale_simple (pixbuf,
22, 22, GDK_INTERP_BILINEAR);
g_free (filename);
g_free (basename);
pixbuf = gimp_widget_load_icon (widget, icon_name, 48);
g_idle_add (prefs_idle_unref, pixbuf);
if (pixbuf)
g_idle_add (prefs_idle_unref, pixbuf);
*small_pixbuf = gimp_widget_load_icon (widget, icon_name, 22);
g_idle_add (prefs_idle_unref, *small_pixbuf);
if (*small_pixbuf)
g_idle_add (prefs_idle_unref, *small_pixbuf);
g_free (icon_name);
return pixbuf;
}
......@@ -1322,7 +1301,7 @@ prefs_dialog_new (Gimp *gimp,
/*****************/
/* Environment */
/*****************/
pixbuf = prefs_get_pixbufs (gimp, "environment", &small_pixbuf);
pixbuf = prefs_get_pixbufs (gimp, dialog, "environment", &small_pixbuf);
vbox = gimp_prefs_box_add_page (GIMP_PREFS_BOX (prefs_box),
_("Environment"),
pixbuf,
......@@ -1397,7 +1376,7 @@ prefs_dialog_new (Gimp *gimp,
/***************/
/* Interface */
/***************/
pixbuf = prefs_get_pixbufs (gimp, "interface", &small_pixbuf);
pixbuf = prefs_get_pixbufs (gimp, dialog, "interface", &small_pixbuf);
vbox = gimp_prefs_box_add_page (GIMP_PREFS_BOX (prefs_box),
_("User Interface"),
pixbuf,
......@@ -1478,7 +1457,7 @@ prefs_dialog_new (Gimp *gimp,
/***********/
/* Theme */
/***********/
pixbuf = prefs_get_pixbufs (gimp, "theme", &small_pixbuf);
pixbuf = prefs_get_pixbufs (gimp, dialog, "theme", &small_pixbuf);
vbox = gimp_prefs_box_add_page (GIMP_PREFS_BOX (prefs_box),
_("Theme"),
pixbuf,
......@@ -1580,7 +1559,7 @@ prefs_dialog_new (Gimp *gimp,
/*****************/
/* Help System */
/*****************/
pixbuf = prefs_get_pixbufs (gimp, "help-system", &small_pixbuf);
pixbuf = prefs_get_pixbufs (gimp, dialog, "help-system", &small_pixbuf);
vbox = gimp_prefs_box_add_page (GIMP_PREFS_BOX (prefs_box),
_("Help System"),
pixbuf,
......@@ -1681,7 +1660,7 @@ prefs_dialog_new (Gimp *gimp,
/******************/
/* Tool Options */
/******************/
pixbuf = prefs_get_pixbufs (gimp, "tool-options", &small_pixbuf);
pixbuf = prefs_get_pixbufs (gimp, dialog, "tool-options", &small_pixbuf);
vbox = gimp_prefs_box_add_page (GIMP_PREFS_BOX (prefs_box),
C_("preferences", "Tool Options"),
pixbuf,
......@@ -1770,7 +1749,7 @@ prefs_dialog_new (Gimp *gimp,
/*************/
/* Toolbox */
/*************/
pixbuf = prefs_get_pixbufs (gimp, "toolbox", &small_pixbuf);
pixbuf = prefs_get_pixbufs (gimp, dialog, "toolbox", &small_pixbuf);
vbox = gimp_prefs_box_add_page (GIMP_PREFS_BOX (prefs_box),
_("Toolbox"),
pixbuf,
......@@ -1816,7 +1795,7 @@ prefs_dialog_new (Gimp *gimp,
/***********************/
/* Default New Image */
/***********************/
pixbuf = prefs_get_pixbufs (gimp, "new-image", &small_pixbuf);
pixbuf = prefs_get_pixbufs (gimp, dialog, "new-image", &small_pixbuf);
vbox = gimp_prefs_box_add_page (GIMP_PREFS_BOX (prefs_box),
_("Default New Image"),
pixbuf,
......@@ -1868,7 +1847,7 @@ prefs_dialog_new (Gimp *gimp,
/******************/
/* Default Grid */
/******************/
pixbuf = prefs_get_pixbufs (gimp, "default-grid", &small_pixbuf);
pixbuf = prefs_get_pixbufs (gimp, dialog, "default-grid", &small_pixbuf);
vbox = gimp_prefs_box_add_page (GIMP_PREFS_BOX (prefs_box),
_("Default Image Grid"),
pixbuf,
......@@ -1890,7 +1869,7 @@ prefs_dialog_new (Gimp *gimp,
/*******************/
/* Image Windows */
/*******************/
pixbuf = prefs_get_pixbufs (gimp, "image-windows", &small_pixbuf);
pixbuf = prefs_get_pixbufs (gimp, dialog, "image-windows", &small_pixbuf);
vbox = gimp_prefs_box_add_page (GIMP_PREFS_BOX (prefs_box),
_("Image Windows"),
pixbuf,
......@@ -1971,7 +1950,7 @@ prefs_dialog_new (Gimp *gimp,
/********************************/
/* Image Windows / Appearance */
/********************************/
pixbuf = prefs_get_pixbufs (gimp, "image-windows", &small_pixbuf);
pixbuf = prefs_get_pixbufs (gimp, dialog, "image-windows", &small_pixbuf);
vbox = gimp_prefs_box_add_page (GIMP_PREFS_BOX (prefs_box),
_("Image Window Appearance"),
pixbuf,
......@@ -1995,7 +1974,7 @@ prefs_dialog_new (Gimp *gimp,
/****************************************************/
/* Image Windows / Image Title & Statusbar Format */
/****************************************************/
pixbuf = prefs_get_pixbufs (gimp, "image-title", &small_pixbuf);
pixbuf = prefs_get_pixbufs (gimp, dialog, "image-title", &small_pixbuf);
vbox = gimp_prefs_box_add_page (GIMP_PREFS_BOX (prefs_box),
_("Image Title & Statusbar Format"),
pixbuf,
......@@ -2120,7 +2099,7 @@ prefs_dialog_new (Gimp *gimp,
/********************************/
/* Image Windows / Behavior */
/********************************/
pixbuf = prefs_get_pixbufs (gimp, "tool-options", &small_pixbuf);
pixbuf = prefs_get_pixbufs (gimp, dialog, "tool-options", &small_pixbuf);
vbox = gimp_prefs_box_add_page (GIMP_PREFS_BOX (prefs_box),
_("Image Window Drawing Behavior"),
pixbuf,
......@@ -2143,7 +2122,7 @@ prefs_dialog_new (Gimp *gimp,
/*************/
/* Display */
/*************/
pixbuf = prefs_get_pixbufs (gimp, "display", &small_pixbuf);
pixbuf = prefs_get_pixbufs (gimp, dialog, "display", &small_pixbuf);
vbox = gimp_prefs_box_add_page (GIMP_PREFS_BOX (prefs_box),
_("Display"),
pixbuf,
......@@ -2269,7 +2248,7 @@ prefs_dialog_new (Gimp *gimp,
/**********************/
/* Color Management */
/**********************/
pixbuf = prefs_get_pixbufs (gimp, "color-management", &small_pixbuf);
pixbuf = prefs_get_pixbufs (gimp, dialog, "color-management", &small_pixbuf);
vbox = gimp_prefs_box_add_page (GIMP_PREFS_BOX (prefs_box),
_("Color Management"),
pixbuf,
......@@ -2419,7 +2398,7 @@ prefs_dialog_new (Gimp *gimp,
/*******************/
/* Input Devices */
/*******************/
pixbuf = prefs_get_pixbufs (gimp, "input-devices", &small_pixbuf);
pixbuf = prefs_get_pixbufs (gimp, dialog, "input-devices", &small_pixbuf);
vbox = gimp_prefs_box_add_page (GIMP_PREFS_BOX (prefs_box),
_("Input Devices"),
pixbuf,
......@@ -2465,7 +2444,7 @@ prefs_dialog_new (Gimp *gimp,
/****************************/
/* Additional Controllers */
/****************************/
pixbuf = prefs_get_pixbufs (gimp, "controllers", &small_pixbuf);
pixbuf = prefs_get_pixbufs (gimp, dialog, "controllers", &small_pixbuf);
vbox = gimp_prefs_box_add_page (GIMP_PREFS_BOX (prefs_box),
_("Additional Input Controllers"),
pixbuf,
......@@ -2483,7 +2462,7 @@ prefs_dialog_new (Gimp *gimp,
/***********************/
/* Window Management */
/***********************/
pixbuf = prefs_get_pixbufs (gimp, "window-management", &small_pixbuf);
pixbuf = prefs_get_pixbufs (gimp, dialog, "window-management", &small_pixbuf);
vbox = gimp_prefs_box_add_page (GIMP_PREFS_BOX (prefs_box),
_("Window Management"),
pixbuf,
......@@ -2540,7 +2519,7 @@ prefs_dialog_new (Gimp *gimp,
/*************/
/* Folders */
/*************/
pixbuf = prefs_get_pixbufs (gimp, "folders", &small_pixbuf);
pixbuf = prefs_get_pixbufs (gimp, dialog, "folders", &small_pixbuf);
vbox = gimp_prefs_box_add_page (GIMP_PREFS_BOX (prefs_box),
_("Folders"),
pixbuf,
......@@ -2660,7 +2639,7 @@ prefs_dialog_new (Gimp *gimp,
{
GtkWidget *editor;
pixbuf = prefs_get_pixbufs (gimp, paths[i].icon, &small_pixbuf);
pixbuf = prefs_get_pixbufs (gimp, dialog, paths[i].icon, &small_pixbuf);
vbox = gimp_prefs_box_add_page (GIMP_PREFS_BOX (prefs_box),
gettext (paths[i].label),
pixbuf,
......
......@@ -2277,8 +2277,6 @@ cursors/Makefile
icons/Makefile
themes/Makefile
themes/Default/Makefile
themes/Default/images/Makefile
themes/Default/images/preferences/Makefile
themes/Small/Makefile
data/Makefile
data/brushes/Makefile
......
......@@ -26,7 +26,7 @@ CORE_VARIABLES = \
icons_DATA = \
index.theme
icons12_DATA = \
icons12_IMAGES = \
12/gimp-close.png \
12/gimp-default-colors.png \
12/gimp-linked.png \
......@@ -38,7 +38,10 @@ icons12_DATA = \
12/gimp-visible.png \
12/gimp-zoom-follow-window.png
icons16_DATA = \
icons12_DATA = \
$(icons12_IMAGES)
icons16_IMAGES = \
16/gimp-anchor.png \
16/gimp-cap-butt.png \
16/gimp-cap-round.png \
......@@ -203,16 +206,48 @@ icons16_DATA = \
16/gimp-web.png \
16/gimp-wilber.png
icons18_DATA = \
icons16_NOSTOCK_IMAGES = \
16/gimp-prefs-folders-brushes.png \
16/gimp-prefs-folders-dynamics.png \
16/gimp-prefs-folders-environ.png \
16/gimp-prefs-folders-fonts.png \
16/gimp-prefs-folders-gradients.png \
16/gimp-prefs-folders-interp.png \
16/gimp-prefs-folders-modules.png \
16/gimp-prefs-folders-palettes.png \
16/gimp-prefs-folders-patterns.png \
16/gimp-prefs-folders-plug-ins.png \
16/gimp-prefs-folders-scripts.png \
16/gimp-prefs-folders-themes.png \
16/gimp-prefs-folders-tool-plug-ins.png \
16/gimp-prefs-folders-tool-presets.png \
16/gimp-prefs-folders-tools.png \
16/gimp-prefs-image-windows.png \
16/gimp-prefs-interface.png \
16/gimp-prefs-theme.png \
16/gimp-prefs-toolbox.png \
16/gimp-prefs-window-management.png
icons16_DATA = \
$(icons16_IMAGES) \
$(icons16_NOSTOCK_IMAGES)
icons18_IMAGES = \
18/gimp-color-picker-black.png \
18/gimp-color-picker-gray.png \
18/gimp-color-picker-white.png
icons20_DATA = \
icons18_DATA = \
$(icons18_IMAGES)
icons20_IMAGES = \
20/gimp-linked.png \
20/gimp-visible.png
icons22_DATA = \
icons20_DATA = \
$(icons20_IMAGES)
icons22_IMAGES = \
22/gimp-char-picker.png \
22/gimp-dynamics.png \
22/gimp-gegl.png \
......@@ -270,7 +305,45 @@ icons22_DATA = \
22/gimp-tool-zoom.png \
22/gimp-wilber.png
icons24_DATA = \
icons22_NOSTOCK_IMAGES = \
22/gimp-prefs-color-management.png \
22/gimp-prefs-controllers.png \
22/gimp-prefs-default-grid.png \
22/gimp-prefs-display.png \
22/gimp-prefs-environment.png \
22/gimp-prefs-folders-brushes.png \
22/gimp-prefs-folders-dynamics.png \
22/gimp-prefs-folders-environ.png \
22/gimp-prefs-folders-fonts.png \
22/gimp-prefs-folders-gradients.png \
22/gimp-prefs-folders-interp.png \
22/gimp-prefs-folders-modules.png \
22/gimp-prefs-folders-palettes.png \
22/gimp-prefs-folders-patterns.png \
22/gimp-prefs-folders-plug-ins.png \
22/gimp-prefs-folders-scripts.png \
22/gimp-prefs-folders-themes.png \
22/gimp-prefs-folders-tool-plug-ins.png \
22/gimp-prefs-folders-tool-presets.png \
22/gimp-prefs-folders-tools.png \
22/gimp-prefs-folders.png \
22/gimp-prefs-help-system.png \
22/gimp-prefs-image-title.png \
22/gimp-prefs-image-windows.png \
22/gimp-prefs-input-devices.png \
22/gimp-prefs-interface.png \
22/gimp-prefs-new-image.png \
22/gimp-prefs-session.png \
22/gimp-prefs-theme.png \
22/gimp-prefs-tool-options.png \
22/gimp-prefs-toolbox.png \
22/gimp-prefs-window-management.png
icons22_DATA = \
$(icons22_IMAGES) \
$(icons22_NOSTOCK_IMAGES)
icons24_IMAGES = \
24/gimp-center.png \
24/gimp-channel-alpha.png \
24/gimp-channel-blue.png \
......@@ -334,7 +407,10 @@ icons24_DATA = \
24/gimp-warning.png \
24/gimp-web.png
icons32_DATA = \
icons24_DATA = \
$(icons24_IMAGES)
icons32_IMAGES = \
32/gimp-channel-alpha.png \
32/gimp-channel-blue.png \
32/gimp-channel-gray.png \
......@@ -349,7 +425,10 @@ icons32_DATA = \
32/gimp-text-layer.png \
32/gimp-user-manual.png
icons48_DATA = \
icons32_DATA = \
$(icons32_IMAGES)
icons48_IMAGES = \
48/gimp-channel-alpha.png \
48/gimp-channel-blue.png \
48/gimp-channel-gray.png \
......@@ -363,7 +442,46 @@ icons48_DATA = \
48/gimp-layer.png \
48/gimp-text-layer.png
icons64_DATA = \
icons48_NOSTOCK_IMAGES = \
48/gimp-prefs-color-management.png \
48/gimp-prefs-controllers.png \
48/gimp-prefs-default-comment.png \
48/gimp-prefs-default-grid.png \
48/gimp-prefs-display.png \
48/gimp-prefs-environment.png \
48/gimp-prefs-folders-brushes.png \
48/gimp-prefs-folders-dynamics.png \
48/gimp-prefs-folders-environ.png \
48/gimp-prefs-folders-fonts.png \
48/gimp-prefs-folders-gradients.png \
48/gimp-prefs-folders-interp.png \
48/gimp-prefs-folders-modules.png \
48/gimp-prefs-folders-palettes.png \
48/gimp-prefs-folders-patterns.png \
48/gimp-prefs-folders-plug-ins.png \
48/gimp-prefs-folders-scripts.png \
48/gimp-prefs-folders-themes.png \
48/gimp-prefs-folders-tool-plug-ins.png \
48/gimp-prefs-folders-tool-presets.png \
48/gimp-prefs-folders-tools.png \
48/gimp-prefs-folders.png \
48/gimp-prefs-help-system.png \
48/gimp-prefs-image-title.png \
48/gimp-prefs-image-windows.png \
48/gimp-prefs-input-devices.png \
48/gimp-prefs-interface.png \
48/gimp-prefs-new-image.png \
48/gimp-prefs-session.png \
48/gimp-prefs-theme.png \
48/gimp-prefs-tool-options.png \
48/gimp-prefs-toolbox.png \
48/gimp-prefs-window-management.png
icons48_DATA = \
$(icons48_IMAGES) \
$(icons48_NOSTOCK_IMAGES)
icons64_IMAGES = \
64/gimp-error.png \
64/gimp-frame.png \
64/gimp-info.png \
......@@ -374,20 +492,29 @@ icons64_DATA = \
64/gimp-wilber-eek.png \
64/gimp-wilber.png
ICON_IMAGES = \
$(icons12_DATA) \
$(icons16_DATA) \
$(icons18_DATA) \
$(icons20_DATA) \
$(icons22_DATA) \
$(icons24_DATA) \
$(icons32_DATA) \
$(icons48_DATA) \
$(icons64_DATA)
icons64_DATA = \
$(icons64_IMAGES)
STOCK_IMAGES = \
$(icons12_IMAGES) \
$(icons16_IMAGES) \
$(icons18_IMAGES) \
$(icons20_IMAGES) \
$(icons22_IMAGES) \
$(icons24_IMAGES) \
$(icons32_IMAGES) \
$(icons48_IMAGES) \
$(icons64_IMAGES)
NOSTOCK_IMAGES = \
$(icons16_NOSTOCK_IMAGES) \
$(icons48_NOSTOCK_IMAGES) \
$(icons22_NOSTOCK_IMAGES)
EXTRA_DIST = \
$(icons_DATA) \
$(ICON_IMAGES) \
$(STOCK_IMAGES) \
$(NOSTOCK_IMAGES) \
gimp-dialog-icons.xcf.gz
noinst_DATA = \
......@@ -397,9 +524,9 @@ noinst_DATA = \
CLEANFILES = $(noinst_DATA) stock-icons.list
stock-icons.list: $(ICON_IMAGES) Makefile.am
stock-icons.list: $(STOCK_IMAGES) Makefile.am
$(AM_V_GEN) ( rm -f $@; \
for image in $(ICON_IMAGES); do \
for image in $(STOCK_IMAGES); do \
echo $$image | \
sed -e 's|\(.*\)/\(.*\).png|\2-\1.png|' -e 's|-|_|g' -e 's|\.png$$||' >> $@; \
echo " $(srcdir)/$$image" >> $@; \
......
## Process this file with automake to produce Makefile.in
SUBDIRS = images
themedatadir = $(gimpdatadir)/themes/Default
themedata_DATA = gtkrc
......
## Process this file with automake to produce Makefile.in
SUBDIRS = preferences
/Makefile
/Makefile.in
/.xvpics
/.thumbnails
## Process this file with automake to produce Makefile.in
themedatadir = $(gimpdatadir)/themes/Default/images/preferences
PREFS_IMAGES = \
color-management-22.png \
color-management.png \
controllers-22.png \
controllers.png \
default-comment.png \
default-grid-22.png \
default-grid.png \
display-22.png \
display.png \
environment-22.png \
environment.png \
folders-brushes-22.png \
folders-brushes.png \
folders-dynamics-22.png \
folders-dynamics.png \
folders-environ-22.png \
folders-environ.png \
folders-fonts-22.png \
folders-fonts.png \
folders-gradients-22.png \
folders-gradients.png \