CLAWS_CONFIG_VERSION bumped to 1.
folderview_check_new(FOLDER(account->folder));
return 0;
case A_POP3:
- case A_APOP:
session = inc_session_new(account);
if (!session) return 0;
if (id < 0) g_warning("wrong account id: %d", id);
ac_prefs->account_id = id;
- if (ac_prefs->protocol == A_APOP) {
- debug_print("converting protocol A_APOP to new prefs.\n");
- ac_prefs->protocol = A_POP3;
- ac_prefs->use_apop_auth = TRUE;
- }
-
if (privacy_prefs != NULL) {
strv = g_strsplit(privacy_prefs, ",", 0);
for (cur = strv; *cur != NULL; cur++) {
typedef enum {
A_POP3,
- A_APOP, /* deprecated */
- A_RPOP, /* deprecated */
A_IMAP4,
A_NNTP,
A_LOCAL,
#include "prefs_msg_colors.h"
#include "prefs_summary_open.h"
-#define CLAWS_CONFIG_VERSION 0
+#define CLAWS_CONFIG_VERSION 1
typedef struct _PrefsCommon PrefsCommon;
#include "claws-features.h"
#endif
+#include "account.h"
+#include "prefs_account.h"
#include "prefs_common.h"
static void _update_config(gint version)
{
+ GList *cur;
+ PrefsAccount *ac_prefs;
+
+ debug_print("Updating config version %d to %d.\n", version, version + 1);
+
switch (version) {
case 0:
+
+ /* Removing A_APOP and A_RPOP from RecvProtocol enum,
+ * protocol numbers above A_POP3 need to be adjusted.
+ *
+ * In config_version=0:
+ * A_POP3 is 0,
+ * A_APOP is 1,
+ * A_RPOP is 2,
+ * A_IMAP and the rest are from 3 up.
+ * We can't use the macros, since they may change in the
+ * future. Numbers do not change. :) */
+ for (cur = account_get_list(); cur != NULL; cur = cur->next) {
+ ac_prefs = (PrefsAccount *)cur->data;
+ if (ac_prefs->protocol == 1) {
+ ac_prefs->protocol = 0;
+ } else if (ac_prefs->protocol > 2) {
+ /* A_IMAP and above gets bumped down by 2. */
+ ac_prefs->protocol -= 2;
+ }
+ }
+
+ break;
+
default:
break;
}
_("Connecting"));
if (ac_prefs->pop_before_smtp
- && (ac_prefs->protocol == A_APOP || ac_prefs->protocol == A_POP3)
+ && (ac_prefs->protocol == A_POP3)
&& (time(NULL) - ac_prefs->last_pop_login_time) > (60 * ac_prefs->pop_before_smtp_timeout)) {
g_snprintf(buf, sizeof(buf), _("Doing POP before SMTP..."));
log_message(LOG_PROTOCOL, "%s\n", buf);