comparison gtk/gtkutils.c @ 14658:b7b5ff9c04a1

[gaim-migrate @ 17404] Make things "go" with gtk 2.0. hopefully all those still using 2.0 dont't really care all that much for graphics and stuff as they're probably quite old now. committer: Tailor Script <tailor@pidgin.im>
author Stu Tomlinson <stu@nosnilmot.com>
date Sat, 30 Sep 2006 02:48:29 +0000
parents 4764c501fdb9
children 2e4690852fd7
comparison
equal deleted inserted replaced
14657:38d1052611bc 14658:b7b5ff9c04a1
2456 #endif 2456 #endif
2457 2457
2458 char * 2458 char *
2459 gaim_gtk_convert_buddy_icon(GaimPlugin *plugin, const char *path) 2459 gaim_gtk_convert_buddy_icon(GaimPlugin *plugin, const char *path)
2460 { 2460 {
2461 GaimPluginProtocolInfo *prpl_info;
2462 char **prpl_formats;
2461 #if GTK_CHECK_VERSION(2,2,0) 2463 #if GTK_CHECK_VERSION(2,2,0)
2462 int width, height; 2464 int width, height;
2463 char **pixbuf_formats = NULL; 2465 char **pixbuf_formats = NULL;
2464 GdkPixbufFormat *format; 2466 GdkPixbufFormat *format;
2465 GdkPixbuf *pixbuf; 2467 GdkPixbuf *pixbuf;
2466 GaimPluginProtocolInfo *prpl_info;
2467 char **prpl_formats;
2468 #if !GTK_CHECK_VERSION(2,4,0) 2468 #if !GTK_CHECK_VERSION(2,4,0)
2469 GdkPixbufLoader *loader; 2469 GdkPixbufLoader *loader;
2470 FILE *file; 2470 FILE *file;
2471 struct stat st; 2471 struct stat st;
2472 void *data = NULL; 2472 void *data = NULL;
2692 width = info->width; 2692 width = info->width;
2693 if (info->height > 0) 2693 if (info->height > 0)
2694 height = info->height; 2694 height = info->height;
2695 } 2695 }
2696 2696
2697 #if GTK_CHECK_VERSION(2,2,0) /* 2.0 users are going to have very strangely sized things */
2697 gdk_pixbuf_loader_set_size (loader, width, height); 2698 gdk_pixbuf_loader_set_size (loader, width, height);
2699 #else
2700 #warning nosnilmot could not be bothered to fix this properly for you
2701 #warning ... good luck ... your images may end up strange sizes
2702 #endif
2698 } 2703 }
2699 2704
2700 GdkPixbuf * 2705 GdkPixbuf *
2701 gdk_pixbuf_new_from_file_at_scale(const char *filename, int width, int height, 2706 gdk_pixbuf_new_from_file_at_scale(const char *filename, int width, int height,
2702 gboolean preserve_aspect_ratio, 2707 gboolean preserve_aspect_ratio,