+2007-04-01 [colin] 2.8.1cvs80
+
+ * src/prefs_account.c
+ If no MH mailbox exist, when creating a POP/Local
+ account, just create and use the default one
+ instead of bailing with a "Mailbox doesn't exist"
+ error
+
2007-03-31 [colin] 2.8.1cvs79
* src/prefs_account.c
( cvs diff -u -r 1.207.2.158 -r 1.207.2.159 src/folderview.c; cvs diff -u -r 1.204.2.128 -r 1.204.2.129 src/prefs_common.c; cvs diff -u -r 1.103.2.78 -r 1.103.2.79 src/prefs_common.h; ) > 2.8.1cvs77.patchset
( cvs diff -u -r 1.105.2.89 -r 1.105.2.90 src/prefs_account.c; ) > 2.8.1cvs78.patchset
( cvs diff -u -r 1.105.2.90 -r 1.105.2.91 src/prefs_account.c; cvs diff -u -r 1.30.2.32 -r 1.30.2.33 src/prefs_toolbar.c; cvs diff -u -r 1.9.2.34 -r 1.9.2.35 src/common/defs.h; ) > 2.8.1cvs79.patchset
+( cvs diff -u -r 1.105.2.91 -r 1.105.2.92 src/prefs_account.c; ) > 2.8.1cvs80.patchset
#include "remotefolder.h"
#include "base64.h"
#include "combobox.h"
+#include "setup.h"
static gboolean cancelled;
static gboolean new_account;
+static gboolean create_mailbox;
static PrefsAccount tmp_ac_prefs;
tmp_ac_prefs = *ac_prefs;
+ create_mailbox = FALSE;
if (new_account) {
PrefsAccount *def_ac;
gchar *buf;
gtk_entry_set_text(GTK_ENTRY(receive.local_inbox_entry),
id);
g_free(id);
+ } else {
+ create_mailbox = TRUE;
}
}
} else
GtkWidget *inbox_entry = (protocol == A_POP3 ? receive.inbox_entry : receive.local_inbox_entry );
const gchar *mailbox = gtk_entry_get_text(GTK_ENTRY(inbox_entry));
FolderItem *inbox = folder_find_item_from_identifier(mailbox);
+ if (!inbox && create_mailbox) {
+ gchar *id = NULL;
+ setup_write_mailbox_path(mainwindow_get_mainwindow(), "Mail");
+ id = folder_item_get_identifier(folder_get_default_inbox_for_class(F_MH));
+ gtk_entry_set_text(GTK_ENTRY(receive.inbox_entry),
+ id);
+ gtk_entry_set_text(GTK_ENTRY(receive.local_inbox_entry),
+ id);
+ g_free(id);
+ mailbox = gtk_entry_get_text(GTK_ENTRY(inbox_entry));
+ create_mailbox = FALSE;
+ inbox = folder_find_item_from_identifier(mailbox);
+ }
if (inbox == NULL) {
alertpanel_error(_("The default inbox folder doesn't exist."));
return -1;