2006-03-07 [colin] 2.0.0cvs116
authorColin Leroy <colin@colino.net>
Tue, 7 Mar 2006 08:00:22 +0000 (08:00 +0000)
committerColin Leroy <colin@colino.net>
Tue, 7 Mar 2006 08:00:22 +0000 (08:00 +0000)
* src/imap.c
Return immediately when password dialog was
cancelled
* src/gtk/inputdialog.c
Allow empty strings for passwords

ChangeLog
PATCHSETS
configure.ac
src/gtk/inputdialog.c
src/imap.c

index 2a1dd601074d4f4cb428ba4d58446f4efa3501f1..0883d3ff3ffe976970016b7e408d8293191fbd3c 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2006-03-07 [colin]     2.0.0cvs116
+
+       * src/imap.c
+               Return immediately when password dialog was
+               cancelled
+       * src/gtk/inputdialog.c
+               Allow empty strings for passwords
+
+
 2006-03-06 [colin]     2.0.0cvs115
 
        * src/imap.c
index 97baabbbca69084265df0c0fb3eca6d9ab82698e..820b204d5106ea095254fa8aa6d447a5b2905544 100644 (file)
--- a/PATCHSETS
+++ b/PATCHSETS
 ( cvs diff -u -r 1.1.2.3 -r 1.1.2.4 src/prefs_msg_colors.h;  ) > 2.0.0cvs113.patchset
 ( cvs diff -u -r 1.179.2.96 -r 1.179.2.97 src/imap.c;  ) > 2.0.0cvs114.patchset
 ( cvs diff -u -r 1.179.2.97 -r 1.179.2.98 src/imap.c;  ) > 2.0.0cvs115.patchset
+( cvs diff -u -r 1.179.2.98 -r 1.179.2.99 src/imap.c;  cvs diff -u -r 1.2.2.15 -r 1.2.2.16 src/gtk/inputdialog.c;  ) > 2.0.0cvs116.patchset
index 8da1fe8b6370b4d1bd275bcf68d8aa96657d7cd1..e8a42cce9b6aa7e3260137c02039cf9c2bf9d6c5 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=0
 MICRO_VERSION=0
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=115
+EXTRA_VERSION=116
 EXTRA_RELEASE=
 EXTRA_GTK2_VERSION=
 
index 5c3d49df37f164d60aa8d38afb9398e36859744e..00d9b623da52be20cb5a2003e17377db69bba6ba 100644 (file)
@@ -65,7 +65,7 @@ static GtkWidget *entry;
 static GtkWidget *combo;
 static GtkWidget *ok_button;
 static GtkWidget *icon_q, *icon_p;
-
+static gboolean is_pass = FALSE;
 static void input_dialog_create        (gboolean is_password);
 static gchar *input_dialog_open        (const gchar    *title,
                                 const gchar    *message,
@@ -102,6 +102,7 @@ gchar *input_dialog(const gchar *title, const gchar *message,
 
        gtk_widget_show(icon_q);
        gtk_widget_hide(icon_p);
+       is_pass = FALSE;
        gtk_entry_set_visibility(GTK_ENTRY(entry), TRUE);
 
        return input_dialog_open(title, message, default_string);
@@ -121,6 +122,7 @@ gchar *input_dialog_with_invisible(const gchar *title, const gchar *message,
 
        gtk_widget_hide(icon_q);
        gtk_widget_show(icon_p);
+       is_pass = TRUE;
        gtk_entry_set_visibility(GTK_ENTRY(entry), FALSE);
 
        return input_dialog_open(title, message, default_string);
@@ -141,6 +143,7 @@ gchar *input_dialog_combo(const gchar *title, const gchar *message,
 
        gtk_widget_show(icon_q);
        gtk_widget_hide(icon_p);
+       is_pass = FALSE;
 
        if (!list) {
                GList empty_list;
@@ -268,6 +271,8 @@ static void input_dialog_create(gboolean is_password)
        else
                gtk_widget_hide(icon_p);
 
+       is_pass = is_password;
+
        gtk_widget_grab_default(ok_button);
 
        g_signal_connect(G_OBJECT(ok_button), "clicked",
@@ -309,7 +314,7 @@ static gchar *input_dialog_open(const gchar *title, const gchar *message,
                        editable = GTK_EDITABLE(entry);
 
                str = gtk_editable_get_chars(editable, 0, -1);
-               if (str && *str == '\0') {
+               if (str && *str == '\0' && !is_pass) {
                        g_free(str);
                        str = NULL;
                }
index 07826cc7134276bd78eb9bb634dde43aac9bd530..74ee1ec3d7b8863b5acc9a0be43b35bd7e983500 100644 (file)
@@ -714,6 +714,7 @@ static IMAPSession *imap_session_get(Folder *folder)
        if (!IMAP_SESSION(session)->authenticated) {
                session_destroy(SESSION(session));
                rfolder->session = NULL;
+               last_failure = time(NULL);
                return NULL;
        }
 
@@ -866,7 +867,7 @@ static void imap_session_authenticate(IMAPSession *session,
                gchar *tmp_pass;
                tmp_pass = input_dialog_query_password(account->recv_server, account->userid);
                if (!tmp_pass)
-                       tmp_pass = g_strdup(""); /* allow empty password */
+                       return;
                Xstrdup_a(pass, tmp_pass, {g_free(tmp_pass); return;});
                g_free(tmp_pass);
        }