[gtkmm] Pixbuf: Derive from (and implement) Gio::Icon.



commit e43c56de0297813825cac5076f7c442237f9518e
Author: Murray Cumming <murrayc murrayc com>
Date:   Thu Dec 16 11:08:43 2010 +0100

    Pixbuf: Derive from (and implement) Gio::Icon.
    
    * configure.ac: Require the latest gdk-pixbuf. This is also needed for
    gdk_pixbuf_format_get_type() and similar functions.
    * gdk/src/pixbuf.hg: Derive from Gio::Icon and implement that interface.
    This is a recent change in gdk-pixbuf.

 ChangeLog         |    9 +++++++++
 configure.ac      |    5 +++--
 gdk/src/pixbuf.hg |    6 +++++-
 3 files changed, 17 insertions(+), 3 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 3cdae8e..58b3a70 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2010-12-16  Murray Cumming  <murrayc murrayc com>
+
+	Pixbuf: Derive from (and implement) Gio::Icon.
+
+	* configure.ac: Require the latest gdk-pixbuf. This is also needed for 
+	gdk_pixbuf_format_get_type() and similar functions.
+	* gdk/src/pixbuf.hg: Derive from Gio::Icon and implement that interface.
+	This is a recent change in gdk-pixbuf.
+
 2010-12-15  Murray Cumming  <murrayc murrayc com>
 
 	Fix the build with latest GTK+ from git master.
diff --git a/configure.ac b/configure.ac
index d6a52ed..26208a2 100644
--- a/configure.ac
+++ b/configure.ac
@@ -53,8 +53,9 @@ AS_IF([test "x$enable_static" = xyes],
       [AC_DEFINE([GTKMM_STATIC_LIB], [1], [Define when building gtkmm as a static library])])
 
 # gdkmm really does need GTK+, because part of Gdk::DragContext is in GTK+.
-# The extra cairomm check is because gdkmm requires a newer cairomm than pangomm requires.
-AC_SUBST([GDKMM_MODULES], ['giomm-2.4 >= 2.27.0 pangomm-1.4 >= 2.26 gtk+-3.0 >= 2.91.6 cairomm-1.0 >= 1.9.2'])
+# The extra cairomm-1.0 check is because gdkmm requires a newer cairomm than pangomm requires.
+# The extra gdk-pixbuf-2.0 check is because gdkmm requires a newer gdk-pixbuf than gtk+-3.0 requires.
+AC_SUBST([GDKMM_MODULES], ['giomm-2.4 >= 2.27.0 pangomm-1.4 >= 2.26 gtk+-3.0 >= 2.91.6 cairomm-1.0 >= 1.9.2 gdk-pixbuf-2.0 >= 2.22.1'])
 
 AS_IF([test "x$gtkmm_host_windows" = xyes],
       [GTKMM_MODULES=$GDKMM_MODULES],
diff --git a/gdk/src/pixbuf.hg b/gdk/src/pixbuf.hg
index e40dee5..fdfbad0 100644
--- a/gdk/src/pixbuf.hg
+++ b/gdk/src/pixbuf.hg
@@ -23,6 +23,7 @@ _CONFIGINCLUDE(gdkmmconfig.h)
 #include <gdkmm/pixbufformat.h>
 #include <gdkmm/types.h>
 #include <giomm/inputstream.h>
+#include <giomm/icon.h>
 
 _DEFS(gdkmm,gdk)
 _PINCLUDE(glibmm/private/object_p.h)
@@ -43,9 +44,12 @@ _WRAP_ENUM(PixbufRotation, GdkPixbufRotation)
  */
 _WRAP_GERROR(PixbufError,GdkPixbufError,GDK_PIXBUF_ERROR)
 
-class Pixbuf : public Glib::Object
+class Pixbuf
+  : public Glib::Object,
+    public Gio::Icon
 {
   _CLASS_GOBJECT(Pixbuf, GdkPixbuf, GDK_PIXBUF, Glib::Object, GObject)
+  _IMPLEMENTS_INTERFACE(Gio::Icon)
   _IGNORE(gdk_pixbuf_ref, gdk_pixbuf_unref, gdk_pixbuf_render_pixmap_and_mask,
       gdk_pixbuf_get_from_image,
       gdk_pixbuf_set_option, gdk_pixbuf_get_option, gdk_pixbuf_non_anim_new)



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