talons

Fork of Claws Mail https://www.claws-mail
Log | Files | Refs | README | LICENSE

commit a9f154883f9af4cc39c74d595c3e05056338e22b
parent 43b301a1b13682efa67eb5c055f27c19d633455e
Author: paul <paul@claws-mail.org>
Date:   Thu, 15 Apr 2021 20:05:21 +0100

migrate use_apop_auth to new config

Diffstat:
Msrc/prefs_account.c | 3+++
Msrc/prefs_account.h | 1+
Msrc/prefs_common.h | 4++--
Msrc/prefs_migration.c | 9+++++++++
4 files changed, 15 insertions(+), 2 deletions(-)

diff --git a/src/prefs_account.c b/src/prefs_account.c @@ -518,6 +518,9 @@ static PrefParam basic_param[] = { }; static PrefParam receive_param[] = { + {"use_apop_auth", "FALSE", &tmp_ac_prefs.use_apop_auth, P_BOOL, + NULL, NULL}, /* deprecated */ + {"use_pop_auth", "FALSE", &tmp_ac_prefs.use_pop_auth, P_BOOL, &receive_page.pop_auth_checkbtn, prefs_set_data_from_toggle, prefs_set_toggle}, diff --git a/src/prefs_account.h b/src/prefs_account.h @@ -98,6 +98,7 @@ struct _PrefsAccount /* Receive */ gboolean use_pop_auth; POPAuthType pop_auth_type; + gboolean use_apop_auth; /* deprecated */ gboolean rmmail; gint msg_leave_time; gint msg_leave_hour; diff --git a/src/prefs_common.h b/src/prefs_common.h @@ -1,6 +1,6 @@ /* * Claws Mail -- a GTK+ based, lightweight, and fast e-mail client - * Copyright (C) 1999-2020 the Claws Mail team and Hiroyuki Yamamoto + * Copyright (C) 1999-2021 the Claws Mail team and Hiroyuki Yamamoto * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -35,7 +35,7 @@ #include "prefs_msg_colors.h" #include "prefs_summary_open.h" -#define CLAWS_CONFIG_VERSION 3 +#define CLAWS_CONFIG_VERSION 4 typedef struct _PrefsCommon PrefsCommon; diff --git a/src/prefs_migration.c b/src/prefs_migration.c @@ -143,6 +143,15 @@ static void _update_config_account(PrefsAccount *ac_prefs, gint version) break; + case 3: + /* With the introduction of OAUTH2 support, the APOP option + * (use_apop_auth) has been swallowed into a combobox and + * renamed */ + if (ac_prefs->use_apop_auth == 1) { + ac_prefs->use_pop_auth = 1; + ac_prefs->pop_auth_type = 1; + } + break; default: /* NOOP */