Mercurial > pidgin
comparison src/protocols/jabber/jabber.c @ 6294:430693544643
[gaim-migrate @ 6793]
this should help out those who have NULL profiles on jabber. Thanks go to
Devin Bayer (mal0rd) for catching this.
committer: Tailor Script <tailor@pidgin.im>
author | Nathan Walp <nwalp@pidgin.im> |
---|---|
date | Thu, 24 Jul 2003 05:27:29 +0000 |
parents | ac191233b816 |
children | 3613007cbb6e |
comparison
equal
deleted
inserted
replaced
6293:70f48f166aee | 6294:430693544643 |
---|---|
4018 const struct vcard_template *vc_tp; | 4018 const struct vcard_template *vc_tp; |
4019 char *user_info; | 4019 char *user_info; |
4020 MultiEntryDlg *b = multi_entry_dialog_new(); | 4020 MultiEntryDlg *b = multi_entry_dialog_new(); |
4021 char *cdata; | 4021 char *cdata; |
4022 xmlnode x_vc_data = NULL; | 4022 xmlnode x_vc_data = NULL; |
4023 GaimAccount *tmp = gc->account; | 4023 |
4024 b->account = tmp; | 4024 b->account = gc->account; |
4025 | 4025 |
4026 | 4026 |
4027 /* | 4027 /* |
4028 * Get existing, XML-formatted, user info | 4028 * Get existing, XML-formatted, user info |
4029 */ | 4029 */ |
4030 if((user_info = g_malloc(strlen(tmp->user_info) + 1)) != NULL) { | 4030 if((user_info = g_strdup(gaim_account_get_user_info(gc->account))) != NULL) |
4031 strcpy(user_info, tmp->user_info); | |
4032 x_vc_data = xmlstr2xmlnode(user_info); | 4031 x_vc_data = xmlstr2xmlnode(user_info); |
4033 } | 4032 else |
4033 user_info = g_strdup(""); | |
4034 | 4034 |
4035 /* | 4035 /* |
4036 * Set up GSLists for edit with labels from "template," data from user info | 4036 * Set up GSLists for edit with labels from "template," data from user info |
4037 */ | 4037 */ |
4038 for(vc_tp = vcard_template_data; vc_tp->label != NULL; ++vc_tp) { | 4038 for(vc_tp = vcard_template_data; vc_tp->label != NULL; ++vc_tp) { |
4089 } | 4089 } |
4090 g_strfreev(str_list); | 4090 g_strfreev(str_list); |
4091 } | 4091 } |
4092 } | 4092 } |
4093 | 4093 |
4094 if(user_info != NULL) { | 4094 g_free(user_info); |
4095 g_free(user_info); | |
4096 } | |
4097 | 4095 |
4098 b->title = _("Gaim - Edit Jabber vCard"); | 4096 b->title = _("Gaim - Edit Jabber vCard"); |
4099 b->role = "set_info"; | 4097 b->role = "set_info"; |
4100 b->instructions->text = g_strdup(_(multi_entry_instructions)); | 4098 b->instructions->text = g_strdup(_(multi_entry_instructions)); |
4101 b->entries_title = g_strdup(_(entries_title)); | 4099 b->entries_title = g_strdup(_(entries_title)); |