Mercurial > pidgin
comparison 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 |
comparison
equal
deleted
inserted
replaced
14140:ee80f766b7e3 | 14141:5f656a0a82b7 |
---|---|
2356 g_free(size); | 2356 g_free(size); |
2357 g_free(markup); | 2357 g_free(markup); |
2358 } | 2358 } |
2359 | 2359 |
2360 | 2360 |
2361 GtkWidget *gaim_gtk_buddy_icon_chooser_new(GtkWindow *parent, void(*callback)(const char*,gpointer), gpointer data) { | 2361 GtkWidget *gaim_gtk_buddy_icon_chooser_new(GtkWindow *parent, void(*callback)(const char *, gpointer), gpointer data) { |
2362 struct _icon_chooser *dialog = g_new0(struct _icon_chooser, 1); | 2362 struct _icon_chooser *dialog = g_new0(struct _icon_chooser, 1); |
2363 | 2363 |
2364 #if !GTK_CHECK_VERSION(2,4,0) /* FILECHOOSER */ | 2364 #if !GTK_CHECK_VERSION(2,4,0) /* FILECHOOSER */ |
2365 GtkWidget *hbox; | 2365 GtkWidget *hbox; |
2366 GtkWidget *tv; | 2366 GtkWidget *tv; |
2367 GtkTreeSelection *sel; | 2367 GtkTreeSelection *sel; |
2368 | |
2369 #endif /* FILECHOOSER */ | 2368 #endif /* FILECHOOSER */ |
2370 const char *current_folder; | 2369 const char *current_folder; |
2371 | 2370 |
2372 dialog->callback = callback; | 2371 dialog->callback = callback; |
2373 dialog->data = data; | 2372 dialog->data = data; |
2455 #endif | 2454 #endif |
2456 | 2455 |
2457 char* | 2456 char* |
2458 gaim_gtk_convert_buddy_icon(GaimPlugin *plugin, const char *path) | 2457 gaim_gtk_convert_buddy_icon(GaimPlugin *plugin, const char *path) |
2459 { | 2458 { |
2460 g_return_val_if_fail(GAIM_PLUGIN_PROTOCOL_INFO(plugin)->icon_spec.format != NULL, NULL); | |
2461 | |
2462 #if GTK_CHECK_VERSION(2,2,0) | 2459 #if GTK_CHECK_VERSION(2,2,0) |
2463 int width, height; | 2460 int width, height; |
2464 char **pixbuf_formats = NULL; | 2461 char **pixbuf_formats = NULL; |
2465 GdkPixbufFormat *format; | 2462 GdkPixbufFormat *format; |
2466 GdkPixbuf *pixbuf; | 2463 GdkPixbuf *pixbuf; |
2467 GaimPluginProtocolInfo *prpl_info = GAIM_PLUGIN_PROTOCOL_INFO(plugin); | 2464 GaimPluginProtocolInfo *prpl_info; |
2468 char **prpl_formats = g_strsplit (prpl_info->icon_spec.format,",",0); | 2465 char **prpl_formats; |
2469 #if !GTK_CHECK_VERSION(2,4,0) | 2466 #if !GTK_CHECK_VERSION(2,4,0) |
2470 GdkPixbufLoader *loader; | 2467 GdkPixbufLoader *loader; |
2471 FILE *file; | 2468 FILE *file; |
2472 struct stat st; | 2469 struct stat st; |
2473 void *data = NULL; | 2470 void *data = NULL; |
2474 #endif | 2471 #endif |
2475 #endif | 2472 #endif |
2476 const char *dirname = gaim_buddy_icons_get_cache_dir(); | 2473 const char *dirname; |
2477 char *random = g_strdup_printf("%x", g_random_int()); | 2474 char *random; |
2478 char *filename = g_build_filename(dirname, random, NULL); | 2475 char *filename; |
2476 | |
2477 prpl_info = GAIM_PLUGIN_PROTOCOL_INFO(plugin); | |
2478 | |
2479 g_return_val_if_fail(prpl_info->icon_spec.format != NULL, NULL); | |
2480 | |
2481 prpl_formats = g_strsplit(prpl_info->icon_spec.format,",",0); | |
2482 dirname = gaim_buddy_icons_get_cache_dir(); | |
2483 random = g_strdup_printf("%x", g_random_int()); | |
2484 filename = g_build_filename(dirname, random, NULL); | |
2479 | 2485 |
2480 if (!g_file_test(dirname, G_FILE_TEST_IS_DIR)) { | 2486 if (!g_file_test(dirname, G_FILE_TEST_IS_DIR)) { |
2481 gaim_debug_info("buddyicon", "Creating icon cache directory.\n"); | 2487 gaim_debug_info("buddyicon", "Creating icon cache directory.\n"); |
2482 | 2488 |
2483 if (g_mkdir(dirname, S_IRUSR | S_IWUSR | S_IXUSR) < 0) { | 2489 if (g_mkdir(dirname, S_IRUSR | S_IWUSR | S_IXUSR) < 0) { |