comparison src/dialogs.c @ 4769:e0afac5f85bd

[gaim-migrate @ 5087] save buddy icons when you add buddies to your list committer: Tailor Script <tailor@pidgin.im>
author Nathan Walp <nwalp@pidgin.im>
date Fri, 14 Mar 2003 08:27:13 +0000
parents e4dda06a3143
children c4c28874ecd3
comparison
equal deleted inserted replaced
4768:a1ea914506c9 4769:e0afac5f85bd
872 { 872 {
873 const char *grp, *who, *whoalias; 873 const char *grp, *who, *whoalias;
874 struct gaim_conversation *c; 874 struct gaim_conversation *c;
875 struct buddy *b; 875 struct buddy *b;
876 struct group *g; 876 struct group *g;
877 void *icon_data;
878 void *icon_data2;
879 int icon_len;
877 880
878 if (resp == GTK_RESPONSE_OK) { 881 if (resp == GTK_RESPONSE_OK) {
879 882
880 who = gtk_entry_get_text(GTK_ENTRY(a->entry)); 883 who = gtk_entry_get_text(GTK_ENTRY(a->entry));
881 grp = gtk_entry_get_text(GTK_ENTRY(GTK_COMBO(a->combo)->entry)); 884 grp = gtk_entry_get_text(GTK_ENTRY(GTK_COMBO(a->combo)->entry));
888 gaim_blist_add_buddy(b, g, NULL); 891 gaim_blist_add_buddy(b, g, NULL);
889 serv_add_buddy(a->gc, who); 892 serv_add_buddy(a->gc, who);
890 893
891 if (c != NULL) 894 if (c != NULL)
892 gaim_conversation_update(c, GAIM_CONV_UPDATE_ADD); 895 gaim_conversation_update(c, GAIM_CONV_UPDATE_ADD);
896
897 icon_data = get_icon_data(a->gc, normalize(who), &icon_len);
898
899 if(icon_data) {
900 icon_data2 = g_memdup(icon_data, icon_len);
901 set_icon_data(a->gc, who, icon_data2, icon_len);
902 g_free(icon_data2);
903 }
893 904
894 gaim_blist_save(); 905 gaim_blist_save();
895 } 906 }
896 907
897 destroy_dialog(NULL, a->window); 908 destroy_dialog(NULL, a->window);