* src/folder.c
authorAlfons Hoogervorst <alfons@proteus.demon.nl>
Fri, 26 Jul 2002 20:24:58 +0000 (20:24 +0000)
committerAlfons Hoogervorst <alfons@proteus.demon.nl>
Fri, 26 Jul 2002 20:24:58 +0000 (20:24 +0000)
use folder item identifier for saving / restoring
preferences because folder->path might not be unique

ChangeLog.claws
configure.in
src/folder.c

index 8aca0c1e073aa44cfd423bd16c159d6f3303c297..109d41e76056c77c176b43c1a201a3293d1eace1 100644 (file)
@@ -1,3 +1,9 @@
+2002-07-26 [alfons]    0.8.0claws18
+
+       * src/folder.c
+               use folder item identifier for saving / restoring
+               preferences because folder->path might not be unique
+
 2002-07-26 [melvin]    0.8.0claws17
 
        * src/logwindow.c
index 2549f54c8175f009c44df7c7a1cc896f7505ffbd..1e6e2a040d61244d2b06a7ab98dea7fc35ca4953 100644 (file)
@@ -8,7 +8,7 @@ MINOR_VERSION=8
 MICRO_VERSION=0
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=claws17
+EXTRA_VERSION=claws18
 VERSION=$MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION$EXTRA_VERSION
 
 dnl set $target
index 2944caa5da19b60744a96576d03bcf5bc358d944..bf0e003424751883325c501399ab1a766234d507 100644 (file)
@@ -2271,14 +2271,15 @@ static void folder_get_persist_prefs_recursive(GNode *node, GHashTable *pptable)
        FolderItem *item = FOLDER_ITEM(node->data);
        PersistPrefs *pp;
        GNode *child, *cur;
+       gchar *id;
 
        g_return_if_fail(node != NULL);
        g_return_if_fail(item != NULL);
 
-       /* FIXME: item->path == NULL for top level folder, so this means that 
-        * properties of MH folder root will not be stored. Not quite important, 
-        * because the top level folder properties are not special anyway. */
+       /* NOTE: item->path == NULL means top level folder; not interesting
+        * to store preferences of that one.  */
        if (item->path) {
+               id = folder_item_get_identifier(item);
                pp = g_new0(PersistPrefs, 1);
                g_return_if_fail(pp != NULL);
                pp->collapsed = item->collapsed;
@@ -2287,8 +2288,8 @@ static void folder_get_persist_prefs_recursive(GNode *node, GHashTable *pptable)
                pp->hide_read_msgs = item->hide_read_msgs;
                pp->sort_key  = item->sort_key;
                pp->sort_type = item->sort_type;
-               g_hash_table_insert(pptable, g_strdup(item->path), pp);
-       }               
+               g_hash_table_insert(pptable, id, pp);
+       }
 
        if (node->children) {
                child = node->children;