Mercurial > pidgin
changeset 5690:08d20eb262c7
[gaim-migrate @ 6111]
Protocol options from one protocol type to another no longer carry over
when switching protocols. You couldn't have waited for this, CIA, could
you?
committer: Tailor Script <tailor@pidgin.im>
author | Christian Hammond <chipx86@chipx86.com> |
---|---|
date | Tue, 03 Jun 2003 06:00:37 +0000 |
parents | 7a619706e048 |
children | 3de0e242f9a2 |
files | src/gtkaccount.c |
diffstat | 1 files changed, 18 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/src/gtkaccount.c Tue Jun 03 05:47:29 2003 +0000 +++ b/src/gtkaccount.c Tue Jun 03 06:00:37 2003 +0000 @@ -404,6 +404,7 @@ __add_protocol_options(AccountPrefsDialog *dialog, GtkWidget *parent) { GaimAccountOption *option; + GaimAccount *account; GtkWidget *frame; GtkWidget *vbox; GtkWidget *check; @@ -426,6 +427,8 @@ return; } + account = dialog->account; + /* Build the protocol options frame. */ g_snprintf(buf, sizeof(buf), _("%s Options"), dialog->plugin->info->name); @@ -446,10 +449,13 @@ switch (gaim_account_option_get_type(option)) { case GAIM_PREF_BOOLEAN: - if (dialog->account == NULL) + if (account == NULL || + gaim_account_get_protocol(account) != dialog->protocol) { + bool_value = gaim_account_option_get_default_bool(option); + } else - bool_value = gaim_account_get_bool(dialog->account, + bool_value = gaim_account_get_bool(account, gaim_account_option_get_setting(option), gaim_account_option_get_default_bool(option)); @@ -464,10 +470,13 @@ break; case GAIM_PREF_INT: - if (dialog->account == NULL) + if (account == NULL || + gaim_account_get_protocol(account) != dialog->protocol) { + int_value = gaim_account_option_get_default_int(option); + } else - int_value = gaim_account_get_int(dialog->account, + int_value = gaim_account_get_int(account, gaim_account_option_get_setting(option), gaim_account_option_get_default_int(option)); @@ -485,10 +494,13 @@ break; case GAIM_PREF_STRING: - if (dialog->account == NULL) + if (account == NULL || + gaim_account_get_protocol(account) != dialog->protocol) { + str_value = gaim_account_option_get_default_string(option); + } else - str_value = gaim_account_get_string(dialog->account, + str_value = gaim_account_get_string(account, gaim_account_option_get_setting(option), gaim_account_option_get_default_string(option));