libgimpwidgets: use gtk_window_set_default_icon_name()

instead of gtk_window_set_default_icon_list() which requires having
actual GdkPixbufs around. Move the 32x32 and 48x48 wilber images to
the icon theme, and remove all inline pixbuf generation stuff from
libgimpwidgets.
This commit is contained in:
Michael Natterer 2015-03-29 21:00:11 +02:00
parent a5edc76c76
commit f8a9f39466
8 changed files with 8 additions and 53 deletions

View file

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

View file

Before

Width:  |  Height:  |  Size: 3.1 KiB

After

Width:  |  Height:  |  Size: 3.1 KiB

View file

@ -397,7 +397,8 @@ icons32_DATA = \
32/gimp-layer-mask.png \
32/gimp-layer.png \
32/gimp-text-layer.png \
32/gimp-user-manual.png
32/gimp-user-manual.png \
32/gimp-wilber.png
icons48_DATA = \
48/gimp-channel-alpha.png \
@ -444,8 +445,9 @@ icons48_DATA = \
48/gimp-prefs-theme.png \
48/gimp-prefs-tool-options.png \
48/gimp-prefs-toolbox.png \
48/gimp-prefs-window-management.png
48/gimp-text-layer.png
48/gimp-prefs-window-management.png \
48/gimp-text-layer.png \
48/gimp-wilber.png
icons64_DATA = \
64/gimp-error.png \

View file

@ -5,7 +5,6 @@
/Makefile
/Makefile.in
/_libs
/gimp-wilber-pixbufs.h
/gimpwidgetsmarshal.c
/gimpwidgetsmarshal.h
/makefile.mingw

View file

@ -185,7 +185,6 @@ libgimpwidgets_sources = \
gimp3migration.h
libgimpwidgets_built_sources = \
gimp-wilber-pixbufs.h \
gimpwidgetsenums.c \
gimpwidgetsmarshal.c \
gimpwidgetsmarshal.h
@ -275,35 +274,16 @@ libgimpwidgets_@GIMP_API_VERSION@_la_LIBADD = \
$(libm)
## Wilber icons for the window managaer, compiled in
WILBER_IMAGES = \
wilber-16.png \
wilber-32.png \
wilber-48.png \
wilber-64.png
WILBER_VARIABLES = \
wilber_16 $(srcdir)/wilber-16.png \
wilber_32 $(srcdir)/wilber-32.png \
wilber_48 $(srcdir)/wilber-48.png \
wilber_64 $(srcdir)/wilber-64.png
EXTRA_DIST = \
gimpwidgets.def \
$(libgimpwidgets_extra_sources) \
$(WILBER_IMAGES)
gimpwidgets-private.lo: gimp-wilber-pixbufs.h
$(libgimpwidgets_extra_sources)
#
# rules to generate built sources
#
# setup autogeneration dependancies
gen_sources = xgen-wec xgen-wmh xgen-wmc gimp-wilber-pixbufs.h
gen_sources = xgen-wec xgen-wmh xgen-wmc
CLEANFILES = $(gen_sources)
gimpwidgetsenums.c: $(srcdir)/gimpwidgetsenums.h $(GIMP_MKENUMS)
@ -332,10 +312,6 @@ gimpwidgetsmarshal.c: gimpwidgetsmarshal.h
&& rm -f xgen-wmc xgen-wmc~
gimp-wilber-pixbufs.h: $(WILBER_IMAGES) Makefile.am
$(AM_V_GEN) $(GDK_PIXBUF_CSOURCE) --raw --build-list $(WILBER_VARIABLES) > $(@F)
#
# test programs, not installed
#

View file

@ -32,8 +32,6 @@
#include "libgimp/libgimp-intl.h"
#include "gimp-wilber-pixbufs.h"
GimpHelpFunc _gimp_standard_help_func = NULL;
GimpGetColorFunc _gimp_get_foreground_func = NULL;
@ -66,18 +64,6 @@ gimp_widgets_init (GimpHelpFunc standard_help_func,
{
static gboolean gimp_widgets_initialized = FALSE;
GdkPixbuf *pixbuf;
GList *icon_list = NULL;
gint i;
const guint8 *inline_pixbufs[] =
{
wilber_64,
wilber_48,
wilber_32,
wilber_16
};
g_return_if_fail (standard_help_func != NULL);
if (gimp_widgets_initialized)
@ -90,15 +76,7 @@ gimp_widgets_init (GimpHelpFunc standard_help_func,
gimp_stock_init ();
for (i = 0; i < G_N_ELEMENTS (inline_pixbufs); i++)
{
pixbuf = gdk_pixbuf_new_from_inline (-1, inline_pixbufs[i], FALSE, NULL);
icon_list = g_list_prepend (icon_list, pixbuf);
}
gtk_window_set_default_icon_list (icon_list);
g_list_free_full (icon_list, (GDestroyNotify) g_object_unref);
gtk_window_set_default_icon_name (GIMP_STOCK_WILBER);
gimp_widgets_init_foreign_enums ();

Binary file not shown.

Before

Width:  |  Height:  |  Size: 765 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.5 KiB