[balsa] mailbox: Remove another idle handler when closing



commit f5a26796ad5bf7dc18f4e04590dc3b5778dc5b3b
Author: Peter Bloomfield <PeterBloomfield bellsouth net>
Date:   Sat Feb 1 13:49:56 2020 -0500

    mailbox: Remove another idle handler when closing
    
    Remove another idle handler when closing the mailbox
    
    * libbalsa/mailbox.c (libbalsa_mailbox_close): remove the idle
      handler for sorting the mailbox.

 ChangeLog          | 7 +++++++
 libbalsa/mailbox.c | 5 +++++
 2 files changed, 12 insertions(+)
---
diff --git a/ChangeLog b/ChangeLog
index b499415d0..139c201c5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2020-02-01  Peter Bloomfield  <pbloomfield bellsouth net>
+
+       mailbox: Remove another idle handler when closing the mailbox
+
+       * libbalsa/mailbox.c (libbalsa_mailbox_close): remove the idle
+       handler for sorting the mailbox.
+
 2020-02-01  Peter Bloomfield  <pbloomfield bellsouth net>
 
        mailbox: Do not sort until messages are threaded.
diff --git a/libbalsa/mailbox.c b/libbalsa/mailbox.c
index 5eff0a69f..c6b163ec3 100644
--- a/libbalsa/mailbox.c
+++ b/libbalsa/mailbox.c
@@ -654,6 +654,11 @@ libbalsa_mailbox_close(LibBalsaMailbox * mailbox, gboolean expunge)
         libbalsa_mailbox_free_mindex(mailbox);
         priv->stamp++;
        priv->state = LB_MAILBOX_STATE_CLOSED;
+
+        if (priv->set_threading_idle_id != 0) {
+            g_source_remove(priv->set_threading_idle_id);
+            priv->set_threading_idle_id = 0;
+        }
         priv->messages_threaded = FALSE;
 
         if (priv->run_filters_idle_id != 0) {


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