[balsa/remember-mailbox-positions] mailbox-node: do not save POP3 mailbox to config



commit 0d9a009de57472b0d559e7b37cd8ffeafd5016f8
Author: Peter Bloomfield <PeterBloomfield bellsouth net>
Date:   Fri Feb 15 11:00:48 2019 -0500

    mailbox-node: do not save POP3 mailbox to config
    
            * src/mailbox-node.c (balsa_mailbox_node_dispose): now that we
            unref POP3 mailboxes, which do not need to be saved in the
            config file, we must not try to save them.

 ChangeLog          |  6 ++++++
 src/mailbox-node.c | 11 ++++++-----
 2 files changed, 12 insertions(+), 5 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 8c640c7ac..a02a4fa91 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2019-02-15  Peter Bloomfield  <pbloomfield bellsouth net>
+
+       * src/mailbox-node.c (balsa_mailbox_node_dispose): now that we
+       unref POP3 mailboxes, which do not need to be saved in the
+       config file, we must not try to save them.
+
 2019-02-14  Peter Bloomfield  <pbloomfield bellsouth net>
 
        Plug some memory leaks
diff --git a/src/mailbox-node.c b/src/mailbox-node.c
index 1d1447653..e25caba51 100644
--- a/src/mailbox-node.c
+++ b/src/mailbox-node.c
@@ -193,11 +193,12 @@ balsa_mailbox_node_dispose(GObject * object)
     LibBalsaMailbox *mailbox = mn->mailbox;
 
     if (mailbox) {
-        libbalsa_mailbox_set_open(mailbox,
-                                  libbalsa_mailbox_is_open(mailbox));
-        config_save_mailbox_view(mailbox->url, mailbox->view);
-       if (balsa_app.main_window)
-           balsa_window_close_mbnode(balsa_app.main_window, mn);
+        if (!LIBBALSA_IS_MAILBOX_POP3(mailbox)) {
+            libbalsa_mailbox_set_open(mailbox, libbalsa_mailbox_is_open(mailbox));
+            config_save_mailbox_view(mailbox->url, mailbox->view);
+            if (balsa_app.main_window != NULL)
+                balsa_window_close_mbnode(balsa_app.main_window, mn);
+        }
        g_object_unref(mailbox);
        mn->mailbox = NULL;
     }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]