| 239 add_user_options(dialog, dialog->top_vbox); |
239 add_user_options(dialog, dialog->top_vbox); |
| 240 add_protocol_options(dialog, dialog->bottom_vbox); |
240 add_protocol_options(dialog, dialog->bottom_vbox); |
| 241 |
241 |
| 242 gtk_widget_grab_focus(dialog->protocol_menu); |
242 gtk_widget_grab_focus(dialog->protocol_menu); |
| 243 |
243 |
| 244 if (!dialog->prpl_info || !dialog->prpl_info->register_user || |
244 if (!dialog->prpl_info || !dialog->prpl_info->register_user || |
| 245 g_object_get_data(G_OBJECT(item), "fake")) { |
245 g_object_get_data(G_OBJECT(item), "fake")) { |
| 246 gtk_widget_hide(dialog->register_button); |
246 gtk_widget_hide(dialog->register_button); |
| 247 } else { |
247 } else { |
| 248 if (dialog->prpl_info != NULL && |
248 if (dialog->prpl_info != NULL && |
| 249 (dialog->prpl_info->options & OPT_PROTO_REGISTER_NOSCREENNAME)) { |
249 (dialog->prpl_info->options & OPT_PROTO_REGISTER_NOSCREENNAME)) { |
| 2476 alert = pidgin_make_mini_dialog(gc, PIDGIN_STOCK_DIALOG_QUESTION, |
2476 alert = pidgin_make_mini_dialog(gc, PIDGIN_STOCK_DIALOG_QUESTION, |
| 2477 _("Authorize buddy?"), buffer, aa, |
2477 _("Authorize buddy?"), buffer, aa, |
| 2478 _("Authorize"), authorize_and_add_cb, |
2478 _("Authorize"), authorize_and_add_cb, |
| 2479 _("Deny"), deny_no_add_cb, |
2479 _("Deny"), deny_no_add_cb, |
| 2480 NULL); |
2480 NULL); |
| |
2481 g_object_set_data(G_OBJECT(alert), "auth_and_add", aa); |
| 2481 } else { |
2482 } else { |
| 2482 alert = pidgin_make_mini_dialog(gc, PIDGIN_STOCK_DIALOG_QUESTION, |
2483 alert = pidgin_make_mini_dialog(gc, PIDGIN_STOCK_DIALOG_QUESTION, |
| 2483 _("Authorize buddy?"), buffer, user_data, |
2484 _("Authorize buddy?"), buffer, user_data, |
| 2484 _("Authorize"), auth_cb, |
2485 _("Authorize"), auth_cb, |
| 2485 _("Deny"), deny_cb, |
2486 _("Deny"), deny_cb, |
| 2487 } |
2488 } |
| 2488 pidgin_blist_add_alert(alert); |
2489 pidgin_blist_add_alert(alert); |
| 2489 |
2490 |
| 2490 g_free(buffer); |
2491 g_free(buffer); |
| 2491 |
2492 |
| 2492 return NULL; |
2493 return alert; |
| 2493 } |
2494 } |
| 2494 |
2495 |
| 2495 static void |
2496 static void |
| 2496 pidgin_accounts_request_close(void *ui_handle) |
2497 pidgin_accounts_request_close(void *ui_handle) |
| 2497 { |
2498 { |
| 2498 |
2499 /* This is super ugly, but without API changes, this is how it works */ |
| |
2500 struct auth_and_add *aa = g_object_get_data(G_OBJECT(ui_handle), "auth_and_add"); |
| |
2501 if (aa != NULL) { |
| |
2502 g_free(aa->username); |
| |
2503 g_free(aa->alias); |
| |
2504 g_free(aa); |
| |
2505 } |
| |
2506 gtk_widget_destroy(GTK_WIDGET(ui_handle)); |
| 2499 } |
2507 } |
| 2500 |
2508 |
| 2501 static PurpleAccountUiOps ui_ops = |
2509 static PurpleAccountUiOps ui_ops = |
| 2502 { |
2510 { |
| 2503 pidgin_accounts_notify_added, |
2511 pidgin_accounts_notify_added, |