pidgin/plugins/disco/gtkdisco.c

changeset 41962
f802660eaef2
parent 41854
c1d7e7445b0f
child 42034
f05baca349b3
equal deleted inserted replaced
41961:0da91f053305 41962:f802660eaef2
204 G_GNUC_UNUSED GVariant *parameter, 204 G_GNUC_UNUSED GVariant *parameter,
205 gpointer data) 205 gpointer data)
206 { 206 {
207 PidginDiscoDialog *dialog = data; 207 PidginDiscoDialog *dialog = data;
208 PurpleConnection *pc; 208 PurpleConnection *pc;
209 PurpleContactInfo *info = NULL;
209 PidginDiscoList *pdl; 210 PidginDiscoList *pdl;
210 const char *username; 211 const char *username;
211 const char *at, *slash; 212 const char *at, *slash;
212 char *server = NULL; 213 char *server = NULL;
213 214
232 233
233 pdl->dialog = dialog; 234 pdl->dialog = dialog;
234 235
235 gtk_widget_set_sensitive(dialog->account_chooser, FALSE); 236 gtk_widget_set_sensitive(dialog->account_chooser, FALSE);
236 237
237 username = purple_account_get_username(dialog->account); 238 info = PURPLE_CONTACT_INFO(dialog->account);
239 username = purple_contact_info_get_username(info);
238 at = strchr(username, '@'); 240 at = strchr(username, '@');
239 slash = strchr(username, '/'); 241 slash = strchr(username, '/');
240 if (at && !slash) { 242 if (at && !slash) {
241 server = g_strdup(at + 1); 243 server = g_strdup(at + 1);
242 } else if (at && slash && at + 1 < slash) { 244 } else if (at && slash && at + 1 < slash) {

mercurial