balsa r8089 - in trunk: . src



Author: PeterB
Date: Sat Feb 28 13:11:41 2009
New Revision: 8089
URL: http://svn.gnome.org/viewvc/balsa?rev=8089&view=rev

Log:
really check new mail after building the tree

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

Modified: trunk/src/main.c
==============================================================================
--- trunk/src/main.c	(original)
+++ trunk/src/main.c	Sat Feb 28 13:11:41 2009
@@ -485,14 +485,16 @@
 gboolean
 initial_open_unread_mailboxes()
 {
-    GList *i, *gl;
+    GList *l, *gl;
     gdk_threads_enter();
     gl = balsa_mblist_find_all_unread_mboxes(NULL);
 
     if (gl) {
-        for (i = g_list_first(gl); i; i = g_list_next(i)) {
-            printf("opening %s..\n", (LIBBALSA_MAILBOX(i->data))->name);
-            balsa_mblist_open_mailbox(LIBBALSA_MAILBOX(i->data));
+        for (l = gl; l; l = l->next) {
+            LibBalsaMailbox *mailbox = LIBBALSA_MAILBOX(l->data);
+
+            printf("opening %s..\n", mailbox->name);
+            balsa_mblist_open_mailbox(mailbox);
         }
         g_list_free(gl);
     }
@@ -507,9 +509,9 @@
     if (!balsa_app.inbox)
 	return FALSE;
 
-    printf("opening %s..\n", (LIBBALSA_MAILBOX(balsa_app.inbox))->name);
+    printf("opening %s..\n", balsa_app.inbox->name);
     gdk_threads_enter();
-    balsa_mblist_open_mailbox(LIBBALSA_MAILBOX(balsa_app.inbox));
+    balsa_mblist_open_mailbox(balsa_app.inbox);
     gdk_threads_leave();
     
     return FALSE;
@@ -893,12 +895,12 @@
     }
     gtk_widget_show(window);
 
-    if (cmd_check_mail_on_startup || balsa_app.check_mail_upon_startup)
-        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);
 
+    if (cmd_check_mail_on_startup || balsa_app.check_mail_upon_startup)
+        g_idle_add((GSourceFunc) balsa_main_check_new_messages, NULL);
+
     accel_map_load();
     gdk_threads_enter();
     gtk_main();



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