[gimp] libgimpwidgets: use gtk_window_set_default_icon_name()



commit f8a9f39466967d490fa1607dcbfeb53ae725be6a
Author: Michael Natterer <mitch gimp org>
Date:   Sun Mar 29 21:00:11 2015 +0200

    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.

 .../wilber-32.png => icons/32/gimp-wilber.png      |  Bin 1759 -> 1759 bytes
 .../wilber-48.png => icons/48/gimp-wilber.png      |  Bin 3189 -> 3189 bytes
 icons/Makefile.am                                  |    8 +++--
 libgimpwidgets/.gitignore                          |    1 -
 libgimpwidgets/Makefile.am                         |   28 +------------------
 libgimpwidgets/gimpwidgets-private.c               |   24 +----------------
 libgimpwidgets/wilber-16.png                       |  Bin 765 -> 0 bytes
 libgimpwidgets/wilber-64.png                       |  Bin 4644 -> 0 bytes
 8 files changed, 8 insertions(+), 53 deletions(-)
---
diff --git a/icons/Makefile.am b/icons/Makefile.am
index 71b007c..373ae6b 100644
--- a/icons/Makefile.am
+++ b/icons/Makefile.am
@@ -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               \
diff --git a/libgimpwidgets/.gitignore b/libgimpwidgets/.gitignore
index 4ba0e12..7193989 100644
--- a/libgimpwidgets/.gitignore
+++ b/libgimpwidgets/.gitignore
@@ -5,7 +5,6 @@
 /Makefile
 /Makefile.in
 /_libs
-/gimp-wilber-pixbufs.h
 /gimpwidgetsmarshal.c
 /gimpwidgetsmarshal.h
 /makefile.mingw
diff --git a/libgimpwidgets/Makefile.am b/libgimpwidgets/Makefile.am
index bf1e95d..5ad18c3 100644
--- a/libgimpwidgets/Makefile.am
+++ b/libgimpwidgets/Makefile.am
@@ -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
 #
diff --git a/libgimpwidgets/gimpwidgets-private.c b/libgimpwidgets/gimpwidgets-private.c
index 61f9ac4..e9f19d4 100644
--- a/libgimpwidgets/gimpwidgets-private.c
+++ b/libgimpwidgets/gimpwidgets-private.c
@@ -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 ();
 


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