[Commits] [SCM] claws branch, master, updated. 3.17.3-127-geab0ddd

ticho at claws-mail.org ticho at claws-mail.org
Wed Mar 6 18:11:45 CET 2019


The branch, master has been updated
       via  eab0ddd5f10c2a5a9ee487015d8922c5404c7227 (commit)
      from  9fb890dee9461adf155c1048afe73501c527796f (commit)

Summary of changes:
 configure.ac       |    4 +++-
 src/image_viewer.c |    8 ++++++++
 2 files changed, 11 insertions(+), 1 deletion(-)


- Log -----------------------------------------------------------------
commit eab0ddd5f10c2a5a9ee487015d8922c5404c7227
Author: Andrej Kacian <ticho at claws-mail.org>
Date:   Wed Mar 6 18:11:03 2019 +0100

    Restore compatibility with gdk-pixbuf version 2.26

diff --git a/configure.ac b/configure.ac
index 6ae4c10..412a3f0 100644
--- a/configure.ac
+++ b/configure.ac
@@ -440,7 +440,7 @@ dnl ** common code **
 dnl *****************
 
 dnl check for glib
-PKG_CHECK_MODULES(GLIB, glib-2.0 >= 2.28 gmodule-2.0 >= 2.28 gobject-2.0 >= 2.28 gthread-2.0 >= 2.28)
+PKG_CHECK_MODULES(GLIB, [glib-2.0 >= 2.28 gmodule-2.0 >= 2.28 gobject-2.0 >= 2.28 gthread-2.0 >= 2.28])
 
 GLIB_GENMARSHAL=`$PKG_CONFIG --variable=glib_genmarshal glib-2.0`
 AC_SUBST(GLIB_GENMARSHAL)
@@ -448,6 +448,8 @@ AC_SUBST(GLIB_GENMARSHAL)
 AC_SUBST(GLIB_CFLAGS)
 AC_SUBST(GLIB_LIBS)
 
+PKG_CHECK_MODULES(GDK_PIXBUF, [gdk-pixbuf-2.0 >= 2.26])
+
 dnl Check for bind_textdomain_codeset, including -lintl if GLib brings it in.
 syl_save_LIBS=$LIBS
 LIBS="$LIBS $GTK_LIBS"
diff --git a/src/image_viewer.c b/src/image_viewer.c
index bd33c94..f3f732c 100644
--- a/src/image_viewer.c
+++ b/src/image_viewer.c
@@ -89,7 +89,11 @@ static void image_viewer_load_image(ImageViewer *imageviewer)
 		return;
 	}
 
+#if GDK_PIXBUF_CHECK_VERSION(2, 28, 0)
 	animation = gdk_pixbuf_animation_new_from_stream(stream, NULL, &error);
+#else
+	pixbuf = gdk_pixbuf_new_from_stream(stream, NULL, &error);
+#endif
 	g_object_unref(stream);
 
 	if (error != NULL) {
@@ -98,12 +102,16 @@ static void image_viewer_load_image(ImageViewer *imageviewer)
 		return;
 	}
 
+#if GDK_PIXBUF_CHECK_VERSION(2, 28, 0)
 	if (gdk_pixbuf_animation_is_static_image(animation)
 	    || imageviewer->resize_img) {
 		pixbuf = gdk_pixbuf_animation_get_static_image(animation);
 		g_object_ref(pixbuf);
 		g_object_unref(animation);
 		animation = NULL;
+#else
+	if (imageviewer->resize_img) {
+#endif
 
 		if (imageviewer->resize_img) {
 			gtk_widget_get_allocation(

-----------------------------------------------------------------------


hooks/post-receive
-- 
Claws Mail


More information about the Commits mailing list