2008-09-16 [colin] 3.5.0cvs109
authorColin Leroy <colin@colino.net>
Tue, 16 Sep 2008 17:15:56 +0000 (17:15 +0000)
committerColin Leroy <colin@colino.net>
Tue, 16 Sep 2008 17:15:56 +0000 (17:15 +0000)
* src/account.c
* src/inc.c
* src/mainwindow.c
* src/prefs_account.h
* src/prefs_other.c
* src/send_message.c
* src/gtk/inputdialog.c
Don't add a pref to allow remembering passwords
(Just not checking the checkbox is enough)

ChangeLog
PATCHSETS
configure.ac
src/account.c
src/gtk/inputdialog.c
src/inc.c
src/mainwindow.c
src/prefs_account.h
src/prefs_other.c
src/send_message.c

index b7976cd..fc01678 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+2008-09-16 [colin]     3.5.0cvs109
+
+       * src/account.c
+       * src/inc.c
+       * src/mainwindow.c
+       * src/prefs_account.h
+       * src/prefs_other.c
+       * src/send_message.c
+       * src/gtk/inputdialog.c
+               Don't add a pref to allow remembering passwords
+               (Just not checking the checkbox is enough)
+
 2008-09-16 [colin]     3.5.0cvs108
 
        * configure.ac
index ec34237..732b3b3 100644 (file)
--- a/PATCHSETS
+++ b/PATCHSETS
 ( cvs diff -u -r 1.61.2.84 -r 1.61.2.85 src/account.c;  cvs diff -u -r 1.11.2.11 -r 1.11.2.12 src/account.h;  cvs diff -u -r 1.382.2.475 -r 1.382.2.476 src/compose.c;  cvs diff -u -r 1.8.2.36 -r 1.8.2.37 src/quote_fmt.c;  cvs diff -u -r 1.8.2.17 -r 1.8.2.18 src/quote_fmt_lex.l;  cvs diff -u -r 1.22.2.40 -r 1.22.2.41 src/quote_fmt_parse.y;  ) > 3.5.0cvs106.patchset
 ( cvs diff -u -r 1.382.2.476 -r 1.382.2.477 src/compose.c;  ) > 3.5.0cvs107.patchset
 ( cvs diff -u -r 1.94.2.185 -r 1.94.2.186 src/messageview.c;  cvs diff -u -r 1.2.2.33 -r 1.2.2.34 src/gtk/inputdialog.c;  cvs diff -u -r 1.1.2.10 -r 1.1.2.11 src/gtk/inputdialog.h;  ) > 3.5.0cvs108.patchset
+( cvs diff -u -r 1.61.2.85 -r 1.61.2.86 src/account.c;  cvs diff -u -r 1.149.2.95 -r 1.149.2.96 src/inc.c;  cvs diff -u -r 1.274.2.272 -r 1.274.2.273 src/mainwindow.c;  cvs diff -u -r 1.49.2.40 -r 1.49.2.41 src/prefs_account.h;  cvs diff -u -r 1.1.2.31 -r 1.1.2.32 src/prefs_other.c;  cvs diff -u -r 1.17.2.50 -r 1.17.2.51 src/send_message.c;  cvs diff -u -r 1.2.2.34 -r 1.2.2.35 src/gtk/inputdialog.c;  ) > 3.5.0cvs109.patchset
index 308fe59..03367d1 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=5
 MICRO_VERSION=0
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=108
+EXTRA_VERSION=109
 EXTRA_RELEASE=
 EXTRA_GTK2_VERSION=
 
index 2ab5ae1..8b56953 100644 (file)
@@ -918,8 +918,6 @@ static void account_clone(GtkWidget *widget, gpointer data)
        ACP_FASSIGN(ssl_smtp);
        ACP_FASSIGN(use_nonblocking_ssl);
        
-       ac_clon->tmp_pass = NULL;
-
        /* receive */
        ACP_FASSIGN(use_apop_auth);
        ACP_FASSIGN(rmmail);
@@ -945,8 +943,6 @@ static void account_clone(GtkWidget *widget, gpointer data)
        ACP_FDUP(smtp_userid);
        ACP_FDUP(smtp_passwd);
 
-       ac_clon->tmp_smtp_pass = NULL;
-
        ACP_FASSIGN(pop_before_smtp);
        ACP_FASSIGN(pop_before_smtp_timeout);
        ACP_FASSIGN(last_pop_login_time);
index e75cc5a..5751514 100644 (file)
@@ -164,7 +164,7 @@ gchar *input_dialog_with_invisible_checkbtn(const gchar *title, const gchar *mes
                HILDON_GTK_INPUT_MODE_FULL | HILDON_GTK_INPUT_MODE_INVISIBLE);
 #endif
 
