2007-09-16 [colin] 3.0.0cvs14
authorColin Leroy <colin@colino.net>
Sun, 16 Sep 2007 09:54:07 +0000 (09:54 +0000)
committerColin Leroy <colin@colino.net>
Sun, 16 Sep 2007 09:54:07 +0000 (09:54 +0000)
* src/folderview.c
* src/main.c
* src/mainwindow.c
Fix bug 1308, 'Claws deletes folderlist.xml after
fetching mail short after start-up'

ChangeLog
PATCHSETS
configure.ac
src/folderview.c
src/main.c
src/mainwindow.c

index 91aa6f3ae0ad0e21103de284bcbb3de89d0b7705..6d7cec370b94a8a07634c33f347a3b524488b3c7 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2007-09-16 [colin]     3.0.0cvs14
+
+       * src/folderview.c
+       * src/main.c
+       * src/mainwindow.c
+               Fix bug 1308, 'Claws deletes folderlist.xml after
+               fetching mail short after start-up'
+
 2007-09-16 [colin]     3.0.0cvs13
 
        * src/compose.c
index 6a58279421728c73876144507fe90c3292347a87..0b1229b460d4ef213d9cd287473aac4cf8437734 100644 (file)
--- a/PATCHSETS
+++ b/PATCHSETS
 ( cvs diff -u -r 1.213.2.159 -r 1.213.2.160 src/folder.c;  ) > 3.0.0cvs11.patchset
 ( cvs diff -u -r 1.17.2.27 -r 1.17.2.28 po/sr.po;  ) > 3.0.0cvs12.patchset
 ( cvs diff -u -r 1.382.2.407 -r 1.382.2.408 src/compose.c;  ) > 3.0.0cvs13.patchset
+( cvs diff -u -r 1.207.2.181 -r 1.207.2.182 src/folderview.c;  cvs diff -u -r 1.115.2.166 -r 1.115.2.167 src/main.c;  cvs diff -u -r 1.274.2.210 -r 1.274.2.211 src/mainwindow.c;  ) > 3.0.0cvs14.patchset
index a897e855b7d34b63169d9e27bfed0cb70d003e93..db2a463856c5827b814ec9e854b21bb1ad447170 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=0
 MICRO_VERSION=0
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=13
+EXTRA_VERSION=14
 EXTRA_RELEASE=
 EXTRA_GTK2_VERSION=
 
index bc000b1c7d458a43aec1722ce86c579c97e95653..2294789a179c514a1493c908ff5b612f57b98946 100644 (file)
@@ -754,7 +754,7 @@ static gboolean folderview_defer_set(gpointer data)
        if (mainwin->lock_count)
                return TRUE;
                
-       g_print("doing deferred folderview_set now\n");
+       debug_print("doing deferred folderview_set now\n");
        folderview_set(folderview);
 
        folderview->deferred_refresh_id = -1;
@@ -774,7 +774,7 @@ void folderview_set(FolderView *folderview)
                if (folderview->deferred_refresh_id == -1)
                        folderview->deferred_refresh_id = 
                                g_timeout_add(500, folderview_defer_set, folderview);
-               g_print("deferred folderview_set\n");
+               debug_print("deferred folderview_set\n");
                return;
        }
 
index 58dd6c25941ff5a11131d4e0c5785aad2d417e12..04ad8728be33f61adcfd8795f6b2a98dbd1ad940 100644 (file)
@@ -298,6 +298,8 @@ static void claws_gtk_idle(void)
        g_usleep(50000);
 }
 
+static gboolean sc_starting = FALSE;
+
 static gboolean defer_check_all(void *data)
 {
        gboolean autochk = GPOINTER_TO_INT(data);
@@ -305,6 +307,11 @@ static gboolean defer_check_all(void *data)
        inc_all_account_mail(static_mainwindow, autochk, 
                        prefs_common.newmail_notify_manu);
 
+       if (sc_starting) {
+               sc_starting = FALSE;
+               main_window_set_menu_sensitive(static_mainwindow);
+               toolbar_main_set_sensitive(static_mainwindow);
+       }
        return FALSE;
 }
 
@@ -312,6 +319,11 @@ static gboolean defer_check(void *data)
 {
        inc_mail(static_mainwindow, prefs_common.newmail_notify_manu);
 
+       if (sc_starting) {
+               sc_starting = FALSE;
+               main_window_set_menu_sensitive(static_mainwindow);
+               toolbar_main_set_sensitive(static_mainwindow);
+       }
        return FALSE;
 }
 
@@ -325,6 +337,11 @@ static gboolean defer_jump(void *data)
                defer_check(NULL);
        } 
        mainwindow_jump_to(data, FALSE);
+       if (sc_starting) {
+               sc_starting = FALSE;
+               main_window_set_menu_sensitive(static_mainwindow);
+               toolbar_main_set_sensitive(static_mainwindow);
+       }
        return FALSE;
 }
 
@@ -622,7 +639,6 @@ static void sc_session_manager_connect(MainWindow *mainwin)
 #endif
 
 static gboolean sc_exiting = FALSE;
-static gboolean sc_starting = FALSE;
 static gboolean show_at_startup = TRUE;
 static gboolean claws_crashed_bool = FALSE;
 
@@ -768,6 +784,7 @@ int main(int argc, char *argv[])
        gboolean crash_file_present = FALSE;
        gint num_folder_class = 0;
        gboolean asked_for_migration = FALSE;
+       gboolean start_done = TRUE;
 
        START_TIMING("startup");
        
@@ -1265,10 +1282,13 @@ int main(int argc, char *argv[])
        }
 
        if (cmd.receive_all && !cmd.target) {
+               start_done = FALSE;
                g_timeout_add(1000, defer_check_all, GINT_TO_POINTER(FALSE));
        } else if (prefs_common.chk_on_startup && !cmd.target) {
+               start_done = FALSE;
                g_timeout_add(1000, defer_check_all, GINT_TO_POINTER(TRUE));
        } else if (cmd.receive && !cmd.target) {
+               start_done = FALSE;
                g_timeout_add(1000, defer_check, NULL);
        } else {
                gtk_widget_grab_focus(folderview->ctree);
@@ -1291,6 +1311,7 @@ int main(int argc, char *argv[])
        }
        
        if (cmd.target) {
+               start_done = FALSE;
                g_timeout_add(500, defer_jump, (gpointer)cmd.target);
        }
 
@@ -1298,7 +1319,11 @@ int main(int argc, char *argv[])
        
        compose_reopen_exit_drafts();
 
-       sc_starting = FALSE;
+       if (start_done) {
+               sc_starting = FALSE;
+               main_window_set_menu_sensitive(mainwin);
+               toolbar_main_set_sensitive(mainwin);
+       }
        END_TIMING();
 
        gtk_main();
index 45b128ceb22e227cdd643e766dd0756d89d21269..e64040f3dd06f85d57b6ee9da14982de58d87c4e 100644 (file)
@@ -2453,7 +2453,7 @@ SensitiveCond main_window_get_current_state(MainWindow *mainwin)
        
        selection = summary_get_selection_type(mainwin->summaryview);
 
-       if (mainwin->lock_count == 0)
+       if (mainwin->lock_count == 0 && !claws_is_starting())
                state |= M_UNLOCKED;
        if (selection != SUMMARY_NONE)
                state |= M_MSG_EXIST;