# HG changeset patch # User Christian Hammond # Date 1054620037 0 # Node ID 08d20eb262c75fd52a9a45177fa6b751f58eecc9 # Parent 7a619706e04820cd94fc585b8d21285d86cc56e1 [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 diff -r 7a619706e048 -r 08d20eb262c7 src/gtkaccount.c --- 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));