sync with 0.8.2cvs9
authorPaul Mangan <paul@claws-mail.org>
Wed, 4 Sep 2002 08:12:49 +0000 (08:12 +0000)
committerPaul Mangan <paul@claws-mail.org>
Wed, 4 Sep 2002 08:12:49 +0000 (08:12 +0000)
ChangeLog
ChangeLog.claws
ChangeLog.jp
configure.in
src/folder.c
src/imap.c

index af526ad..ff46476 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2002-09-04
+
+       * src/folder.c:
+         folder_tree_destroy()
+         folder_write_list_recursive(): added sanity check.
+       * src/imap.c: imap_scan_tree(): if folder->node is NULL and
+         can't get session, create empty folder node (based on the
+         Alfons' suggestion).
+
 2002-09-03
 
        * src/textview.c: textview_key_pressed(): pass GDK_Delete event to
index e00bb8a..b4bae3c 100644 (file)
@@ -1,4 +1,9 @@
-2002-09-03 [colin]     0.8.2claws27 
+2002-09-04 [paul]      0.8.2claws28
+
+       * sync with 0.8.2cvs9
+               see ChangeLog 2002-08-04
+
+2002-09-04 [colin]     0.8.2claws27 
 
        * src/prefs_common.[ch]
                Added signature color configuration
index 9d3337a..4770f3c 100644 (file)
@@ -1,3 +1,12 @@
+2002-09-04
+
+       * src/folder.c:
+         folder_tree_destroy()
+         folder_write_list_recursive(): À°¹çÀ­¥Á¥§¥Ã¥¯¤òÄɲá£
+       * src/imap.c: imap_scan_tree(): folder->node ¤¬ NULL ¤Ç session
+         ¤ò¼èÆÀ¤Ç¤­¤Ê¤¤¾ì¹ç¡¢¶õ¤Î¥Õ¥©¥ë¥À¥Î¡¼¥É¤òºîÀ®¤¹¤ë¤è¤¦¤Ë¤·¤¿
+         (Alfons ¤µ¤ó¤ÎÄó°Æ¤Ë´ð¤Å¤¯)¡£
+
 2002-09-03
 
        * src/textview.c: textview_key_pressed(): GDK_Delete ¥¤¥Ù¥ó¥È¤ò
index 9c69f00..7d68da7 100644 (file)
@@ -8,7 +8,7 @@ MINOR_VERSION=8
 MICRO_VERSION=2
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=claws27
+EXTRA_VERSION=claws28
 VERSION=$MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION$EXTRA_VERSION
 
 dnl set $target
index 33d1498..523c327 100644 (file)
@@ -324,7 +324,8 @@ void folder_tree_destroy(Folder *folder)
        prefs_filtering_clear();
 
        g_node_traverse(folder->node, G_POST_ORDER, G_TRAVERSE_ALL, -1, folder_tree_destroy_func, NULL);
-       g_node_destroy(folder->node);
+       if (folder->node)
+               g_node_destroy(folder->node);
 
        folder->inbox = NULL;
        folder->outbox = NULL;
@@ -2027,7 +2028,7 @@ static gchar *folder_get_list_path(void)
 static void folder_write_list_recursive(GNode *node, gpointer data)
 {
        FILE *fp = (FILE *)data;
-       FolderItem *item = FOLDER_ITEM(node->data);
+       FolderItem *item;
        gint i, depth;
        static gchar *folder_type_str[] = {"mh", "mbox", "maildir", "imap",
                                           "news", "unknown"};
@@ -2036,7 +2037,10 @@ static void folder_write_list_recursive(GNode *node, gpointer data)
        static gchar *sort_key_str[] = {"none", "number", "size", "date",
                                        "from", "subject", "score", "label",
                                        "mark", "unread", "mime", "locked" };
+       g_return_if_fail(node != NULL);
+       g_return_if_fail(fp != NULL);
 
+       item = FOLDER_ITEM(node->data);
        g_return_if_fail(item != NULL);
 
        depth = g_node_depth(node);
index c8fe44f..46cc236 100644 (file)
@@ -1088,7 +1088,15 @@ void imap_scan_tree(Folder *folder)
        g_return_if_fail(folder->account != NULL);
 
        session = imap_session_get(folder);
-       if (!session) return;
+       if (!session) {
+               if (!folder->node) {
+                       folder_tree_destroy(folder);
+                       item = folder_item_new(folder, folder->name, NULL);
+                       item->folder = folder;
+                       folder->node = g_node_new(item);
+               }
+               return;
+       }
 
        if (folder->account->imap_dir && *folder->account->imap_dir) {
                Xstrdup_a(root_folder, folder->account->imap_dir, return);