2005-01-27 [christoph] 1.0.0cvs20
authorChristoph Hohmann <reboot@gmx.ch>
Thu, 27 Jan 2005 19:51:37 +0000 (19:51 +0000)
committerChristoph Hohmann <reboot@gmx.ch>
Thu, 27 Jan 2005 19:51:37 +0000 (19:51 +0000)
* src/folder.c
use normal message remove function if a folder has no function
to remove all messages

* src/folderview.c
fix memory leak

ChangeLog.claws
PATCHSETS
configure.ac
src/folder.c
src/folderview.c

index 44de369..66d24a7 100644 (file)
@@ -1,3 +1,12 @@
+2005-01-27 [christoph] 1.0.0cvs20
+
+       * src/folder.c
+               use normal message remove function if a folder has no function
+               to remove all messages
+
+       * src/folderview.c
+               fix memory leak
+
 2005-01-27 [colin]     1.0.0cvs19
 
        * src/procmime.c
index 56293f1..6698e84 100644 (file)
--- a/PATCHSETS
+++ b/PATCHSETS
 ( cvs diff -u -r 1.175 -r 1.176 src/procmsg.c; cvs diff -u -r 1.72 -r 1.73 src/procmsg.h; cvs diff -u -r 1.468 -r 1.469 src/compose.c; ) > 1.0.0cvs17.patchset
 ( cvs diff -u -r 1.469 -r 1.470 src/compose.c; ) > 1.0.0cvs18.patchset
 ( cvs diff -u -r 1.102 -r 1.103 src/procmime.c; ) > 1.0.0cvs19.patchset
+( cvs diff -u -r 1.262 -r 1.263 src/folder.c; cvs diff -u -r 1.256 -r 1.257 src/folderview.c; ) > 1.0.0cvs20.patchset
index fe30713..3a3960d 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=0
 MICRO_VERSION=0
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=19
+EXTRA_VERSION=20
 EXTRA_RELEASE=
 
 if test \( $EXTRA_VERSION -eq 0 \) -o \( "x$EXTRA_RELEASE" != "x" \); then
index 9fc18b5..455e575 100644 (file)
@@ -1431,7 +1431,8 @@ static gint folder_sort_folder_list(gconstpointer a, gconstpointer b)
 gint folder_item_open(FolderItem *item)
 {
        gchar *buf;
-       if((item->folder->klass->scan_required != NULL) && (item->folder->klass->scan_required(item->folder, item))) {
+       if((item->folder->klass->scan_required != NULL) &&
+          (item->folder->klass->scan_required(item->folder, item))) {
                folder_item_scan_full(item, TRUE);
        }
        folder_item_syncronize_flags(item);
@@ -2805,14 +2806,22 @@ gint folder_item_remove_all_msg(FolderItem *item)
 
        folder = item->folder;
 
-       g_return_val_if_fail(folder->klass->remove_all_msg != NULL, -1);
+       if (folder->klass->remove_all_msg != NULL) {
+               result = folder->klass->remove_all_msg(folder, item);
 
-       result = folder->klass->remove_all_msg(folder, item);
+               if (result == 0) {
+                       folder_item_free_cache(item);
+                       item->cache = msgcache_new();
+               }
+       } else {
+               MsgInfoList *msglist;
 
-       if (result == 0) {
-               folder_item_free_cache(item);
-               item->cache = msgcache_new();
+               msglist = folder_item_get_msg_list(item);
+               result = folder_item_remove_msgs(item, msglist);
+               procmsg_msg_list_free(msglist);
+       }
 
+       if (result == 0) {
                item->new_msgs = 0;
                item->unread_msgs = 0;
                item->unreadmarked_msgs = 0;
index b81e95a..1cb674a 100644 (file)
@@ -1792,8 +1792,8 @@ static void folderview_empty_trash_cb(FolderView *folderview, guint action,
        for (cur = mlist ; cur != NULL ; cur = cur->next) {
                MsgInfo * msginfo = (MsgInfo *) cur->data;
                partial_mark_for_delete(msginfo);
-               procmsg_msginfo_free(msginfo);
        }
+       procmsg_msg_list_free(mlist);
 
        folder_item_remove_all_msg(item);
 }