+2002-06-30 [christoph] 0.7.8claws37
+
+ * src/folder.c
+ * src/folderview.c
+ * src/mh.c
+ * src/news.c
+ * src/procmsg.c
+ fix broken folder tree rescaning
+ and don't use procmsg_get_mark_sum
+ anymore
+
2002-06-30 [christoph] 0.7.8claws36
* merge new cache branch
MICRO_VERSION=8
INTERFACE_AGE=0
BINARY_AGE=0
-EXTRA_VERSION=claws36
+EXTRA_VERSION=claws37
VERSION=$MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION$EXTRA_VERSION
dnl set $target
{
g_return_if_fail(item != NULL);
+ debug_print(_("Destroying folder item %s\n"), item->path);
+
+ if(item->cache)
+ folder_item_free_cache(item);
g_free(item->name);
g_free(item->path);
- msgcache_destroy(item->cache);
g_free(item);
}
}
}
+gboolean folder_tree_destroy_func(GNode *node, gpointer data) {
+ FolderItem *item = (FolderItem *) node->data;
+
+ folder_item_destroy(item);
+ return FALSE;
+}
+
void folder_tree_destroy(Folder *folder)
{
/* TODO: destroy all FolderItem before */
+ g_node_traverse(folder->node, G_POST_ORDER, G_TRAVERSE_ALL, -1, folder_tree_destroy_func, NULL);
g_node_destroy(folder->node);
folder->inbox = NULL;
folder_write_list();
folderview_set_all();
+ folderview_check_new(folder);
+
gtk_widget_destroy(window);
inc_unlock();
}
for (; list != NULL; list = list->next) {
Folder *folder = list->data;
- if (!folder->scan_tree) continue;
folder_set_ui_func(folder, folderview_scan_tree_func, NULL);
folder->scan_tree(folder);
folder_set_ui_func(folder, NULL, NULL);
folder_write_list();
folderview_set_all();
+
+ list = folder_get_list();
+ for (; list != NULL; list = list->next) {
+ Folder *folder = list->data;
+
+ folderview_check_new(folder);
+ }
+
gtk_widget_destroy(window);
inc_unlock();
}
closedir(dp);
+/*
if (item->path) {
gint new, unread, total, min, max;
item->unread = unread;
item->total = n_msg;
}
+*/
}
static gboolean mh_rename_folder_func(GNode *node, gpointer data)
return 0;
}
+/*
path = folder_item_get_path(item);
if (path && is_dir_exist(path)) {
procmsg_get_mark_sum(path, &new, &unread, &total, &min, &max,
item->unread = unread;
item->total = num;
item->last_num = last;
-
+*/
return 0;
}
g_free(flags);
}
+#if 0 /* NEW CACHE DOES NOT ALLOW ACCESS TO THE MARK FILE */
void procmsg_get_mark_sum(const gchar *folder,
gint *new, gint *unread, gint *total,
gint *min, gint *max,
debug_print("mark->new = %d, mark->unread = %d, mark->total = %d\n",
*(marksum.new), *(marksum.unread), *(marksum.total));
}
+#endif
static GHashTable *procmsg_read_mark_file(const gchar *folder)
{