# HG changeset patch # User Marcus Lundblad # Date 1251402908 0 # Node ID 852ce9929402e56d151846682519d09486ed3d77 # Parent 1da2ea10c2d063d2f803207d8da21f7499f5f81e Remove #ifdefs for older GDK versions, since this will not be included until 2.7.0 (at the earliest) diff -r 1da2ea10c2d0 -r 852ce9929402 pidgin/gtkft.c --- a/pidgin/gtkft.c Thu Aug 27 18:46:55 2009 +0000 +++ b/pidgin/gtkft.c Thu Aug 27 19:55:08 2009 +0000 @@ -1159,32 +1159,18 @@ 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);