* src/folder.c
authorChristoph Hohmann <reboot@gmx.ch>
Thu, 25 Jul 2002 23:00:59 +0000 (23:00 +0000)
committerChristoph Hohmann <reboot@gmx.ch>
Thu, 25 Jul 2002 23:00:59 +0000 (23:00 +0000)
* src/folderview.c
* src/imap.c
        fix imap folder rescanning

ChangeLog.claws
configure.in
src/folder.c
src/folderview.c
src/imap.c

index 091c18e..440491d 100644 (file)
@@ -1,3 +1,10 @@
+2002-07-26 [christoph] 0.8.0claws14
+
+       * src/folder.c
+       * src/folderview.c
+       * src/imap.c
+               fix imap folder rescanning
+
 2002-07-25 [christoph] 0.8.0claws13
 
        * src/filter.c
index 295769f..f0f42e8 100644 (file)
@@ -8,7 +8,7 @@ MINOR_VERSION=8
 MICRO_VERSION=0
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=claws13
+EXTRA_VERSION=claws14
 VERSION=$MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION$EXTRA_VERSION
 
 dnl set $target
index e749d65..cf2fb56 100644 (file)
@@ -328,6 +328,9 @@ gboolean folder_tree_destroy_func(GNode *node, gpointer data) {
 
 void folder_tree_destroy(Folder *folder)
 {
+       g_return_if_fail(folder != NULL);
+       g_return_if_fail(folder->node != NULL);
+       
        prefs_scoring_clear();
        prefs_filtering_clear();
 
@@ -449,7 +452,7 @@ void folder_scan_tree(Folder *folder)
        folder_tree_destroy(folder);
 
        folder->scan_tree(folder);
-       
+
        g_node_traverse(folder->node, G_POST_ORDER, G_TRAVERSE_ALL, -1, folder_scan_tree_func, pptable);
        folder_persist_prefs_free(pptable);
 
index 490b928..efb5661 100644 (file)
@@ -1639,7 +1639,7 @@ static void folderview_selected(GtkCTree *ctree, GtkCTreeNode *row,
                        gdk_pointer_ungrab(GDK_CURRENT_TIME);
        }
 
-       if((item->folder->type == F_IMAP) || (item->folder->type == F_NEWS)) {
+       if(((item->folder->type == F_IMAP) && !item->no_select) || (item->folder->type == F_NEWS)) {
                folder_item_scan(item);
        }
 
index c3d32ef..4345162 100644 (file)
@@ -359,6 +359,9 @@ static gboolean imap_reset_uid_lists_func(GNode *node, gpointer data)
 
 static void imap_reset_uid_lists(Folder *folder)
 {
+       if(folder->node == NULL)
+               return;
+       
        /* Destroy all uid lists and rest last uid */
        g_node_traverse(folder->node, G_IN_ORDER, G_TRAVERSE_ALL, -1, imap_reset_uid_lists_func, NULL); 
 }
@@ -1065,9 +1068,9 @@ void imap_scan_tree(Folder *folder)
                debug_print("IMAP root directory: %s\n", root_folder);
        }
 
-       folder_tree_destroy(folder);
        item = folder_item_new(folder, folder->name, root_folder);
        item->folder = folder;
+       item->no_select = TRUE;
        folder->node = g_node_new(item);
 
        imap_scan_tree_recursive(session, item);