* src/folder.[ch]
authorChristoph Hohmann <reboot@gmx.ch>
Mon, 7 Oct 2002 21:47:32 +0000 (21:47 +0000)
committerChristoph Hohmann <reboot@gmx.ch>
Mon, 7 Oct 2002 21:47:32 +0000 (21:47 +0000)
* src/folderview.c
* src/mainwindow.c
        fix new folder ghost message bug
        (closes bug [ 619722 ] wrong count for newly created folders)

ChangeLog.claws
configure.in
src/folder.c
src/folder.h
src/folderview.c
src/mainwindow.c

index 33c848a..b9bf71a 100644 (file)
@@ -1,3 +1,11 @@
+2002-10-07 [christoph] 0.8.3claws52
+
+       * src/folder.[ch]
+       * src/folderview.c
+       * src/mainwindow.c
+               fix new folder ghost message bug
+               (closes bug [ 619722 ] wrong count for newly created folders)
+
 2002-10-07 [christoph] 0.8.3claws51
 
        * src/compose.c
index 41a11da..c7804de 100644 (file)
@@ -10,7 +10,7 @@ MINOR_VERSION=8
 MICRO_VERSION=3
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=claws51
+EXTRA_VERSION=claws52
 VERSION=$MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION$EXTRA_VERSION
 
 dnl set $target
index 71a780e..a5bbe26 100644 (file)
@@ -451,6 +451,16 @@ void folder_scan_tree(Folder *folder)
        prefs_matcher_read_config();
 }
 
+FolderItem *folder_create_folder(FolderItem *parent, const gchar *name)
+{
+       FolderItem *new_item;
+
+       new_item = parent->folder->create_folder(parent->folder, parent, name);
+       new_item->cache = msgcache_new();
+
+       return new_item;
+}
+
 struct TotalMsgCount
 {
        guint new;
@@ -1700,7 +1710,7 @@ gint folder_item_copy_msgs_with_dest(FolderItem *dest, GSList *msglist)
 
        /* Read cache for dest folder */
        if (!dest->cache) folder_item_read_cache(dest);
-       
+
        /* 
         * Fetch new MsgInfos for new messages in dest folder,
         * add them to the msgcache and update folder message counts
index f9f339d..974c1ac 100644 (file)
@@ -300,6 +300,7 @@ GList *folder_get_list              (void);
 gint   folder_read_list                (void);
 void   folder_write_list       (void);
 void   folder_scan_tree                (Folder *folder);
+FolderItem *folder_create_folder(FolderItem    *parent, const gchar *name);
 void   folder_update_op_count          (void);
 void   folder_func_to_all_folders      (FolderItemFunc function,
                                         gpointer data);
index fd3b5af..08bdd6f 100644 (file)
@@ -1865,7 +1865,7 @@ static void folderview_new_folder_cb(FolderView *folderview, guint action,
                return;
        }
 
-       new_item = item->folder->create_folder(item->folder, item, new_folder);
+       new_item = folder_create_folder(item, new_folder);
        if (!new_item) {
                alertpanel_error(_("Can't create the folder `%s'."), name);
                g_free(new_folder);
@@ -1921,7 +1921,7 @@ static void folderview_new_mbox_folder_cb(FolderView *folderview, guint action,
                return;
        }
 
-       new_item = item->folder->create_folder(item->folder, item, new_folder);
+       new_item = folder_create_folder(item, new_folder);
        g_free(new_folder);
        if (!new_item) return;
 
@@ -2233,7 +2233,7 @@ static void folderview_new_imap_folder_cb(FolderView *folderview, guint action,
                return;
        }
 
-       new_item = item->folder->create_folder(item->folder, item, new_folder);
+       new_item = folder_create_folder(item, new_folder);
        if (!new_item) {
                alertpanel_error(_("Can't create the folder `%s'."), name);
                g_free(new_folder);
index 5b58dd0..b58f8d5 100644 (file)
@@ -1558,11 +1558,11 @@ void main_window_add_mbox(MainWindow *mainwin)
        item->folder = folder;
        folder->node = g_node_new(item);
 
-       folder->create_folder(folder, item, "inbox");
-       folder->create_folder(folder, item, "outbox");
-       folder->create_folder(folder, item, "queue");
-       folder->create_folder(folder, item, "draft");
-       folder->create_folder(folder, item, "trash");
+       folder_create_folder(item, "inbox");
+       folder_create_folder(item, "outbox");
+       folder_create_folder(item, "queue");
+       folder_create_folder(item, "draft");
+       folder_create_folder(item, "trash");
 
        folderview_set(mainwin->folderview);
 }