cpw.malu.ft_thumbnails: f1575e13: Remove #ifdefs for older GDK versions, s...

malu at pidgin.im malu at pidgin.im
Thu Aug 27 16:01:49 EDT 2009


-----------------------------------------------------------------
Revision: f1575e130dab8a3f23a4319689f51681d9f39a60
Ancestor: 2ebe90f24910249a99bd4ffc0ce91e5cf16b60cc
Author: malu at pidgin.im
Date: 2009-08-27T19:55:08
Branch: im.pidgin.cpw.malu.ft_thumbnails
URL: http://d.pidgin.im/viewmtn/revision/info/f1575e130dab8a3f23a4319689f51681d9f39a60

Modified files:
        pidgin/gtkft.c

ChangeLog: 

Remove #ifdefs for older GDK versions, since this will not be included until
2.7.0 (at the earliest)

-------------- next part --------------
============================================================
--- pidgin/gtkft.c	88d2f4114d052ca5c7b0700efec4f9cdac37fffe
+++ pidgin/gtkft.c	7f16dcb14c8b9bd069fe14bd925852df12b131dc
@@ -1159,32 +1159,18 @@ pidgin_xfer_add_thumbnail(PurpleXfer *xf
 	purple_debug_info("pidgin", "creating thumbnail for transfer\n");
 
 	if (purple_xfer_get_size(xfer) <= PIDGIN_XFER_MAX_SIZE_IMAGE_THUMBNAIL) {
-#if GTK_CHECK_VERSION(2, 4, 0)
 		GdkPixbuf *thumbnail = 
 			gdk_pixbuf_new_from_file_at_size(
 				purple_xfer_get_local_filename(xfer), 128, 128, NULL);
-#else
-		GdkPixbuf *full_size =
-			gdk_pixbuf_from_file(purple_xfer_get_local_filename(xfer), NULL);
-		GdkPixbuf *thumbnail = NULL;
-		
-		if (full_size) {
-			thumbnail = gdk_pixbuf_scale_simple(full_size, 128, 128, 
-				GDK_INTERP_BILINEAR);
-			g_object_unref(full_size);
-		}
-#endif
+
 		if (thumbnail) {
 			gpointer *buffer = NULL;
 			gsize size;
-#if GTK_CHECK_VERSION(2, 4, 0)
 			char *option_keys[2] = {"quality", NULL};
 			char *option_values[2] = {"75", NULL};
 			gdk_pixbuf_save_to_bufferv(thumbnail, &buffer, &size, "jpeg", 
 				option_keys, option_values, NULL);
-#else
-			/* TODO: */
-#endif
+
 			if (buffer) {
 				purple_debug_info("pidgin", "created thumbnail of %d bytes\n",
 					size);


More information about the Commits mailing list