2005-10-13 [colin] 1.9.15cvs36
authorColin Leroy <colin@colino.net>
Thu, 13 Oct 2005 17:44:08 +0000 (17:44 +0000)
committerColin Leroy <colin@colino.net>
Thu, 13 Oct 2005 17:44:08 +0000 (17:44 +0000)
* src/folder.c
Batch on flags sync
* src/folderview.c
Revert speed hack which is dangerous in fact
Apply prefs faster

ChangeLog-gtk2.claws
PATCHSETS
configure.ac
src/folder.c
src/folderview.c

index 7f931ac8d11c35635544147a3bacb953b9c24003..8b7b58d9db6e6b0c59320bcd9faa512daf8ebd99 100644 (file)
@@ -1,3 +1,11 @@
+2005-10-13 [colin]     1.9.15cvs36
+
+       * src/folder.c
+               Batch on flags sync
+       * src/folderview.c
+               Revert speed hack which is dangerous in fact
+               Apply prefs faster
+
 2005-10-13 [colin]     1.9.15cvs35
 
        * src/folder_item_prefs.c
index 93b9da6f749420af5147b1f910a88a94aa205182..f4ac450bac74e33c782c20f1b0350a031771bf2c 100644 (file)
--- a/PATCHSETS
+++ b/PATCHSETS
 ( cvs diff -u -r 1.83.2.41 -r 1.83.2.42 src/mimeview.c;  ) > 1.9.15cvs33.patchset
 ( cvs diff -u -r 1.8.2.13 -r 1.8.2.14 src/export.c;  cvs diff -u -r 1.13.2.12 -r 1.13.2.13 src/import.c;  cvs diff -u -r 1.105.2.37 -r 1.105.2.38 src/prefs_account.c;  ) > 1.9.15cvs34.patchset
 ( cvs diff -u -r 1.2.2.9 -r 1.2.2.10 src/folder_item_prefs.c;  ) > 1.9.15cvs35.patchset
+( cvs diff -u -r 1.213.2.63 -r 1.213.2.64 src/folder.c;  cvs diff -u -r 1.207.2.71 -r 1.207.2.72 src/folderview.c;  ) > 1.9.15cvs36.patchset
index 91137654305beb35af6dea73ec20a14449e0ef22..b3a02d5ed813b60790932e5e40e96df9724f607a 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=9
 MICRO_VERSION=15
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=35
+EXTRA_VERSION=36
 EXTRA_RELEASE=
 EXTRA_GTK2_VERSION=
 
index b060a17d9502a91ca5eb49082b3efb37b5bb3993..be7a5f008770b91c81f4c043fbc1a54b55aeda1e 100644 (file)
@@ -1597,6 +1597,7 @@ static gint syncronize_flags(FolderItem *item, MsgInfoList *msglist)
 
        relation = g_relation_new(2);
        g_relation_index(relation, 0, g_direct_hash, g_direct_equal);
+       folder_item_set_batch(item, TRUE);
        if ((ret = item->folder->klass->get_flags(
            item->folder, item, msglist, relation)) == 0) {
                GTuples *tuples;
@@ -1622,6 +1623,7 @@ static gint syncronize_flags(FolderItem *item, MsgInfoList *msglist)
                        }
                }
        }
+       folder_item_set_batch(item, FALSE);
        g_relation_destroy(relation);   
 
        return ret;
index 5e6fc35bc38a266027f57b09c437617a91c3a564..6658267055b9fb45543772dc1a47c1442edd06f4 100644 (file)
@@ -1821,6 +1821,7 @@ void folderview_process_open(FolderView *folderview, FolderItem *item)
        return; 
 }
 
+#if 0
 gboolean folderview_process_open_cb(gpointer data)
 {
        FolderView *folderview = (FolderView *)data;
@@ -1841,6 +1842,7 @@ gboolean folderview_process_open_cb(gpointer data)
        
        return FALSE;   
 }
+#endif
 
 static void folderview_selected(GtkCTree *ctree, GtkCTreeNode *row,
                                gint column, FolderView *folderview)
@@ -1929,9 +1931,7 @@ static void folderview_selected(GtkCTree *ctree, GtkCTreeNode *row,
                return;
         }
        
-       if (pre_global_processing || item->prefs->processing 
-           || post_global_processing)
-               folderview_process_open(folderview, item);
+       folderview_process_open(folderview, item);
 
        main_window_cursor_normal(folderview->mainwin);
 
@@ -1951,10 +1951,6 @@ static void folderview_selected(GtkCTree *ctree, GtkCTreeNode *row,
                        gtk_ctree_node_moveto(ctree, row, -1, 0.5, 0);
        }
 
-       if (!pre_global_processing && !item->prefs->processing 
-           && !post_global_processing)
-               g_timeout_add(0, folderview_process_open_cb, folderview);
-
        STATUSBAR_POP(folderview->mainwin);
 
        folderview->open_folder = FALSE;
@@ -2278,16 +2274,47 @@ void folderview_reflect_prefs_pixmap_theme(FolderView *folderview)
 
 void folderview_reflect_prefs(void)
 {
+       static gchar *last_font = NULL;
+       gboolean update_font = TRUE;
        FolderView *folderview = mainwindow_get_mainwindow()->folderview;
-       FolderItem *item = folderview_get_selected_item(folderview);    
-       normal_style = normal_color_style = bold_style = 
-               bold_color_style = bold_tgtfold_style = NULL;
+       FolderItem *item = folderview_get_selected_item(folderview);
+       GtkAdjustment *pos = gtk_scrolled_window_get_vadjustment(
+                               GTK_SCROLLED_WINDOW(folderview->scrolledwin));
+       gint height = pos->value;
+
+       if (last_font && !strcmp(last_font, NORMAL_FONT))
+               update_font = FALSE;
+
+       if (last_font)
+               g_free(last_font);
+       
+       last_font = g_strdup(NORMAL_FONT);
+
+       if (update_font) {              
+               normal_style = normal_color_style = bold_style = 
+                       bold_color_style = bold_tgtfold_style = NULL;
 
-       folderview_init(folderview);
+               folderview_init(folderview);
+       }
+       gtk_clist_freeze(GTK_CLIST(folderview->ctree));
        folderview_column_set_titles(folderview);
        folderview_set_all();
+
+       g_signal_handlers_block_by_func
+               (G_OBJECT(folderview->ctree),
+                G_CALLBACK(folderview_selected), folderview);
+
        if (item)
                folderview_select(folderview, item);
+
+       g_signal_handlers_unblock_by_func
+               (G_OBJECT(folderview->ctree),
+                G_CALLBACK(folderview_selected), folderview);
+
+       pos = gtk_scrolled_window_get_vadjustment(
+                               GTK_SCROLLED_WINDOW(folderview->scrolledwin));
+       gtk_adjustment_set_value(pos, height);
+       gtk_clist_thaw(GTK_CLIST(folderview->ctree));
 }
 
 static void drag_state_stop(FolderView *folderview)