comparison src/prpl.c @ 2718:757688c301b5

[gaim-migrate @ 2731] eh. committer: Tailor Script <tailor@pidgin.im>
author Eric Warmenhoven <eric@warmenhoven.org>
date Wed, 14 Nov 2001 23:42:14 +0000
parents b0c5770156e1
children f3c094e78609
comparison
equal deleted inserted replaced
2717:03bf072c6238 2718:757688c301b5
468 return ((x->gc != y->gc) || g_strcasecmp(x->who, y->who)); 468 return ((x->gc != y->gc) || g_strcasecmp(x->who, y->who));
469 } 469 }
470 470
471 void set_icon_data(struct gaim_connection *gc, char *who, void *data, int len) 471 void set_icon_data(struct gaim_connection *gc, char *who, void *data, int len)
472 { 472 {
473 struct icon_data tmp = { gc, who, NULL, 0 }; 473 struct icon_data tmp = { gc, normalize(who), NULL, 0 };
474 GList *l = g_list_find_custom(icons, &tmp, find_icon_data); 474 GList *l = g_list_find_custom(icons, &tmp, find_icon_data);
475 struct icon_data *id = l ? l->data : NULL; 475 struct icon_data *id = l ? l->data : NULL;
476 476
477 if (id) { 477 if (id) {
478 g_free(id->data); 478 g_free(id->data);
484 } 484 }
485 } else if (data) { 485 } else if (data) {
486 id = g_new0(struct icon_data, 1); 486 id = g_new0(struct icon_data, 1);
487 icons = g_list_append(icons, id); 487 icons = g_list_append(icons, id);
488 id->gc = gc; 488 id->gc = gc;
489 id->who = g_strdup(who); 489 id->who = g_strdup(normalize(who));
490 } else { 490 } else {
491 return; 491 return;
492 } 492 }
493 493
494 debug_printf("Got icon for %s (length %d)\n", who, len); 494 debug_printf("Got icon for %s (length %d)\n", who, len);
516 } 516 }
517 } 517 }
518 518
519 void *get_icon_data(struct gaim_connection *gc, char *who, int *len) 519 void *get_icon_data(struct gaim_connection *gc, char *who, int *len)
520 { 520 {
521 struct icon_data tmp = { gc, who, NULL, 0 }; 521 struct icon_data tmp = { gc, normalize(who), NULL, 0 };
522 GList *l = g_list_find_custom(icons, &tmp, find_icon_data); 522 GList *l = g_list_find_custom(icons, &tmp, find_icon_data);
523 struct icon_data *id = l ? l->data : NULL; 523 struct icon_data *id = l ? l->data : NULL;
524 524
525 if (id) { 525 if (id) {
526 *len = id->len; 526 *len = id->len;