Mercurial > pidgin
diff src/gtkutils.c @ 14141:5f656a0a82b7
[gaim-migrate @ 16783]
Whitespace and warning fixes:
gtkaccount.c: In function ¡Æicon_select_cb¡Ç:
gtkaccount.c:289: warning: passing argument 1 of
¡Ægaim_gtk_buddy_icon_chooser_new¡Ç from incompatible pointer type
gtkaccount.c:289: warning: passing argument 2 of
¡Ægaim_gtk_buddy_icon_chooser_new¡Ç from incompatible pointer type
gtkstatusbox.c: In function ¡Æicon_box_press_cb¡Ç:
gtkstatusbox.c:951: warning: passing argument 2 of
¡Ægaim_gtk_buddy_icon_chooser_new¡Ç from incompatible pointer type
gtkstatusbox.c:951: warning: ISO C90 forbids mixed declarations and code
gtkstatusbox.c: In function ¡Æicon_box_enter_cb¡Ç:
gtkstatusbox.c:960: warning: passing argument 1 of ¡Ægtk_image_set_from_pixbuf¡Ç
from incompatible pointer type
gtkstatusbox.c: In function ¡Æicon_box_leave_cb¡Ç:
gtkstatusbox.c:968: warning: passing argument 1 of ¡Ægtk_image_set_from_pixbuf¡Ç
from incompatible pointer type
gtkstatusbox.c: In function ¡Ægtk_gaim_status_box_size_allocate¡Ç:
gtkstatusbox.c:1183: warning: passing argument 1 of ¡Ægtk_image_set_from_pixbuf¡Ç
from incompatible pointer type
gtkstatusbox.c: In function ¡Ægtk_gaim_status_box_set_buddy_icon¡Ç:
gtkstatusbox.c:1338: warning: passing argument 1 of ¡Ægtk_image_set_from_pixbuf¡Ç
from incompatible pointer type
gtkutils.c: In function ¡Ægaim_gtk_convert_buddy_icon¡Ç:
gtkutils.c:2463: warning: ISO C90 forbids mixed declarations and code
committer: Tailor Script <tailor@pidgin.im>
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Wed, 16 Aug 2006 06:31:59 +0000 |
parents | 4006d3dc2871 |
children | 92f5e6f3acfb |
line wrap: on
line diff
--- a/src/gtkutils.c Wed Aug 16 06:11:10 2006 +0000 +++ b/src/gtkutils.c Wed Aug 16 06:31:59 2006 +0000 @@ -2358,14 +2358,13 @@ } -GtkWidget *gaim_gtk_buddy_icon_chooser_new(GtkWindow *parent, void(*callback)(const char*,gpointer), gpointer data) { +GtkWidget *gaim_gtk_buddy_icon_chooser_new(GtkWindow *parent, void(*callback)(const char *, gpointer), gpointer data) { struct _icon_chooser *dialog = g_new0(struct _icon_chooser, 1); #if !GTK_CHECK_VERSION(2,4,0) /* FILECHOOSER */ GtkWidget *hbox; GtkWidget *tv; GtkTreeSelection *sel; - #endif /* FILECHOOSER */ const char *current_folder; @@ -2457,15 +2456,13 @@ char* gaim_gtk_convert_buddy_icon(GaimPlugin *plugin, const char *path) { - g_return_val_if_fail(GAIM_PLUGIN_PROTOCOL_INFO(plugin)->icon_spec.format != NULL, NULL); - #if GTK_CHECK_VERSION(2,2,0) int width, height; char **pixbuf_formats = NULL; GdkPixbufFormat *format; GdkPixbuf *pixbuf; - GaimPluginProtocolInfo *prpl_info = GAIM_PLUGIN_PROTOCOL_INFO(plugin); - char **prpl_formats = g_strsplit (prpl_info->icon_spec.format,",",0); + GaimPluginProtocolInfo *prpl_info; + char **prpl_formats; #if !GTK_CHECK_VERSION(2,4,0) GdkPixbufLoader *loader; FILE *file; @@ -2473,9 +2470,18 @@ void *data = NULL; #endif #endif - const char *dirname = gaim_buddy_icons_get_cache_dir(); - char *random = g_strdup_printf("%x", g_random_int()); - char *filename = g_build_filename(dirname, random, NULL); + const char *dirname; + char *random; + char *filename; + + prpl_info = GAIM_PLUGIN_PROTOCOL_INFO(plugin); + + g_return_val_if_fail(prpl_info->icon_spec.format != NULL, NULL); + + prpl_formats = g_strsplit(prpl_info->icon_spec.format,",",0); + dirname = gaim_buddy_icons_get_cache_dir(); + random = g_strdup_printf("%x", g_random_int()); + filename = g_build_filename(dirname, random, NULL); if (!g_file_test(dirname, G_FILE_TEST_IS_DIR)) { gaim_debug_info("buddyicon", "Creating icon cache directory.\n");