* sync with main changes of 2002-10-08
authorAlfons Hoogervorst <alfons@proteus.demon.nl>
Sun, 13 Oct 2002 16:30:48 +0000 (16:30 +0000)
committerAlfons Hoogervorst <alfons@proteus.demon.nl>
Sun, 13 Oct 2002 16:30:48 +0000 (16:30 +0000)
- drop changes to src/compose.c (requires claws specific changes)
- drop changes to src/summaryview.c (requires changes to compose.c)

ChangeLog
ChangeLog.claws
ChangeLog.jp
configure.in
src/account.c
src/folder.c
src/folder.h
src/folderview.c
src/imap.c
src/imap.h

index 2d22e6c..9a2c90e 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,25 @@
+2002-10-08
+       * src/account.c: account_edit_prefs(): removed unused variables.
+       * src/compose.[ch]: separated WITH_QUOTE/WITHOUT_QUOTE flags in
+         ComposeMode.
+         compose_reply()
+         compose_reply_set_entry(): receive reply type with one argument.
+       * src/summaryview.c: summary_reply(): reduced conditional branches.
+
+2002-10-08
+       * src/compose.c: compose_redirect(), compose_reedit(): strip CR
+         from line ends (thanks to Sergey Vlasov).
+       * src/folderview.c: renamed 'Rescan folder tree' to 'Rebuild
+         folder tree'.
+
+2002-10-08
+
+       * src/folder.[ch]: added a virtual method Folder::remove_msgs().
+       * src/imap.[ch]: implemented imap_remove_msgs() which expunges
+         messages all at once.
+
 2002-10-07
  
        * src/account.[ch]: account_open(): new. It opens account prefs
index 6dbb9ae..6940ff6 100644 (file)
@@ -1,3 +1,9 @@
+2002-10-12 [alfons]    0.8.5claws29
+       
+       * sync with main changes of 2002-10-08
+       - drop changes to src/compose.c (requires claws specific changes)
+        - drop changes to src/summaryview.c (requires changes to compose.c)    
+
 2002-10-12 [alfons]    0.8.5claws28
        
        * sync with main changes of 2002-10-07
@@ -5,9 +11,7 @@
 2002-10-12 [alfons]    0.8.5claws27
 
        * sync with main changes of 2002-10-04
-
        - drop changes to src/compose.c (requires claws specific changes)
-
        - drop changes to src/prefs_folder_item.c (claws implementation
          seems to be working)
 
index 28c80cf..08aa86d 100644 (file)
@@ -1,3 +1,26 @@
+2002-10-08
+       * src/account.c: account_edit_prefs(): Ì¤»ÈÍѤÎÊÑ¿ô¤òºï½ü¡£
+       * src/compose.[ch]: ComposeMode ¤Î WITH_QUOTE/WITHOUT_QUOTE ¥Õ¥é¥°
+         ¤òʬΥ¡£
+         compose_reply()
+         compose_reply_set_entry(): ÊÖ¿®·Á¼°¤ò°ì¤Ä¤Î°ú¿ô¤Ç¼õ¤±¼è¤ë¤è¤¦¤Ë
+         ¤·¤¿¡£
+       * src/summaryview.c: summary_reply(): ¾ò·ïʬ´ô¤òºï¸º¡£
+
+2002-10-08
+       * src/compose.c: compose_redirect(), compose_reedit(): strip CR
+         from line ends (thanks to Sergey Vlasov).
+       * src/folderview.c: ¡Ö¥Õ¥©¥ë¥À¥Ä¥ê¡¼¤òºÆ¥¹¥­¥ã¥ó¡×¤ò¡Ö¥Õ¥©¥ë¥À¥Ä¥ê¡¼
+         ¤òºÆ¹½Ãۡפ˲þ̾¡£
+
+2002-10-08
+
+       * src/folder.[ch]: ²¾Áۥ᥽¥Ã¥É Folder::remove_msgs() ¤òÄɲá£
+       * src/imap.[ch]: ¥á¥Ã¥»¡¼¥¸¤ò°ìÅ٤˺ï½ü¤¹¤ë imap_remove_msgs()
+         ¤ò¼ÂÁõ¡£
+
 2002-10-07
  
        * src/account.[ch]: account_open(): ¿·µ¬¡£¥¢¥«¥¦¥ó¥ÈÀßÄê¥À¥¤¥¢¥í¥°
