| 518 GntWidget *window, *hbox; |
518 GntWidget *window, *hbox; |
| 519 GntWidget *combo, *button, *entry; |
519 GntWidget *combo, *button, *entry; |
| 520 GList *list, *iter; |
520 GList *list, *iter; |
| 521 AccountEditDialog *dialog; |
521 AccountEditDialog *dialog; |
| 522 PurpleProtocol *protocol; |
522 PurpleProtocol *protocol; |
| |
523 PurpleProtocolManager *protocol_manager = NULL; |
| 523 gchar *password = NULL; |
524 gchar *password = NULL; |
| 524 |
525 |
| 525 password = purple_credential_manager_read_password_finish(manager, res, |
526 password = purple_credential_manager_read_password_finish(manager, res, |
| 526 NULL); |
527 NULL); |
| 527 |
528 |
| 534 if (dlg->account == account) |
535 if (dlg->account == account) |
| 535 return; |
536 return; |
| 536 } |
537 } |
| 537 } |
538 } |
| 538 |
539 |
| 539 list = purple_protocols_get_all(); |
540 protocol_manager = purple_protocol_manager_get_default(); |
| |
541 list = purple_protocol_manager_get_all(protocol_manager); |
| 540 if (list == NULL) { |
542 if (list == NULL) { |
| 541 purple_notify_error(NULL, _("Error"), |
543 purple_notify_error(NULL, _("Error"), |
| 542 _("There are no protocols installed."), |
544 _("There are no protocols installed."), |
| 543 _("(You probably forgot to 'make install'.)"), |
545 _("(You probably forgot to 'make install'.)"), |
| 544 purple_request_cpar_from_account(account)); |
546 purple_request_cpar_from_account(account)); |
| 566 { |
568 { |
| 567 gnt_combo_box_add_data(GNT_COMBO_BOX(combo), iter->data, |
569 gnt_combo_box_add_data(GNT_COMBO_BOX(combo), iter->data, |
| 568 purple_protocol_get_name(PURPLE_PROTOCOL(iter->data))); |
570 purple_protocol_get_name(PURPLE_PROTOCOL(iter->data))); |
| 569 } |
571 } |
| 570 |
572 |
| 571 protocol = purple_protocols_find(purple_account_get_protocol_id(account)); |
573 protocol = purple_account_get_protocol(account); |
| 572 |
574 |
| 573 if (account && protocol) |
575 if (account && protocol) |
| 574 gnt_combo_box_set_selected(GNT_COMBO_BOX(combo), protocol); |
576 gnt_combo_box_set_selected(GNT_COMBO_BOX(combo), protocol); |
| 575 else |
577 else |
| 576 gnt_combo_box_set_selected(GNT_COMBO_BOX(combo), list->data); |
578 gnt_combo_box_set_selected(GNT_COMBO_BOX(combo), list->data); |