2011-10-30 [pawel] 3.7.10cvs59
authorPaweł Pękala <c0rn@gazeta.pl>
Sun, 30 Oct 2011 19:34:44 +0000 (19:34 +0000)
committerPaweł Pękala <c0rn@gazeta.pl>
Sun, 30 Oct 2011 19:34:44 +0000 (19:34 +0000)
* src/prefs_folder_item.c
Update summaryview after changing folder prefs when needed

ChangeLog
PATCHSETS
configure.ac
src/prefs_folder_item.c

index 093806a..eb56668 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2011-10-30 [pawel]     3.7.10cvs59
+
+       * src/prefs_folder_item.c
+               Update summaryview after changing folder prefs when needed
+
 2011-10-30 [pawel]     3.7.10cvs58
 
        * src/mimeview.c
index ba5c211..4477893 100644 (file)
--- a/PATCHSETS
+++ b/PATCHSETS
 ( cvs diff -u -r 1.207.2.224 -r 1.207.2.225 src/folderview.c;  ) > 3.7.10cvs56.patchset
 ( cvs diff -u -r 1.27.2.58 -r 1.27.2.59 src/addr_compl.c;  ) > 3.7.10cvs57.patchset
 ( cvs diff -u -r 1.83.2.175 -r 1.83.2.176 src/mimeview.c;  ) > 3.7.10cvs58.patchset
+( cvs diff -u -r 1.52.2.85 -r 1.52.2.86 src/prefs_folder_item.c;  ) > 3.7.10cvs59.patchset
index 63578a0..66d8133 100644 (file)
@@ -12,7 +12,7 @@ MINOR_VERSION=7
 MICRO_VERSION=10
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=58
+EXTRA_VERSION=59
 EXTRA_RELEASE=
 EXTRA_GTK2_VERSION=
 
index 287aad3..64350da 100644 (file)
@@ -628,8 +628,9 @@ static void general_save_folder_prefs(FolderItem *folder, FolderItemGeneralPage
 {
        FolderItemPrefs *prefs = folder->prefs;
        gchar *buf;
-       gboolean all = FALSE;
+       gboolean all = FALSE, summary_update_needed = FALSE;
        SpecialFolderItemType type = F_NORMAL;
+       FolderView *folderview = mainwindow_get_mainwindow()->folderview;
 
        if (folder->path == NULL)
                return;
@@ -642,14 +643,20 @@ static void general_save_folder_prefs(FolderItem *folder, FolderItemGeneralPage
        type = combobox_get_active_data(GTK_COMBO_BOX(page->folder_type));
        if (all && folder->stype != type && page->item->parent_stype == F_NORMAL) {
                folder_item_change_type(folder, type);
+               summary_update_needed = TRUE;
        }
 
 #ifndef G_OS_WIN32
        if (all || gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(page->simplify_subject_rec_checkbtn))) {
+               gboolean old_simplify_subject = prefs->enable_simplify_subject;
+               int regexp_diffs = strcmp2(prefs->simplify_subject_regexp, gtk_editable_get_chars(
+                                       GTK_EDITABLE(page->entry_simplify_subject), 0, -1));
                prefs->enable_simplify_subject =
                        gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(page->checkbtn_simplify_subject));
                ASSIGN_STRING(prefs->simplify_subject_regexp,
                              gtk_editable_get_chars(GTK_EDITABLE(page->entry_simplify_subject), 0, -1));
+               if (old_simplify_subject != prefs->enable_simplify_subject || regexp_diffs != 0)
+                       summary_update_needed = TRUE;
        }
 #endif 
        if (all || gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(page->folder_chmod_rec_checkbtn))) {
@@ -694,6 +701,11 @@ static void general_save_folder_prefs(FolderItem *folder, FolderItemGeneralPage
        }
 
        folder_item_prefs_save_config(folder);
+
+       if (folder->opened && summary_update_needed) {
+               summary_set_prefs_from_folderitem(folderview->summaryview, folder);
+               summary_show(folderview->summaryview, folder);
+       }       
 }      
 
 static gboolean general_save_recurse_func(GNode *node, gpointer data)