index 324182b..4a3cf10 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=8
 MICRO_VERSION=5
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=claws28
+EXTRA_VERSION=claws29
 VERSION=$MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION$EXTRA_VERSION
 
 dnl set $target
index 6b3ff20..e8b2a34 100644 (file)
@@ -677,8 +677,6 @@ static void account_edit_prefs(void)
        GtkCList *clist = GTK_CLIST(edit_account.clist);
        PrefsAccount *ac_prefs;
        gint row;
-       gboolean prev_default;
-       gchar *ac_name;
 
        if (!clist->selection) return;
 
index aee1c4c..58ce963 100644 (file)
@@ -1818,9 +1818,18 @@ gint folder_item_remove_msg(FolderItem *item, gint num)
 
 gint folder_item_remove_msgs(FolderItem *item, GSList *msglist)
 {
+       Folder *folder;
        gint ret = 0;
 
        g_return_val_if_fail(item != NULL, -1);
+       
+       folder = item->folder;
+       if (folder->remove_msgs) {
+               ret = folder->remove_msgs(folder, item, msglist);
+               if (ret == 0)
+                       folder->scan(folder);
+               return ret;
+       }
 
        if (!item->cache) folder_item_read_cache(item);
 
index e606a13..dde2f22 100644 (file)
@@ -161,6 +161,9 @@ struct _Folder
        gint     (*remove_msg)          (Folder         *folder,
                                         FolderItem     *item,
                                         gint            num);
+       gint     (*remove_msgs)         (Folder         *folder,
+                                        FolderItem     *item,
+                                        GSList         *msglist);
        gint     (*remove_all_msg)      (Folder         *folder,
                                         FolderItem     *item);
        gboolean (*is_msg_changed)      (Folder         *folder,
index d355e47..7575655 100644 (file)
@@ -276,7 +276,7 @@ static GtkItemFactoryEntry folderview_mail_popup_entries[] =
        {N_("/---"),                    NULL, NULL, 0, "<Separator>"},
        {N_("/_Check for new messages"),
                                        NULL, folderview_update_tree_cb, 0, NULL},
-       {N_("/R_escan folder tree"),    NULL, folderview_update_tree_cb, 1, NULL},
+       {N_("/R_ebuild folder tree"),   NULL, folderview_update_tree_cb, 1, NULL},
        {N_("/---"),                    NULL, NULL, 0, "<Separator>"},
        {N_("/Remove _mailbox"),        NULL, folderview_remove_mailbox_cb, 0, NULL},
        {N_("/---"),                    NULL, NULL, 0, "<Separator>"},
@@ -296,7 +296,7 @@ static GtkItemFactoryEntry folderview_imap_popup_entries[] =
        {N_("/---"),                    NULL, NULL, 0, "<Separator>"},
        {N_("/_Check for new messages"),
                                        NULL, folderview_update_tree_cb, 0, NULL},
-       {N_("/R_escan folder tree"),    NULL, folderview_update_tree_cb, 1, NULL},
+       {N_("/R_ebuild folder tree"),   NULL, folderview_update_tree_cb, 1, NULL},
        {N_("/---"),                    NULL, NULL, 0, "<Separator>"},
        {N_("/Remove _IMAP4 account"),  NULL, folderview_rm_imap_server_cb, 0, NULL},
        {N_("/---"),                    NULL, NULL, 0, "<Separator>"},
@@ -791,7 +791,7 @@ void folderview_rescan_tree(Folder *folder)
        if (!folder->scan_tree) return;
 
        inc_lock();
-       window = label_window_create(_("Rescanning folder tree..."));
+       window = label_window_create(_("Rebuilding folder tree..."));
 
        folder_set_ui_func(folder, folderview_scan_tree_func, NULL);
        folder_scan_tree(folder);
@@ -1554,7 +1554,7 @@ static void folderview_button_pressed(GtkWidget *ctree, GdkEventButton *event,
                SET_SENS(mail_factory, "/Rename folder...", rename_folder);
                SET_SENS(mail_factory, "/Delete folder", delete_folder);
                SET_SENS(mail_factory, "/Check for new messages", update_tree);
-               SET_SENS(mail_factory, "/Rescan folder tree", rescan_tree);
+               SET_SENS(mail_factory, "/Rebuild folder tree", rescan_tree);
                SET_SENS(mail_factory, "/Remove mailbox", remove_tree);
                SET_SENS(mail_factory, "/Search folder...", search_folder);
                SET_SENS(mail_factory, "/Property...", folder_property);
@@ -1568,7 +1568,7 @@ static void folderview_button_pressed(GtkWidget *ctree, GdkEventButton *event,
                SET_SENS(imap_factory, "/Rename folder...", rename_folder);
                SET_SENS(imap_factory, "/Delete folder", delete_folder);
                SET_SENS(imap_factory, "/Check for new messages", update_tree);
-               SET_SENS(imap_factory, "/Rescan folder tree", rescan_tree);
+               SET_SENS(imap_factory, "/Rebuild folder tree", rescan_tree);
                SET_SENS(imap_factory, "/Remove IMAP4 account", remove_tree);
                SET_SENS(imap_factory, "/Search folder...", search_folder);
                SET_SENS(imap_factory, "/Property...", folder_property);
index 672e15e..62398e8 100644 (file)
@@ -318,6 +318,7 @@ static void imap_folder_init(Folder *folder, const gchar *name,
        folder->copy_msg              = imap_copy_msg;
        folder->copy_msgs_with_dest   = imap_copy_msgs_with_dest;
        folder->remove_msg            = imap_remove_msg;
+       folder->remove_msgs           = imap_remove_msgs;
        folder->remove_all_msg        = imap_remove_all_msg;
        folder->is_msg_changed        = imap_is_msg_changed;
 /*
@@ -1001,6 +1002,64 @@ gint imap_remove_msg(Folder *folder, FolderItem *item, gint uid)
        return IMAP_SUCCESS;
 }
 
+gint imap_remove_msgs(Folder *folder, FolderItem *item, GSList *msglist)
+{
+       gint exists, recent, unseen;
+       guint32 uid_validity;
+       gint ok;
+       IMAPSession *session;
+       gchar *dir;
+       MsgInfo *msginfo;
+       GSList *cur;
+       guint32 uid;
+
+       g_return_val_if_fail(folder != NULL, -1);
+       g_return_val_if_fail(folder->type == F_IMAP, -1);
+       g_return_val_if_fail(item != NULL, -1);
+       g_return_val_if_fail(msglist != NULL, -1);
+
+       session = imap_session_get(folder);
+       if (!session) return -1;
+
+       ok = imap_select(session, IMAP_FOLDER(folder), item->path,
+                        &exists, &recent, &unseen, &uid_validity);
+       statusbar_pop_all();
+       if (ok != IMAP_SUCCESS)
+               return ok;
+
+       for (cur = msglist; cur != NULL; cur = cur->next) {
+               msginfo = (MsgInfo *)cur->data;
+               uid = msginfo->msgnum;
+               ok = imap_set_message_flags
+                       (IMAP_SESSION(REMOTE_FOLDER(folder)->session),
+                        uid, uid, IMAP_FLAG_DELETED, TRUE);
+               statusbar_pop_all();
+               if (ok != IMAP_SUCCESS) {
+                       log_warning(_("can't set deleted flags: %d\n"), uid);
+                       return ok;
+               }
+       }
+
+       ok = imap_cmd_expunge(SESSION(session)->sock);
+       statusbar_pop_all();
+       if (ok != IMAP_SUCCESS) {
+               log_warning(_("can't expunge\n"));
+               return ok;
+       }
+
+       dir = folder_item_get_path(item);
+       if (is_dir_exist(dir)) {
+               for (cur = msglist; cur != NULL; cur = cur->next) {
+                       msginfo = (MsgInfo *)cur->data;
+                       uid = msginfo->msgnum;
+                       remove_numbered_files(dir, uid, uid);
+               }
+       }
+       g_free(dir);
+       return IMAP_SUCCESS;
+}
+
 gint imap_remove_all_msg(Folder *folder, FolderItem *item)
 {
        gint exists, recent, unseen;
index 8f0538b..927f1ee 100644 (file)
@@ -141,8 +141,12 @@ gint imap_copy_msgs_with_dest              (Folder         *folder,
 gint imap_remove_msg                   (Folder         *folder,
                                         FolderItem     *item,
                                         gint            uid);
+gint imap_remove_msgs                  (Folder         *folder,
+                                        FolderItem     *item,
+                                        GSList         *msglist);
 gint imap_remove_all_msg               (Folder         *folder,
                                         FolderItem     *item);
+
 gboolean imap_is_msg_changed           (Folder         *folder,
                                         FolderItem     *item,
                                         MsgInfo        *msginfo);