sync with sylpheed 0.6.2cvs12
authorPaul Mangan <paul@claws-mail.org>
Sun, 7 Oct 2001 09:15:06 +0000 (09:15 +0000)
committerPaul Mangan <paul@claws-mail.org>
Sun, 7 Oct 2001 09:15:06 +0000 (09:15 +0000)
ChangeLog
ChangeLog.claws
ChangeLog.jp
NEWS
configure.in
src/compose.c
src/folder.c
src/folder.h
src/summaryview.c

index 1913ef3..2fe1a90 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2001-10-07
+
+       * src/prefs_common.c: prefs_receive_create(): correction to English.
+       * src/compose.c: compose_set_ext_editor_sensitive(): fixed a bug
+         that didn't set the menu sensitivity correctly (thanks to
+         Melvin Hadasht).
+       * src/summaryview.c: delete messages permanently if the current
+         folder is trash and 'delete' operation is executed.
+       * src/folder.[ch]: folder_item_remove_msgs(): new. It removes
+         all messages given in the list.
+
 2001-10-05
 
        * src/summaryview.c: summary_show(): fixed a bug that didn't show
index f6b9e0d..e0fc2e3 100644 (file)
@@ -1,3 +1,8 @@
+2001-10-07 [paul]      0.6.2claws23
+
+       * sync with sylpheed 0.6.2cvs12
+               see ChangeLog entry 2001-10-07
+
 2001-10-06 [match]
        * src/jpilot.[ch]
                enable jpilot to read unsynch'ed addresses.
index f867732..5bf19c9 100644 (file)
@@ -1,3 +1,14 @@
+2001-10-07
+
+       * src/prefs_common.c: prefs_receive_create(): ±Ñ¸ì¤Î½¤Àµ¡£
+       * src/compose.c: compose_set_ext_editor_sensitive(): ¥á¥Ë¥å¡¼¤Î
+         sensitivity ¤òÀµ¤·¤¯¥»¥Ã¥È¤·¤Æ¤¤¤Ê¤«¤Ã¤¿¥Ð¥°¤ò½¤Àµ(Melvin Hadasht
+         ¤µ¤ó thanks)¡£
+       * src/summaryview.c: ¸½ºß¤Î¥Õ¥©¥ë¥À¤¬¤´¤ßÈ¢¤Î¾ì¹ç¤Ë¡Öºï½ü¡×Áàºî¤ò
+         ¼Â¹Ô¤·¤¿¤é¥á¥Ã¥»¡¼¥¸¤ò´°Á´ºï½ü¤¹¤ë¤è¤¦¤Ë¤·¤¿¡£
+       * src/folder.[ch]: folder_item_remove_msgs(): ¿·µ¬¡£¥ê¥¹¥È¤ÇÍ¿¤¨
+         ¤é¤ì¤¿Á´¤Æ¤Î¥á¥Ã¥»¡¼¥¸¤òºï½ü¤¹¤ë¡£
+
 2001-10-05
 
        * src/summaryview.c: summary_show(): ¡Ö¥Õ¥©¥ë¥À¤ËÆþ¤Ã¤¿¤È¤­¤Ë̤ÆÉ
diff --git a/NEWS b/NEWS
index f49d5df..0ce4a0b 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -6,6 +6,7 @@ Changes of Sylpheed
     * The text part of nested multipart message, or HTML only message
       is now correctly quoted on replying.
     * The status of threading is now preserved for each folders.
+    * Selective removal from trash folder has been enabled.
     * User name and password of IMAP4 account which include spaces are now
       handled correctly.
     * Workaround for 8bit characters conversion failure on C locale when
index 12a876d..f28bf9e 100644 (file)
@@ -8,7 +8,7 @@ MINOR_VERSION=6
 MICRO_VERSION=2
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=claws22
+EXTRA_VERSION=claws23
 VERSION=$MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION$EXTRA_VERSION
 
 dnl
index 7dd6439..1068fc6 100644 (file)
@@ -4700,7 +4700,8 @@ static void compose_set_ext_editor_sensitive(Compose *compose,
                           sensitive);
        menu_set_sensitive(ifactory, "/File/Insert file", sensitive);
        menu_set_sensitive(ifactory, "/File/Insert signature", sensitive);
-       menu_set_sensitive(ifactory, "/Edit/Wrap long lines", sensitive);
+       menu_set_sensitive(ifactory, "/Edit/Wrap current paragraph", sensitive);
+       menu_set_sensitive(ifactory, "/Edit/Wrap all long lines", sensitive);
        menu_set_sensitive(ifactory, "/Edit/Edit with external editor",
                           sensitive);
 
index e7e7414..a3202ee 100644 (file)
@@ -814,6 +814,23 @@ gint folder_item_remove_msg(FolderItem *item, gint num)
        return ret;
 }
 
