Remove obsolete A_APOP and A_RPOP account protocols.
CLAWS_CONFIG_VERSION bumped to 1.
This commit is contained in:
parent
3b5b4f75dd
commit
358e811283
6 changed files with 32 additions and 11 deletions
|
@ -257,7 +257,6 @@ static gint inc_account_mail_real(MainWindow *mainwin, PrefsAccount *account)
|
|||
folderview_check_new(FOLDER(account->folder));
|
||||
return 0;
|
||||
case A_POP3:
|
||||
case A_APOP:
|
||||
session = inc_session_new(account);
|
||||
if (!session) return 0;
|
||||
|
||||
|
|
|
@ -3557,12 +3557,6 @@ void prefs_account_read_config(PrefsAccount *ac_prefs, const gchar *label)
|
|||
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++) {
|
||||
|
|
|
@ -28,8 +28,6 @@ typedef struct _PrefsAccount PrefsAccount;
|
|||
|
||||
typedef enum {
|
||||
A_POP3,
|
||||
A_APOP, /* deprecated */
|
||||
A_RPOP, /* deprecated */
|
||||
A_IMAP4,
|
||||
A_NNTP,
|
||||
A_LOCAL,
|
||||
|
|
|
@ -36,7 +36,7 @@
|
|||
#include "prefs_msg_colors.h"
|
||||
#include "prefs_summary_open.h"
|
||||
|
||||
#define CLAWS_CONFIG_VERSION 0
|
||||
#define CLAWS_CONFIG_VERSION 1
|
||||
|
||||
typedef struct _PrefsCommon PrefsCommon;
|
||||
|
||||
|
|
|
@ -22,12 +22,42 @@
|
|||
#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;
|
||||
}
|
||||
|
|
|
@ -350,7 +350,7 @@ gint send_message_smtp_full(PrefsAccount *ac_prefs, GSList *to_list, FILE *fp, g
|
|||
_("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);
|
||||
|
|
Loading…
Reference in a new issue