[balsa/gtk3] Use a thread to check for new mail



commit b7ba2b711dfe287b274a22e039df452fa9409a52
Author: Peter Bloomfield <PeterBloomfield bellsouth net>
Date:   Tue Mar 19 19:10:38 2013 -0400

    Use a thread to check for new mail
    
        * src/main-window.c: use thread to check for new mail.

 ChangeLog         |    4 ++++
 src/main-window.c |   10 +++-------
 2 files changed, 7 insertions(+), 7 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 7035cda..6f9169a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2013-03-19  Peter Bloomfield
+
+       * src/main-window.c: use thread to check for new mail.
+
 2013-03-17  Peter Bloomfield
 
        * src/mailbox-node.c (mb_rescan_cb): reopen mailboxes in the UI
diff --git a/src/main-window.c b/src/main-window.c
index 04f222b..589faf3 100644
--- a/src/main-window.c
+++ b/src/main-window.c
@@ -2967,6 +2967,9 @@ check_new_messages_real(BalsaWindow * window, int type)
          (balsa_app.pwindow_option == UNTILCLOSED && progress_dialog)))
        ensure_check_mail_dialog(window);
 
+    gtk_tree_model_foreach(GTK_TREE_MODEL(balsa_app.mblist_tree_store),
+                          (GtkTreeModelForeachFunc) bw_add_mbox_to_checklist,
+                          &list);
 
     /* initiate threads */
     info = g_new(struct check_messages_thread_info, 1);
@@ -2980,13 +2983,6 @@ check_new_messages_real(BalsaWindow * window, int type)
      * reclaimed as soon as the thread exits
      */
     pthread_detach(get_mail_thread);
-
-    gtk_tree_model_foreach(GTK_TREE_MODEL(balsa_app.mblist_tree_store),
-                          (GtkTreeModelForeachFunc) bw_add_mbox_to_checklist,
-                          &list);
-    g_slist_foreach(list, (GFunc) bw_mailbox_check, window);
-    g_slist_foreach(list, (GFunc) g_object_unref, NULL);
-    g_slist_free(list);
 #else
 
     if (window)


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