commit 0581236efe10250297cb992b39f8a7e8741bd5d3
parent e6e3c27f75c2198d67672abc8f5582106d355928
Author: paul <paul@claws-mail.org>
Date: Thu, 15 Apr 2021 20:05:21 +0100
migrate use_apop_auth to new config
Diffstat:
4 files changed, 15 insertions(+), 2 deletions(-)
diff --git a/src/prefs_account.c b/src/prefs_account.c
@@ -517,6 +517,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 */