-       return input_dialog_open(title, message, checkbtn_label, default_string, FALSE, checkbtn_state);
+       return input_dialog_open(title, message, checkbtn_label, default_string, *checkbtn_state, checkbtn_state);
 }
 
 gchar *input_dialog_combo(const gchar *title, const gchar *message,
@@ -274,12 +274,12 @@ gchar *input_dialog_query_password_keep(const gchar *server, const gchar *user,
                                  user);
        else
                message = g_strdup_printf(_("Input password:"));
-        if (keep && prefs_common.session_passwords) {
+        if (keep) {
                if (*keep != NULL) {
                        pass = g_strdup (*keep);
                }
                else {
-                       gboolean state = FALSE;
+                       gboolean state = prefs_common.session_passwords;
                        pass = input_dialog_with_invisible_checkbtn(_("Input password"), 
                                        message, NULL,
                                        _("Remember password for this session"), 
@@ -288,6 +288,7 @@ gchar *input_dialog_query_password_keep(const gchar *server, const gchar *user,
                                *keep = g_strdup (pass);
                                debug_print("keeping session password for account\n");
                        }
+                       prefs_common.session_passwords = state;
                }
        }
        else {
index f37f9f9..d4b8069 100644 (file)
--- a/src/inc.c
+++ b/src/inc.c
@@ -555,9 +555,6 @@ static gint inc_start(IncProgressDialog *inc_dialog)
                if (pop3_session->ac_prefs->passwd)
                        pop3_session->pass =
                                g_strdup(pop3_session->ac_prefs->passwd);
-               else if (pop3_session->ac_prefs->tmp_pass)
-                       pop3_session->pass =
-                               g_strdup(pop3_session->ac_prefs->tmp_pass);
                else {
                        gchar *pass;
 
@@ -577,8 +574,6 @@ static gint inc_start(IncProgressDialog *inc_dialog)
                                         NULL, NULL);
 
                        if (pass) {
-                               pop3_session->ac_prefs->tmp_pass =
-                                       g_strdup(pass);
                                pop3_session->pass = pass;
                        }
                }
@@ -712,12 +707,6 @@ static gint inc_start(IncProgressDialog *inc_dialog)
 
                new_msgs += pop3_session->cur_total_num;
 
-               if (pop3_session->error_val == PS_AUTHFAIL &&
-                   pop3_session->ac_prefs->tmp_pass) {
-                       g_free(pop3_session->ac_prefs->tmp_pass);
-                       pop3_session->ac_prefs->tmp_pass = NULL;
-               }
-
                pop3_write_uidl_list(pop3_session);
 
                if (inc_state != INC_SUCCESS && inc_state != INC_CANCEL) {
index b870574..54f06cb 100644 (file)
@@ -3045,15 +3045,11 @@ SensitiveCond main_window_get_current_state(MainWindow *mainwin)
        if (prefs_common.layout_mode != SMALL_LAYOUT || mainwin->in_folder)
                state |= M_IN_MSGLIST;
 
-       if (prefs_common.session_passwords) {
-               GList *list = NULL;
-
-               for (list = account_get_list(); list != NULL; list = list->next) {
-                       PrefsAccount *account = list->data;
-                       if (account->session_passwd || account->session_smtp_passwd) {
-                               state |= M_SESSION_PASSWORDS;
-                               break;
-                       }
+       for (account_list = account_get_list(); account_list != NULL; account_list = account_list->next) {
+               PrefsAccount *account = account_list->data;
+               if (account->session_passwd || account->session_smtp_passwd) {
+                       state |= M_SESSION_PASSWORDS;
+                       break;
                }
        }
 
index 850aaea..d000b20 100644 (file)
@@ -87,9 +87,6 @@ struct _PrefsAccount
 
        gboolean use_nonblocking_ssl;
 
-       /* Temporarily preserved password */
-       gchar *tmp_pass;
-
        /* Receive */
        gboolean use_apop_auth;
        gboolean rmmail;
@@ -116,9 +113,6 @@ struct _PrefsAccount
        gchar *smtp_passwd;
        gchar *session_smtp_passwd;
 
-       /* Temporarily preserved password */
-       gchar *tmp_smtp_pass;
-
        gboolean pop_before_smtp;
        gint pop_before_smtp_timeout;
        time_t last_pop_login_time;
index fc6669f..c5bdd29 100644 (file)
@@ -59,7 +59,6 @@ typedef struct _OtherPage
        GtkWidget *checkbtn_askonfilter;
        GtkWidget *checkbtn_use_shred;
        GtkWidget *checkbtn_real_time_sync;
-       GtkWidget *checkbtn_session_passwords;
 } OtherPage;
 
 static struct KeybindDialog {
@@ -510,9 +509,6 @@ static void prefs_other_create_widget(PrefsPage *_page, GtkWindow *window,
        GtkWidget *checkbtn_use_shred;
        GtkWidget *checkbtn_real_time_sync;
 
-       GtkWidget *frame_sess_pass;
-       GtkWidget *vbox_sess_pass;
-       GtkWidget *checkbtn_session_passwords;
        gchar *shred_binary = NULL;
        CLAWS_TIP_DECL();
 
@@ -526,11 +522,6 @@ static void prefs_other_create_widget(PrefsPage *_page, GtkWindow *window,
                (vbox_addr, checkbtn_addaddrbyclick,
                 _("Add address to destination when double-clicked"));
 
-       vbox_sess_pass = gtkut_get_options_frame(vbox1, &frame_sess_pass, _("Session passwords"));
-       
-       PACK_CHECK_BUTTON
-               (vbox_sess_pass, checkbtn_session_passwords,
-                _("Enable the option of keeping unsaved account passwords while running"));
        /* On Exit */
        vbox_exit = gtkut_get_options_frame(vbox1, &frame_exit, _("On exit"));
 
@@ -619,8 +610,6 @@ static void prefs_other_create_widget(PrefsPage *_page, GtkWindow *window,
 
        gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(checkbtn_addaddrbyclick), 
                prefs_common.add_address_by_click);
-       gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(checkbtn_session_passwords), 
-               prefs_common.session_passwords);
        gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(checkbtn_confonexit), 
                prefs_common.confirm_on_exit);
        gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(checkbtn_cleanonexit), 
@@ -643,7 +632,6 @@ static void prefs_other_create_widget(PrefsPage *_page, GtkWindow *window,
                prefs_common.real_time_sync);
 
        prefs_other->checkbtn_addaddrbyclick = checkbtn_addaddrbyclick;
-       prefs_other->checkbtn_session_passwords = checkbtn_session_passwords;
        prefs_other->checkbtn_confonexit = checkbtn_confonexit;
        prefs_other->checkbtn_cleanonexit = checkbtn_cleanonexit;
        prefs_other->checkbtn_askonclean = checkbtn_askonclean;
@@ -665,23 +653,6 @@ static void prefs_other_save(PrefsPage *_page)
 
        prefs_common.add_address_by_click = gtk_toggle_button_get_active(
                GTK_TOGGLE_BUTTON(page->checkbtn_addaddrbyclick));
-       prefs_common.session_passwords = gtk_toggle_button_get_active(
-               GTK_TOGGLE_BUTTON(page->checkbtn_session_passwords));
-
-       if (!prefs_common.session_passwords) {
-               for (list = account_get_list(); list != NULL; list = list->next) {
-                       PrefsAccount *account = list->data;
-                       if (account->session_passwd) {
-                               g_free(account->session_passwd);
-                               account->session_passwd = NULL;
-                       }
-                       if (account->session_smtp_passwd) {
-                               g_free(account->session_smtp_passwd);
-                               account->session_smtp_passwd = NULL;
-                       }
-               }
-       }
-
        prefs_common.confirm_on_exit = gtk_toggle_button_get_active(
                GTK_TOGGLE_BUTTON(page->checkbtn_confonexit));
        prefs_common.clean_on_exit = gtk_toggle_button_get_active(
index f5f8268..ea5ac42 100644 (file)
@@ -246,9 +246,6 @@ gint send_message_smtp_full(PrefsAccount *ac_prefs, GSList *to_list, FILE *fp, g
                                if (ac_prefs->smtp_passwd)
                                        smtp_session->pass =
                                                g_strdup(ac_prefs->smtp_passwd);
-                               else if (ac_prefs->tmp_smtp_pass)
-                                       smtp_session->pass =
-                                               g_strdup(ac_prefs->tmp_smtp_pass);
                                else {
                                        smtp_session->pass =
                                                input_dialog_query_password_keep
@@ -259,16 +256,11 @@ gint send_message_smtp_full(PrefsAccount *ac_prefs, GSList *to_list, FILE *fp, g
                                                session_destroy(session);
                                                return -1;
                                        }
-                                       ac_prefs->tmp_smtp_pass =
-                                               g_strdup(smtp_session->pass);
                                }
                        } else {
                                smtp_session->user = g_strdup(ac_prefs->userid);
                                if (ac_prefs->passwd)
                                        smtp_session->pass = g_strdup(ac_prefs->passwd);
-                               else if (ac_prefs->tmp_pass)
-                                       smtp_session->pass =
-                                               g_strdup(ac_prefs->tmp_pass);
                                else {
                                        smtp_session->pass =
                                                input_dialog_query_password_keep
@@ -279,8 +271,6 @@ gint send_message_smtp_full(PrefsAccount *ac_prefs, GSList *to_list, FILE *fp, g
                                                session_destroy(session);
                                                return -1;
                                        }
-                                       ac_prefs->tmp_pass =
-                                               g_strdup(smtp_session->pass);
                                }
                        }
                } else {
@@ -383,13 +373,6 @@ gint send_message_smtp_full(PrefsAccount *ac_prefs, GSList *to_list, FILE *fp, g
                gtk_main_iteration();
 
        if (SMTP_SESSION(session)->error_val == SM_AUTHFAIL) {
-               if (ac_prefs->smtp_userid && ac_prefs->tmp_smtp_pass) {
-                       g_free(ac_prefs->tmp_smtp_pass);
-                       ac_prefs->tmp_smtp_pass = NULL;
-               } else if (ac_prefs->tmp_pass) {
-                       g_free(ac_prefs->tmp_pass);
-                       ac_prefs->tmp_pass = NULL;
-               }
                if (ac_prefs->session_smtp_passwd) {
                        g_free(ac_prefs->session_smtp_passwd);
                        ac_prefs->session_smtp_passwd = NULL;