2007-08-27 [colin] 2.10.0cvs177
authorColin Leroy <colin@colino.net>
Mon, 27 Aug 2007 18:19:46 +0000 (18:19 +0000)
committerColin Leroy <colin@colino.net>
Mon, 27 Aug 2007 18:19:46 +0000 (18:19 +0000)
* src/folder_item_prefs.c
* src/folder_item_prefs.h
* src/imap_gtk.c
* src/mh_gtk.c
Fix loss of subfolders properties when
renaming a folder

ChangeLog
PATCHSETS
configure.ac
src/folder_item_prefs.c
src/folder_item_prefs.h
src/imap_gtk.c
src/mh_gtk.c

index 85fe5c2..b572638 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2007-08-27 [colin]     2.10.0cvs177
+
+       * src/folder_item_prefs.c
+       * src/folder_item_prefs.h
+       * src/imap_gtk.c
+       * src/mh_gtk.c
+               Fix loss of subfolders properties when
+               renaming a folder
+
 2007-08-26 [wwp]       2.10.0cvs176
 
        * src/alertpanel.c
index cf07fec..360c2fa 100644 (file)
--- a/PATCHSETS
+++ b/PATCHSETS
 ( cvs diff -u -r 1.17.2.36 -r 1.17.2.37 src/alertpanel.c;  cvs diff -u -r 1.94.2.147 -r 1.94.2.148 src/messageview.c;  cvs diff -u -r 1.60.2.48 -r 1.60.2.49 src/prefs_actions.c;  cvs diff -u -r 1.6.2.16 -r 1.6.2.17 src/common/log.c;  ) > 2.10.0cvs174.patchset
 ( cvs diff -u -r 1.60.2.49 -r 1.60.2.50 src/prefs_actions.c;  ) > 2.10.0cvs175.patchset
 ( cvs diff -u -r 1.17.2.37 -r 1.17.2.38 src/alertpanel.c;  cvs diff -u -r 1.94.2.148 -r 1.94.2.149 src/messageview.c;  cvs diff -u -r 1.60.2.50 -r 1.60.2.51 src/prefs_actions.c;  ) > 2.10.0cvs176.patchset
+( cvs diff -u -r 1.2.2.22 -r 1.2.2.23 src/folder_item_prefs.c;  cvs diff -u -r 1.2.2.11 -r 1.2.2.12 src/folder_item_prefs.h;  cvs diff -u -r 1.1.2.49 -r 1.1.2.50 src/imap_gtk.c;  cvs diff -u -r 1.2.2.27 -r 1.2.2.28 src/mh_gtk.c;  ) > 2.10.0cvs177.patchset
index 4828396..0036a58 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=10
 MICRO_VERSION=0
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=176
+EXTRA_VERSION=177
 EXTRA_RELEASE=
 EXTRA_GTK2_VERSION=
 
index 2f93623..b5ac2e7 100644 (file)
@@ -167,7 +167,7 @@ void folder_item_prefs_save_config(FolderItem * item)
        tmp_prefs = * item->prefs;
 
        id = folder_item_get_identifier(item);
-
+       debug_print("saving prefs for %s\n", id?id:"(null)");
        prefs_write_config(param, id, FOLDERITEM_RC);
        g_free(id);
 
@@ -175,6 +175,21 @@ void folder_item_prefs_save_config(FolderItem * item)
         */
 }
 
+static gboolean folder_item_prefs_save_config_func(GNode *node, gpointer data)
+{
+       FolderItem *item = (FolderItem *) node->data;
+       folder_item_prefs_save_config(item);
+       return FALSE;
+}
+
+void folder_item_prefs_save_config_recursive(FolderItem * item)
+{      
+       gchar * id;
+
+       g_node_traverse(item->node, G_PRE_ORDER, G_TRAVERSE_ALL,
+                       -1, folder_item_prefs_save_config_func, NULL);
+}
+
 static FolderItemPrefs *folder_item_prefs_clear(FolderItemPrefs *prefs)
 {
        prefs->sort_by_number = FALSE;
index ce622c7..7973cf9 100644 (file)
@@ -82,6 +82,7 @@ struct _FolderItemPrefs {
 
 void folder_item_prefs_read_config(FolderItem * item);
 void folder_item_prefs_save_config(FolderItem * item);
+void folder_item_prefs_save_config_recursive(FolderItem * item);
 FolderItemPrefs *folder_item_prefs_new(void);
 void folder_item_prefs_free(FolderItemPrefs * prefs);
 void folder_item_prefs_copy_prefs(FolderItem * src, FolderItem * dest);
index ad247b7..ab3a55e 100644 (file)
@@ -257,7 +257,7 @@ static void rename_folder_cb(FolderView *folderview, guint action,
        g_free(old_id);
        g_free(new_id);
 
-       folder_item_prefs_save_config(item);
+       folder_item_prefs_save_config_recursive(item);
        folder_write_list();
 }
 
index c7f55ae..98457eb 100644 (file)
@@ -267,7 +267,7 @@ static void rename_folder_cb(FolderView *folderview, guint action,
        g_free(old_id);
        g_free(new_id);
 
-       folder_item_prefs_save_config(item);
+       folder_item_prefs_save_config_recursive(item);
        folder_write_list();
 }