comparison gtk/gtkutils.c @ 15258:cfdd47296dbc

[gaim-migrate @ 18048] Fixes for compiling and running with Gtk 2.0 ! committer: Tailor Script <tailor@pidgin.im>
author Stu Tomlinson <stu@nosnilmot.com>
date Fri, 22 Dec 2006 19:15:38 +0000
parents 7ce73985115a
children ca7cc867fa58
comparison
equal deleted inserted replaced
15257:b380e326d602 15258:cfdd47296dbc
2464 GaimPluginProtocolInfo *prpl_info; 2464 GaimPluginProtocolInfo *prpl_info;
2465 #if GTK_CHECK_VERSION(2,2,0) 2465 #if GTK_CHECK_VERSION(2,2,0)
2466 char **prpl_formats; 2466 char **prpl_formats;
2467 int width, height; 2467 int width, height;
2468 char **pixbuf_formats = NULL; 2468 char **pixbuf_formats = NULL;
2469 struct stat st;
2469 GdkPixbufFormat *format; 2470 GdkPixbufFormat *format;
2470 GdkPixbuf *pixbuf; 2471 GdkPixbuf *pixbuf;
2471 #if !GTK_CHECK_VERSION(2,4,0) 2472 #if !GTK_CHECK_VERSION(2,4,0)
2472 GdkPixbufLoader *loader; 2473 GdkPixbufLoader *loader;
2473 #endif 2474 #endif
2475 gchar *contents; 2476 gchar *contents;
2476 gsize length; 2477 gsize length;
2477 const char *dirname; 2478 const char *dirname;
2478 char *random; 2479 char *random;
2479 char *filename; 2480 char *filename;
2480 struct stat st;
2481 2481
2482 prpl_info = GAIM_PLUGIN_PROTOCOL_INFO(plugin); 2482 prpl_info = GAIM_PLUGIN_PROTOCOL_INFO(plugin);
2483 2483
2484 g_return_val_if_fail(prpl_info->icon_spec.format != NULL, NULL); 2484 g_return_val_if_fail(prpl_info->icon_spec.format != NULL, NULL);
2485 2485
2813 2813
2814 g_object_unref (loader); 2814 g_object_unref (loader);
2815 2815
2816 return pixbuf; 2816 return pixbuf;
2817 } 2817 }
2818 #endif 2818 #endif /* ! Gtk 2.6.0 */
2819 2819
2820 void gaim_gtk_set_custom_buddy_icon(GaimAccount *account, const char *who, const char *filename) 2820 void gaim_gtk_set_custom_buddy_icon(GaimAccount *account, const char *who, const char *filename)
2821 { 2821 {
2822 GaimConversation *conv; 2822 GaimConversation *conv;
2823 GaimBuddy *buddy; 2823 GaimBuddy *buddy;
3090 g_free(normalized); 3090 g_free(normalized);
3091 3091
3092 return result; 3092 return result;
3093 } 3093 }
3094 3094
3095
3096 #if !GTK_CHECK_VERSION(2,2,0)
3097 GtkTreePath *
3098 gtk_tree_path_new_from_indices (gint first_index, ...)
3099 {
3100 int arg;
3101 va_list args;
3102 GtkTreePath *path;
3103
3104 path = gtk_tree_path_new ();
3105
3106 va_start (args, first_index);
3107 arg = first_index;
3108
3109 while (arg != -1)
3110 {
3111 gtk_tree_path_append_index (path, arg);
3112 arg = va_arg (args, gint);
3113 }
3114
3115 va_end (args);
3116
3117 return path;
3118 }
3119 #endif