# HG changeset patch # User Christian Hammond # Date 1087533208 0 # Node ID 96c481da57ea76b313c499930eed2d82bf09e6b5 # Parent fe931c791fc01f7cbcee10e11a91e6d6114c98bf [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 diff -r fe931c791fc0 -r 96c481da57ea ChangeLog --- a/ChangeLog Thu Jun 17 01:34:58 2004 +0000 +++ b/ChangeLog Fri Jun 18 04:33:28 2004 +0000 @@ -36,6 +36,9 @@ * The disconnected UI op was called twice on connection errors. Now it is only called once. (Evan Schoenberg) * Dragging into conversation windows works better + * 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. version 0.78 (05/30/2004): New Features: diff -r fe931c791fc0 -r 96c481da57ea src/account.h --- a/src/account.h Thu Jun 17 01:34:58 2004 +0000 +++ b/src/account.h Fri Jun 18 04:33:28 2004 +0000 @@ -72,7 +72,7 @@ GSList *deny; /**< Deny list. */ int perm_deny; /**< The permit/deny setting. */ GaimLog *system_log; /**< The system log */ - + void *ui_data; /**< The UI can put data here. */ }; @@ -541,7 +541,7 @@ * * @param account The account. */ - void gaim_account_destroy_log(GaimAccount *account); +void gaim_account_destroy_log(GaimAccount *account); /*@}*/ diff -r fe931c791fc0 -r 96c481da57ea src/gtkaccount.c --- 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));