migrate use_apop_auth to new config
authorpaul <paul@claws-mail.org>
Thu, 15 Apr 2021 19:05:21 +0000 (20:05 +0100)
committerPaul <paul@claws-mail.org>
Thu, 15 Apr 2021 19:07:28 +0000 (20:07 +0100)
src/prefs_account.c
src/prefs_account.h
src/prefs_common.h
src/prefs_migration.c

index f78850be84e2b04bdf850ebe4b49e529ed2a91c9..6583c05df3f5a4ef07b69c660c5a4fc44a6a465c 100644 (file)
@@ -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},
index 88c922eb5d46d7452b1761774e604c798b698d3d..9995a764eb73872cd5d5a9be5d7308951d4305b5 100644 (file)
@@ -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;
index 12689763b438334915372fd8626fde803903ed33..fe179457f0ebfea149b9048501ab27c699bdebd0 100644 (file)
@@ -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;
 
index a508392dca4a021b8f7759265c49a7793c342143..380b32270399982afa47ab202cd339649ac4166e 100644 (file)
@@ -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 */