Mercurial > pidgin
diff src/gtkaccount.c @ 9304:96c481da57ea
[gaim-migrate @ 10112]
Protocol-specific settings for accounts were being removed whenever the account was modified. Now they're only removed when the protocol type changes, as it should be.
committer: Tailor Script <tailor@pidgin.im>
| author | Christian Hammond <chipx86@chipx86.com> |
|---|---|
| date | Fri, 18 Jun 2004 04:33:28 +0000 |
| parents | 4ffbbe330ee5 |
| children | b3bda982996b |
line wrap: on
line diff
--- a/src/gtkaccount.c Thu Jun 17 01:34:58 2004 +0000 +++ b/src/gtkaccount.c Fri Jun 18 04:33:28 2004 +0000 @@ -201,7 +201,17 @@ set_account_protocol_cb(GtkWidget *item, const char *id, AccountPrefsDialog *dialog) { - if ((dialog->plugin = gaim_find_prpl(id)) != NULL) { + GaimPlugin *new_plugin; + + new_plugin = gaim_find_prpl(id); + + if (new_plugin == dialog->plugin) + return; + + dialog->plugin = new_plugin; + + if (dialog->plugin != NULL) + { dialog->prpl_info = GAIM_PLUGIN_PROTOCOL_INFO(dialog->plugin); if (dialog->protocol_id != NULL) @@ -210,6 +220,9 @@ dialog->protocol_id = g_strdup(dialog->plugin->info->id); } + if (dialog->account != NULL) + gaim_account_clear_settings(dialog->account); + add_login_options(dialog, dialog->top_vbox); add_user_options(dialog, dialog->top_vbox); add_protocol_options(dialog, dialog->bottom_vbox); @@ -1077,9 +1090,6 @@ gaim_account_set_protocol_id(dialog->account, dialog->protocol_id); } - /* Clear the existing settings. */ - gaim_account_clear_settings(dialog->account); - /* Alias */ value = gtk_entry_get_text(GTK_ENTRY(dialog->alias_entry));
