comparison src/buddyicon.c @ 10934:185ca25b5c7e

[gaim-migrate @ 12717] sf patch #1197984, from Richard Laager Add a buddy icon cached signal committer: Tailor Script <tailor@pidgin.im>
author Mark Doliner <mark@kingant.net>
date Tue, 24 May 2005 04:19:19 +0000
parents dc59482c8d37
children e8e535ad720b
comparison
equal deleted inserted replaced
10933:f43113333717 10934:185ca25b5c7e
237 { 237 {
238 fwrite(data, 1, len, file); 238 fwrite(data, 1, len, file);
239 fclose(file); 239 fclose(file);
240 } 240 }
241 241
242 gaim_signal_emit(gaim_buddy_icons_get_handle(), "buddy-icon-cached",
243 icon, buddy, filename, old_icon);
244
242 g_free(filename); 245 g_free(filename);
243 246
244 if (old_icon != NULL) 247 if (old_icon != NULL)
245 { 248 {
246 if(!g_stat(old_icon, &st)) 249 if(!g_stat(old_icon, &st))
442 account_cache = g_hash_table_new_full( 445 account_cache = g_hash_table_new_full(
443 g_direct_hash, g_direct_equal, 446 g_direct_hash, g_direct_equal,
444 NULL, (GFreeFunc)g_hash_table_destroy); 447 NULL, (GFreeFunc)g_hash_table_destroy);
445 448
446 cache_dir = g_build_filename(gaim_user_dir(), "icons", NULL); 449 cache_dir = g_build_filename(gaim_user_dir(), "icons", NULL);
450
451 gaim_signal_register(gaim_buddy_icons_get_handle(), "buddy-icon-cached",
452 gaim_marshal_VOID__POINTER_POINTER_POINTER_POINTER, NULL, 4,
453 gaim_value_new(GAIM_TYPE_SUBTYPE,
454 GAIM_SUBTYPE_BUDDY_ICON),
455 gaim_value_new(GAIM_TYPE_SUBTYPE,
456 GAIM_SUBTYPE_BLIST_BUDDY),
457 gaim_value_new(GAIM_TYPE_STRING),
458 gaim_value_new(GAIM_TYPE_STRING));
447 } 459 }
448 460
449 void 461 void
450 gaim_buddy_icons_uninit() 462 gaim_buddy_icons_uninit()
451 { 463 {