From fa3d3c2403a3fcdd7bd4b66cb2acb7baf40ab231 Mon Sep 17 00:00:00 2001 From: Milan Crha Date: Thu, 10 Jul 2014 21:01:42 +0200 Subject: Bug 722068 - Make Evolution build under Win32 This also makes gnome-desktop an optional dependency, which can be avoided with --disable-gnome-desktop configure option. --- e-util/e-icon-factory.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'e-util/e-icon-factory.c') diff --git a/e-util/e-icon-factory.c b/e-util/e-icon-factory.c index 43c1239b03..7aac6f61ce 100644 --- a/e-util/e-icon-factory.c +++ b/e-util/e-icon-factory.c @@ -29,9 +29,11 @@ #include #include +#ifdef HAVE_GNOME_DESKTOP #define GNOME_DESKTOP_USE_UNSTABLE_API #include #undef GNOME_DESKTOP_USE_UNSTABLE_API +#endif #include #include @@ -147,9 +149,11 @@ e_icon_factory_pixbuf_scale (GdkPixbuf *pixbuf, if (height <= 0) height = 1; + #ifdef HAVE_GNOME_DESKTOP /* because this can only scale down, not up */ if (gdk_pixbuf_get_width (pixbuf) > width && gdk_pixbuf_get_height (pixbuf) > height) return gnome_desktop_thumbnail_scale_down_pixbuf (pixbuf, width, height); + #endif return gdk_pixbuf_scale_simple (pixbuf, width, height, GDK_INTERP_BILINEAR); } @@ -166,6 +170,7 @@ e_icon_factory_pixbuf_scale (GdkPixbuf *pixbuf, gchar * e_icon_factory_create_thumbnail (const gchar *filename) { +#ifdef HAVE_GNOME_DESKTOP static GnomeDesktopThumbnailFactory *thumbnail_factory = NULL; struct stat file_stat; gchar *thumbnail = NULL; @@ -211,4 +216,7 @@ e_icon_factory_create_thumbnail (const gchar *filename) } return thumbnail; +#else + return NULL; +#endif /* HAVE_GNOME_DESKTOP */ } -- cgit v1.2.3