balsa r8088 - in trunk: . src



Author: PeterB
Date: Sat Feb 28 01:58:47 2009
New Revision: 8088
URL: http://svn.gnome.org/viewvc/balsa?rev=8088&view=rev

Log:
on startup, check new mail in an idle handler, after the mailbox tree has been built

Modified:
   trunk/ChangeLog
   trunk/src/main-window.c
   trunk/src/main.c

Modified: trunk/src/main-window.c
==============================================================================
--- trunk/src/main-window.c	(original)
+++ trunk/src/main-window.c	Sat Feb 28 01:58:47 2009
@@ -2695,10 +2695,8 @@
 	if (!LIBBALSA_IS_MAILBOX_IMAP(mbnode->mailbox) ||
 	    bw_imap_check_test(mbnode->dir ? mbnode->dir :
 			    libbalsa_mailbox_imap_get_path
-			    (LIBBALSA_MAILBOX_IMAP(mbnode->mailbox)))) {
-	    g_object_ref(mbnode->mailbox);
-	    *list = g_slist_prepend(*list, mbnode->mailbox);
-	}
+			    (LIBBALSA_MAILBOX_IMAP(mbnode->mailbox))))
+	    *list = g_slist_prepend(*list, g_object_ref(mbnode->mailbox));
     }
     g_object_unref(mbnode);
 

Modified: trunk/src/main.c
==============================================================================
--- trunk/src/main.c	(original)
+++ trunk/src/main.c	Sat Feb 28 01:58:47 2009
@@ -736,6 +736,13 @@
 }
 #endif
 
+static gboolean
+balsa_main_check_new_messages(gpointer data)
+{
+    check_new_messages_real(data, TYPE_CALLBACK);
+    return FALSE;
+}
+
 /* -------------------------- main --------------------------------- */
 int
 main(int argc, char *argv[])
@@ -887,8 +894,7 @@
     gtk_widget_show(window);
 
     if (cmd_check_mail_on_startup || balsa_app.check_mail_upon_startup)
-	check_new_messages_cb(NULL, NULL);
-
+        g_idle_add((GSourceFunc) balsa_main_check_new_messages, NULL);
 
     g_idle_add((GSourceFunc) scan_mailboxes_idle_cb, NULL);
     g_timeout_add(1801*1000, (GSourceFunc) periodic_expunge_cb, NULL);



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