0.9.3claws55
authorChristoph Hohmann <reboot@gmx.ch>
Sat, 26 Jul 2003 17:01:47 +0000 (17:01 +0000)
committerChristoph Hohmann <reboot@gmx.ch>
Sat, 26 Jul 2003 17:01:47 +0000 (17:01 +0000)
* src/folder.[ch]
* src/imap.c
* src/mbox_folder.c
* src/mh.c
* src/news.c
        add support for copy function that copy multiple messages
        (not implemented yet)

* src/summaryview.c
        add missing return value

ChangeLog.claws
src/folder.c
src/folder.h
src/imap.c
src/mbox_folder.c
src/mh.c
src/news.c
src/summaryview.c

index 05358dff6cbb41b77d67be31f471f4fa546699b4..20b1096252cb876899f4cb2d2fe0e610ae7c76e4 100644 (file)
@@ -1,3 +1,16 @@
+2003-07-26 [christoph] 0.9.3claws55
+
+       * src/folder.[ch]
+       * src/imap.c
+       * src/mbox_folder.c
+       * src/mh.c
+       * src/news.c
+               add support for copy function that copy multiple messages
+               (not implemented yet)
+
+       * src/summaryview.c
+               add missing return value
+
 2003-07-26 [paul]      0.9.3claws54
 
        * tools/multiwebsearch.pl
index 5c3b42634f853bf01efb8d273c2f8b4e57776d72..565dbb32adb526d9a5fbce1dcd6b70fe92c21344 100644 (file)
@@ -2056,14 +2056,15 @@ gint folder_item_copy_msg(FolderItem *dest, MsgInfo *msginfo)
 
 gint folder_item_copy_msg(FolderItem *dest, MsgInfo *msginfo)
 {
-       GSList *list = NULL;
-       gint ret;
+       GSList msglist;
 
-       list = g_slist_append(list, msginfo);
-       ret = folder_item_copy_msgs_with_dest(dest, list);
-       g_slist_free(list);
+       g_return_val_if_fail(dest != NULL, -1);
+       g_return_val_if_fail(msginfo != NULL, -1);
+    
+       msglist.data = msginfo;
+       msglist.next = NULL;
        
-       return ret;
+       return folder_item_copy_msgs_with_dest(dest, &msglist);
 }
 
 /*
@@ -2101,15 +2102,22 @@ gint folder_item_copy_msgs_with_dest(FolderItem *dest, GSList *msglist)
  
        g_return_val_if_fail(folder->klass->copy_msg != NULL, -1);
 
-       /* 
+       /*
         * Copy messages to destination folder and 
         * store new message numbers in newmsgnums
         */
-       for (l = msglist ; l != NULL ; l = g_slist_next(l)) {
-               MsgInfo * msginfo = (MsgInfo *) l->data;
+       if (folder->klass->copy_msgs != NULL) {
+               if (folder->klass->copy_msgs(folder, dest, msglist, &newmsgnums) < 0) {
+                       g_slist_free(newmsgnums);
+                       return -1;
+               }
+       } else {
+               for (l = msglist ; l != NULL ; l = g_slist_next(l)) {
+                       MsgInfo * msginfo = (MsgInfo *) l->data;
 
-               num = folder->klass->copy_msg(folder, dest, msginfo);
-               newmsgnums = g_slist_append(newmsgnums, GINT_TO_POINTER(num));
+                       num = folder->klass->copy_msg(folder, dest, msginfo);
+                       newmsgnums = g_slist_append(newmsgnums, GINT_TO_POINTER(num));
+               }
        }
 
        /* Read cache for dest folder */
index 10d361046ec95f906ef9027966c2c87391cc972d..e594a324d9dc205e66198deea84f9a0569c60bbe 100644 (file)
@@ -224,6 +224,10 @@ struct _FolderClass
        gint            (*copy_msg)             (Folder         *folder,
                                                 FolderItem     *dest,
                                                 MsgInfo        *msginfo);
+       gint            (*copy_msgs)            (Folder         *folder,
+                                                FolderItem     *dest,
+                                                MsgInfoList    *msglist,
+                                                MsgNumberList **newnum_list);
        gint            (*remove_msg)           (Folder         *folder,
                                                 FolderItem     *item,
                                                 gint            num);
index ddee6dfaa19ce470677e839d230b43ff6245ca2c..297da51d925f878b1283eaee13979418c96a2d82 100644 (file)
@@ -433,6 +433,7 @@ FolderClass imap_class =
        imap_add_msg,
        NULL,
        imap_copy_msg,
+       NULL,
        imap_remove_msg,
        imap_remove_all_msg,
        imap_is_msg_changed,
index 74af8d60cf1ffb7ab36c0046be44cd1db6182826..44ba92284ba7e4ba44c9171dc4b990826d6b7269 100644 (file)
@@ -104,6 +104,7 @@ FolderClass mbox_class =
        mbox_add_msg,
        NULL,
        mbox_copy_msg,
+       NULL,
        mbox_remove_msg,
        mbox_remove_all_msg,
        NULL,
index 0b021edd0b7c6db863e06699367e7dbc0bd689f4..a49507a4a1e8cda6dc6526d7a6e67ba5e2f8530d 100644 (file)
--- a/src/mh.c
+++ b/src/mh.c
@@ -115,6 +115,7 @@ FolderClass mh_class =
        mh_add_msg,
        mh_add_msgs,
        mh_copy_msg,
+       NULL,
        mh_remove_msg,
        mh_remove_all_msg,
        mh_is_msg_changed,
index 49cd8468b6e09543205cc4153f2fc28066ac2514..713a747ac41769c866dadc8317c01ac5b3fdf3f5 100644 (file)
@@ -147,6 +147,7 @@ FolderClass news_class =
        NULL,
        NULL,
        NULL,
+       NULL,
 };
 
 FolderClass *news_get_class(void)
index 381876f7263e0556946f6d751c210aadb4ed7489..202beb63a515aaf0d83b5d270036fdb630e5477d 100644 (file)
@@ -4465,7 +4465,7 @@ void summary_pass_key_press_event(SummaryView *summaryview, GdkEventKey *event)
        if ((event->state & (GDK_MOD1_MASK|GDK_CONTROL_MASK)) != 0) break
 
 #define RETURN_IF_LOCKED() \
-       if (summaryview->mainwin->lock_count) return
+       if (summaryview->mainwin->lock_count) return TRUE
 
 static gint summary_key_pressed(GtkWidget *widget, GdkEventKey *event,
                                SummaryView *summaryview)