+gint folder_item_remove_msgs(FolderItem *item, GSList *msglist)
+{
+       gint ret = 0;
+
+       g_return_val_if_fail(item != NULL, -1);
+
+       while (msglist != NULL) {
+               MsgInfo *msginfo = (MsgInfo *)msglist->data;
+
+               ret = folder_item_remove_msg(item, msginfo->msgnum);
+               if (ret != 0) break;
+               msglist = msglist->next;
+       }
+
+       return ret;
+}
+
 gint folder_item_remove_all_msg(FolderItem *item)
 {
        Folder *folder;
index 41aa76a..82e5adf 100644 (file)
@@ -294,6 +294,8 @@ gint   folder_item_copy_msgs_with_dest      (FolderItem     *dest,
                                         GSList         *msglist);
 gint   folder_item_remove_msg          (FolderItem     *item,
                                         gint            num);
+gint   folder_item_remove_msgs         (FolderItem     *item,
+                                        GSList         *msglist);
 gint   folder_item_remove_all_msg      (FolderItem     *item);
 gboolean folder_item_is_msg_changed    (FolderItem     *item,
                                         MsgInfo        *msginfo);
index ba8ad61..8e9d655 100644 (file)
@@ -1068,8 +1068,7 @@ static void summary_set_menu_sensitive(SummaryView *summaryview)
        if (summaryview->folder_item->folder->type != F_NEWS) {
                menu_set_sensitive(ifactory, "/Move...", TRUE);
                menu_set_sensitive(ifactory, "/Copy...", TRUE);
-               if (summaryview->folder_item->stype != F_TRASH)
-                       menu_set_sensitive(ifactory, "/Delete", TRUE);
+               menu_set_sensitive(ifactory, "/Delete", TRUE);
        }
 
        menu_set_sensitive(ifactory, "/Execute", TRUE);
@@ -2686,7 +2685,8 @@ static void summary_delete_row(SummaryView *summaryview, GtkCTreeNode *row)
        CHANGE_FLAGS(msginfo);
        summaryview->deleted++;
 
-       if (!prefs_common.immediate_exec)
+       if (!prefs_common.immediate_exec && 
+           summaryview->folder_item->stype != F_TRASH)
                summary_set_row_marks(summaryview, row);
 
        debug_print(_("Message %s/%d is set to delete\n"),
@@ -2696,25 +2696,30 @@ static void summary_delete_row(SummaryView *summaryview, GtkCTreeNode *row)
 void summary_delete(SummaryView *summaryview)
 {
        GtkCTree *ctree = GTK_CTREE(summaryview->ctree);
+       FolderItem *item = summaryview->folder_item;
        GList *cur;
 
-       if (!summaryview->folder_item ||
-           summaryview->folder_item->folder->type == F_NEWS) return;
+       if (!item || item->folder->type == F_NEWS) return;
 
        if (summary_is_locked(summaryview)) return;
 
-       /* if current folder is trash, don't delete */
-       if (summaryview->folder_item->stype == F_TRASH) {
-               alertpanel_notice(_("Current folder is Trash."));
-               return;
+       /* if current folder is trash, ask for confirmation */
+       if (item->stype == F_TRASH) {
+               AlertValue aval;
+
+               aval = alertpanel(_("Delete message(s)"),
+                                 _("Do you really want to delete message(s) from the trash?"),
+                                 _("Yes"), _("No"), NULL);
+               if (aval != G_ALERTDEFAULT) return;
        }
 
-       for (cur = GTK_CLIST(ctree)->selection; cur != NULL; cur = cur->next)
+       for (cur = GTK_CLIST(ctree)->selection; cur != NULL; cur = cur->next) {
                summary_delete_row(summaryview, GTK_CTREE_NODE(cur->data));
+       }
 
        summary_step(summaryview, GTK_SCROLL_STEP_FORWARD);
 
-       if (prefs_common.immediate_exec)
+       if (prefs_common.immediate_exec || item->stype == F_TRASH)
                summary_execute(summaryview);
        else
                summary_status_show(summaryview);
@@ -3245,7 +3250,6 @@ static void summary_execute_delete(SummaryView *summaryview)
        if (summaryview->folder_item->folder->type == F_MH) {
                g_return_if_fail(trash != NULL);
        }
-       if (summaryview->folder_item == trash) return;
 
        /* search deleting messages and execute */
        gtk_ctree_pre_recursive
@@ -3253,12 +3257,10 @@ static void summary_execute_delete(SummaryView *summaryview)
 
        if (!summaryview->mlist) return;
 
-       for(cur = summaryview->mlist ; cur != NULL ; cur = cur->next) {
-               MsgInfo * msginfo = cur->data;
-               MSG_UNSET_PERM_FLAGS(msginfo->flags, MSG_DELETED);
-       }
-
-       folder_item_move_msgs_with_dest(trash, summaryview->mlist);
+       if (summaryview->folder_item != trash)
+               folder_item_move_msgs_with_dest(trash, summaryview->mlist);
+       else
+               folder_item_remove_msgs(trash, summaryview->mlist);
 
        for (cur = summaryview->mlist; cur != NULL; cur = cur->next)
                procmsg_msginfo_free((MsgInfo *)cur->data);
@@ -3266,8 +3268,10 @@ static void summary_execute_delete(SummaryView *summaryview)
        g_slist_free(summaryview->mlist);
        summaryview->mlist = NULL;
 
-       folder_item_scan(trash);
-       folderview_update_item(trash, FALSE);
+       if (summaryview->folder_item != trash) {
+               folder_item_scan(trash);
+               folderview_update_item(trash, FALSE);
+       }
 }
 
 static void summary_execute_delete_func(GtkCTree *ctree, GtkCTreeNode *node,