[balsa] mailbox-node: Do not save POP3 mailbox to config



commit f1bfc07101301d993ff95cc22dd5f8b03b1c421d
Author: Peter Bloomfield <PeterBloomfield bellsouth net>
Date:   Fri Feb 15 11:06:29 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 f7e2917a8..509b4fbbb 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]