more sync with sylpheed 0.5.0pre1
authorPaul Mangan <paul@claws-mail.org>
Tue, 19 Jun 2001 11:24:32 +0000 (11:24 +0000)
committerPaul Mangan <paul@claws-mail.org>
Tue, 19 Jun 2001 11:24:32 +0000 (11:24 +0000)
ChangeLog
ChangeLog.claws
ChangeLog.jp
po/ja.po
src/folderview.c
src/imap.c
src/mainwindow.c
src/news.c
src/summaryview.c
src/utils.c
src/utils.h

index ee9c07f..a60ec76 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,9 +1,43 @@
+2001-06-19
+
+       * src/imap.c: imap_cmd_login(), imap_cmd_select(), imap_cmd_status(),
+         imap_cmd_create(), imap_cmd_delete(), imap_cmd_copy(): don't
+         enclose with double quotation if string doesn't have space
+         (workaround for old Cyrus IMAP4 server).
+         imap_create_folder(): fixed a bug of separator substitution.
+         renamed imap_session_connect_if_not() to imap_session_get().
+         imap_get_msg_list(): delete all cached messages if use_cache
+         is off.
+         imap_delete_cached_messages(): remove cached files in between
+         the specified range by reading directory entry.
+         imap_parse_one_address(): set fromname same as the from address
+         if it is empty.
+       * src/utils.[ch]: remove_numbered_files(): new. The range is
+         specifiable.
+       * src/summaryview.c: summary_execute(): update summary if current
+         folder is IMAP4.
+         KEY_PRESS_EVENT_STOP(): new macro.
+         summary_key_pressed(): stop signal emission when calling
+         summary_execute().
+         summary_select_by_msgnum(): show message only if
+         msg_is_toggled_on is TRUE. Move current page to the selected
+         node.
+       * src/news.c; news_delete_old_articles(): remove cached files in
+         between the specified range by reading directory entry.
+       * src/folderview.c:
+         folderview_selected(), folderview_button_released(): fixed a bug
+         that didn't select folder correctly.
+
 2001-06-18
 
        * src/mainwindow.c
          src/summaryview.c
          src/prefs_common.c: improvements to the English (thanks to Paul
          Mangan).
+       * src/mainwindow.c: compose_cb()
+         src/summaryview.c: summary_key_pressed()
+         src/compose.c: compose_new_with_recipient(): newsgroups entry
+         is automatically filled when composing a new article.
 
 2001-06-17
 
index 3ca5e80..fa481f8 100644 (file)
@@ -1,3 +1,7 @@
+2001-06-19 [paul]
+
+        * more sync with sylpheed 0.5.0pre1
+
 2001-06-18 [alfons]
 
        * src/Makefile.am,
index aee57ae..5f3bf69 100644 (file)
@@ -1,8 +1,41 @@
+2001-06-19
+
+       * src/imap.c: imap_cmd_login(), imap_cmd_select(), imap_cmd_status(),
+         imap_cmd_create(), imap_cmd_delete(), imap_cmd_copy(): Ê¸»úÎó
+         ¤Ë¥¹¥Ú¡¼¥¹¤¬Æþ¤Ã¤Æ¤¤¤Ê¤±¤ì¤Ð¥À¥Ö¥ë¥¯¥©¡¼¥Æ¡¼¥·¥ç¥ó¤Ç°Ï¤Þ¤Ê¤¤
+         ¤è¤¦¤Ë¤·¤¿(¸Å¤¤ Cyrus IMAP4 server ¤Ø¤ÎÂнè)¡£
+         imap_create_folder(): ¥»¥Ñ¥ì¡¼¥¿ÃÖ´¹¤Î¥Ð¥°½¤Àµ¡£
+         imap_session_connect_if_not() ¤ò imap_session_get() ¤Ë̾¾ÎÊѹ¹¡£
+         imap_get_msg_list(): use_cache ¤¬ off ¤Î¤È¤­¤ÏÁ´¤Æ¤Î¥­¥ã¥Ã¥·¥åºÑ
+         ¥á¥Ã¥»¡¼¥¸¤òºï½ü¡£
+         imap_delete_cached_messages(): ¥Ç¥£¥ì¥¯¥È¥ê¥¨¥ó¥È¥ê¤òÆɤó¤Ç»ØÄê
+         ¤·¤¿ÈϰϤΥ­¥ã¥Ã¥·¥åºÑ¥Õ¥¡¥¤¥ë¤òºï½ü¤¹¤ë¤è¤¦¤Ë¤·¤¿¡£
+         imap_parse_one_address(): fromname ¤¬¶õ¤Î¾ì¹ç¤Ïº¹½Ð¿Í¥¢¥É¥ì¥¹¤È
+         Æ±¤¸¤Ë¤¹¤ë¤è¤¦¤Ë¤·¤¿¡£
+       * src/utils.[ch]: remove_numbered_files(): ¿·µ¬¡£ÈϰϤò»ØÄê²Äǽ¡£
+       * src/summaryview.c: summary_execute(): ¸½ºß¤Î¥Õ¥©¥ë¥À¤¬ IMAP4
+         ¤Î¾ì¹ç¥µ¥Þ¥ê¤ò¹¹¿·¤¹¤ë¤è¤¦¤Ë¤·¤¿¡£
+         KEY_PRESS_EVENT_STOP(): ¿·µ¬¥Þ¥¯¥í¡£
+         summary_key_pressed(): summary_execute() ¤ò¸Æ¤Ö¤È¤­¤Ë¥·¥°¥Ê¥ë¤Î
+         È¯¹Ô¤ò»ß¤á¤ë¤è¤¦¤Ë¤·¤¿¡£
+         summary_select_by_msgnum(): msg_is_toggled_on ¤¬ TRUE ¤Î¤È¤­¤À¤±
+         ¥á¥Ã¥»¡¼¥¸¤òɽ¼¨¤¹¤ë¤è¤¦¤Ë¤·¤¿¡£¸½ºß¤Î¥Ú¡¼¥¸¤òÁªÂò¤µ¤ì¤¿¥Î¡¼¥É
+         ¤Î¤È¤³¤í¤Ø°ÜÆ°¤¹¤ë¤è¤¦¤Ë¤·¤¿¡£
+       * src/news.c; news_delete_old_articles(): ¥Ç¥£¥ì¥¯¥È¥ê¥¨¥ó¥È¥ê¤ò
+         Æɤó¤Ç»ØÄꤷ¤¿ÈϰϤΥ­¥ã¥Ã¥·¥åºÑ¥Õ¥¡¥¤¥ë¤òºï½ü¤¹¤ë¤è¤¦¤Ë¤·¤¿¡£
+       * src/folderview.c:
+         folderview_selected(), folderview_button_released(): ¥Õ¥©¥ë¥À¤ò
+         Àµ¤·¤¯ÁªÂò¤·¤Ê¤«¤Ã¤¿¥Ð¥°¤ò½¤Àµ¡£
+
 2001-06-18
 
        * src/mainwindow.c
          src/summaryview.c
          src/prefs_common.c: ±Ñ¸ìɽ¸½¤Î²þÁ±(Paul Mangan ¤µ¤ó thanks)¡£
+       * src/mainwindow.c: compose_cb()
+         src/summaryview.c: summary_key_pressed()
+         src/compose.c: compose_new_with_recipient(): ¿·µ¬µ­»ö¤òºîÀ®¤¹¤ë
+         ¤È¤­¤Ë¥Ë¥å¡¼¥¹¥°¥ë¡¼¥×¤Î¥¨¥ó¥È¥ê¤ò¼«Æ°Åª¤ËËä¤á¤ë¤è¤¦¤Ë¤·¤¿¡£
 
 2001-06-17
 
index a202d01..a9c1650 100644 (file)
--- a/po/ja.po
+++ b/po/ja.po
@@ -5,7 +5,7 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: sylpheed\n"
-"POT-Creation-Date: 2001-06-18 01:42+0900\n"
+"POT-Creation-Date: 2001-06-19 00:29+0900\n"
 "PO-Revision-Date: 1999-10-12\n"
 "Last-Translator: Hiroyuki Yamamoto <hiro-y@kcn.ne.jp>\n"
 "Language-Team: Japanese <ja@li.org>\n"
@@ -88,13 +88,13 @@ msgstr ""
 "Place - Suite 330, Boston, MA 02111-1307, USA."
 
 #: src/about.c:233 src/addressbook.c:1293 src/alertpanel.c:232
-#: src/compose.c:1468 src/compose.c:3124 src/export.c:185 src/foldersel.c:176
+#: src/compose.c:1476 src/compose.c:3132 src/export.c:185 src/foldersel.c:176
 #: src/import.c:189 src/inputdialog.c:160 src/main.c:334 src/main.c:342
 #: src/mainwindow.c:1660 src/mimeview.c:716 src/passphrase.c:119
 #: src/prefs.c:467 src/prefs_common.c:1821 src/prefs_common.c:2065
 #: src/prefs_common.c:2181 src/prefs_customheader.c:162
 #: src/prefs_display_header.c:203 src/summaryview.c:2020
-#: src/summaryview.c:2531
+#: src/summaryview.c:2537
 msgid "OK"
 msgstr "OK"
 
@@ -128,7 +128,7 @@ msgid "Edit accounts"
 msgstr "¥¢¥«¥¦¥ó¥È¤ÎÊÔ½¸"
 
 #: src/account.c:394 src/addressbook.c:318 src/addressbook.c:1289
-#: src/compose.c:2236 src/mimeview.c:139 src/select-keys.c:301
+#: src/compose.c:2244 src/mimeview.c:139 src/select-keys.c:301
 msgid "Name"
 msgstr "̾Á°"
 
@@ -180,7 +180,7 @@ msgid "Do you really want to delete this account?"
 msgstr "ËÜÅö¤Ë¤³¤Î¥¢¥«¥¦¥ó¥È¤òºï½ü¤·¤Æ¤â¤¤¤¤¤Ç¤¹¤«?"
 
 #: src/account.c:515 src/addressbook.c:579 src/addressbook.c:1224
-#: src/compose.c:3298 src/folderview.c:1447 src/folderview.c:1490
+#: src/compose.c:3306 src/folderview.c:1447 src/folderview.c:1490
 #: src/folderview.c:1589 src/folderview.c:1630 src/folderview.c:1729
 #: src/folderview.c:1762 src/mainwindow.c:950 src/prefs_customheader.c:543
 #: src/prefs_filter.c:721 src/summary_search.c:297 src/summaryview.c:575
@@ -188,7 +188,7 @@ msgstr "
 msgid "Yes"
 msgstr "¤Ï¤¤"
 
-#: src/account.c:515 src/compose.c:3298 src/folderview.c:1447
+#: src/account.c:515 src/compose.c:3306 src/folderview.c:1447
 #: src/folderview.c:1490 src/folderview.c:1589 src/folderview.c:1630
 #: src/folderview.c:1729 src/folderview.c:1762
 msgid "+No"
@@ -272,7 +272,7 @@ msgstr "
 msgid "Remarks"
 msgstr "È÷¹Í"
 
-#: src/addressbook.c:325 src/compose.c:2796
+#: src/addressbook.c:325 src/compose.c:2804
 msgid "Address book"
 msgstr "¥¢¥É¥ì¥¹Ä¢"
 
@@ -378,18 +378,18 @@ msgstr "
 msgid "Edit address"
 msgstr "¥¢¥É¥ì¥¹¤ÎÊÔ½¸"
 
-#: src/addressbook.c:1290 src/compose.c:2795 src/select-keys.c:302
+#: src/addressbook.c:1290 src/compose.c:2803 src/select-keys.c:302
 msgid "Address"
 msgstr "¥¢¥É¥ì¥¹"
 
-#: src/addressbook.c:1294 src/compose.c:1468 src/compose.c:3125
-#: src/compose.c:3695 src/export.c:186 src/foldersel.c:177 src/import.c:190
+#: src/addressbook.c:1294 src/compose.c:1476 src/compose.c:3133
+#: src/compose.c:3703 src/export.c:186 src/foldersel.c:177 src/import.c:190
 #: src/inputdialog.c:161 src/main.c:334 src/main.c:342 src/mainwindow.c:1660
 #: src/mimeview.c:716 src/passphrase.c:123 src/prefs.c:468
 #: src/prefs_common.c:2182 src/prefs_customheader.c:163
 #: src/prefs_display_header.c:204 src/progressdialog.c:75
 #: src/select-keys.c:326 src/summaryview.c:575 src/summaryview.c:2020
-#: src/summaryview.c:2531
+#: src/summaryview.c:2537
 msgid "Cancel"
 msgstr "¥­¥ã¥ó¥»¥ë"
 
@@ -419,7 +419,7 @@ msgstr "
 msgid "failed to write addressbook data.\n"
 msgstr "¥¢¥É¥ì¥¹Ä¢¤Î¥Ç¡¼¥¿¤Î½ñ¤­¹þ¤ß¤Ë¼ºÇÔ¤·¤Þ¤·¤¿¡£\n"
 
-#: src/alertpanel.c:119 src/compose.c:3298 src/main.c:332
+#: src/alertpanel.c:119 src/compose.c:3306 src/main.c:332
 msgid "Notice"
 msgstr "Ãí°Õ"
 
@@ -570,16 +570,16 @@ msgstr "/
 msgid "/_Tool/_Address book"
 msgstr "/¥Ä¡¼¥ë(_T)/¥¢¥É¥ì¥¹Ä¢(_A)"
 
-#: src/compose.c:489 src/compose.c:559 src/compose.c:619 src/procmsg.c:687
+#: src/compose.c:494 src/compose.c:564 src/compose.c:624 src/procmsg.c:687
 msgid "Can't get text part\n"
 msgstr "¥Æ¥­¥¹¥È¥Ñ¡¼¥È¤ò¼èÆÀ¤Ç¤­¤Þ¤»¤ó\n"
 
-#: src/compose.c:551
+#: src/compose.c:556
 #, c-format
 msgid "%s: file not exist\n"
 msgstr "%s: ¥Õ¥¡¥¤¥ë¤¬Â¸ºß¤·¤Þ¤»¤ó\n"
 
-#: src/compose.c:563
+#: src/compose.c:568
 msgid ""
 "\n"
 "\n"
@@ -591,49 +591,49 @@ msgstr ""
 "Begin forwarded message:\n"
 "\n"
 
-#: src/compose.c:1232
+#: src/compose.c:1240
 #, c-format
 msgid "File %s doesn't exist\n"
 msgstr "¥Õ¥¡¥¤¥ë %s ¤Ï¸ºß¤·¤Þ¤»¤ó\n"
 
-#: src/compose.c:1236
+#: src/compose.c:1244
 #, c-format
 msgid "Can't get file size of %s\n"
 msgstr "¥Õ¥¡¥¤¥ë %s ¤Î¥µ¥¤¥º¤ò¼èÆÀ¤Ç¤­¤Þ¤»¤ó\n"
 
-#: src/compose.c:1240
+#: src/compose.c:1248
 #, c-format
 msgid "File %s is empty\n"
 msgstr "¥Õ¥¡¥¤¥ë %s ¤Ï¶õ¤Ç¤¹\n"
 
-#: src/compose.c:1261
+#: src/compose.c:1269
 #, c-format
 msgid "Message: %s"
 msgstr "¥á¥Ã¥»¡¼¥¸: %s"
 
-#: src/compose.c:1367
+#: src/compose.c:1375
 msgid " [Edited]"
 msgstr " [¹¹¿·]"
 
-#: src/compose.c:1369
+#: src/compose.c:1377
 #, c-format
 msgid "%s - Compose message%s"
 msgstr "%s - ¥á¥Ã¥»¡¼¥¸¤ÎºîÀ®%s"
 
-#: src/compose.c:1372
+#: src/compose.c:1380
 #, c-format
 msgid "Compose message%s"
 msgstr "¥á¥Ã¥»¡¼¥¸¤ÎºîÀ®%s"
 
-#: src/compose.c:1394 src/compose.c:3588
+#: src/compose.c:1402 src/compose.c:3596
 msgid "Recipient is not specified."
 msgstr "°¸À褬»ØÄꤵ¤ì¤Æ¤¤¤Þ¤»¤ó¡£"
 
-#: src/compose.c:1412
+#: src/compose.c:1420
 msgid "can't get recipient list."
 msgstr "Á÷¿®Àè¤Î¥ê¥¹¥È¤ò¼èÆÀ¤Ç¤­¤Þ¤»¤ó¡£"
 
-#: src/compose.c:1430
+#: src/compose.c:1438
 msgid ""
 "Account for sending mail is not specified.\n"
 "Please select a mail account before sending."
@@ -641,16 +641,16 @@ msgstr ""
 "¥á¡¼¥ë¤òÁ÷¿®¤¹¤ë¤¿¤á¤Î¥¢¥«¥¦¥ó¥È¤¬»ØÄꤵ¤ì¤Æ¤¤¤Þ¤»¤ó¡£\n"
 "Á÷¿®¤¹¤ëÁ°¤Ë¥á¡¼¥ë¥¢¥«¥¦¥ó¥È¤òÁªÂò¤·¤Æ¤¯¤À¤µ¤¤¡£"
 
-#: src/compose.c:1451
+#: src/compose.c:1459
 #, c-format
 msgid "Error occurred while posting the message to %s ."
 msgstr "¥á¥Ã¥»¡¼¥¸¤ò %s ¤Ë¥Ý¥¹¥È¤¹¤ëÅÓÃæ¤Ë¥¨¥é¡¼¤¬È¯À¸¤·¤Þ¤·¤¿¡£"
 
-#: src/compose.c:1465
+#: src/compose.c:1473
 msgid "Queueing"
 msgstr "Á÷¿®ÂÔµ¡"
 
-#: src/compose.c:1466
+#: src/compose.c:1474
 msgid ""
 "Error occurred while sending the message.\n"
 "Put this message into queue folder?"
@@ -658,172 +658,172 @@ msgstr ""
 "¥á¥Ã¥»¡¼¥¸¤ÎÁ÷¿®Ãæ¤Ë¥¨¥é¡¼¤¬È¯À¸¤·¤Þ¤·¤¿¡£\n"
 "¤³¤Î¥á¥Ã¥»¡¼¥¸¤òÁ÷¿®ÂÔ¤Á¥Õ¥©¥ë¥À¤ËÆþ¤ì¤Þ¤¹¤«?"
 
-#: src/compose.c:1472 src/compose.c:3600
+#: src/compose.c:1480 src/compose.c:3608
 msgid "Can't queue the message."
 msgstr "¥á¥Ã¥»¡¼¥¸¤òÁ÷¿®ÂÔµ¡¤Ç¤­¤Þ¤»¤ó¡£"
 
-#: src/compose.c:1475
+#: src/compose.c:1483
 msgid "Error occurred while sending the message."
 msgstr "¥á¥Ã¥»¡¼¥¸¤ÎÁ÷¿®Ãæ¤Ë¥¨¥é¡¼¤¬È¯À¸¤·¤Þ¤·¤¿¡£"
 
-#: src/compose.c:1482 src/compose.c:3607
+#: src/compose.c:1490 src/compose.c:3615
 msgid "Can't save the message to outbox."
 msgstr "¥á¥Ã¥»¡¼¥¸¤òÁ÷¿®¹µ¤ËÊݸ¤Ç¤­¤Þ¤»¤ó¡£"
 
-#: src/compose.c:1508 src/compose.c:1629 src/compose.c:1715 src/utils.c:1533
+#: src/compose.c:1516 src/compose.c:1637 src/compose.c:1723 src/utils.c:1533
 msgid "can't change file mode\n"
 msgstr "¥Õ¥¡¥¤¥ë¥â¡¼¥É¤òÊѹ¹¤Ç¤­¤Þ¤»¤ó\n"
 
-#: src/compose.c:1534
+#: src/compose.c:1542
 msgid "Can't convert the codeset of the message."
 msgstr "¥á¥Ã¥»¡¼¥¸¤Îʸ»ú¥³¡¼¥É¥»¥Ã¥È¤òÊÑ´¹¤Ç¤­¤Þ¤»¤ó¡£"
 
-#: src/compose.c:1543
+#: src/compose.c:1551
 msgid "can't write headers\n"
 msgstr "¥Ø¥Ã¥À¤ò½ñ¤­¹þ¤á¤Þ¤»¤ó¡£\n"
 
-#: src/compose.c:1661
+#: src/compose.c:1669
 msgid "saving sent message...\n"
 msgstr "Á÷¿®¤·¤¿¥á¥Ã¥»¡¼¥¸¤òÊݸ¤·¤Æ¤¤¤Þ¤¹...\n"
 
-#: src/compose.c:1666
+#: src/compose.c:1674
 msgid "can't save message\n"
 msgstr "¥á¥Ã¥»¡¼¥¸¤òÊݸ¤Ç¤­¤Þ¤»¤ó\n"
 
-#: src/compose.c:1672 src/compose.c:1779
+#: src/compose.c:1680 src/compose.c:1787
 msgid "can't open mark file\n"
 msgstr "¥Þ¡¼¥¯¥Õ¥¡¥¤¥ë¤ò³«¤±¤Þ¤»¤ó\n"
 
-#: src/compose.c:1695
+#: src/compose.c:1703
 msgid "queueing message...\n"
 msgstr "¥á¥Ã¥»¡¼¥¸¤òÁ÷¿®ÂÔ¤Á¤ËÆþ¤ì¤Æ¤¤¤Þ¤¹...\n"
 
-#: src/compose.c:1770
+#: src/compose.c:1778
 msgid "can't queue the message\n"
 msgstr "¥á¥Ã¥»¡¼¥¸¤òÁ÷¿®ÂÔµ¡¤Ç¤­¤Þ¤»¤ó\n"
 
-#: src/compose.c:1808
+#: src/compose.c:1816
 #, c-format
 msgid "Can't open file %s\n"
 msgstr "¥Õ¥¡¥¤¥ë %s ¤ò³«¤±¤Þ¤»¤ó\n"
 
-#: src/compose.c:2162
+#: src/compose.c:2170
 #, c-format
 msgid "generated Message-ID: %s\n"
 msgstr "À¸À®¤µ¤ì¤¿¥á¥Ã¥»¡¼¥¸ID: %s\n"
 
-#: src/compose.c:2236 src/compose.c:3096
+#: src/compose.c:2244 src/compose.c:3104
 msgid "MIME type"
 msgstr "MIME ¥¿¥¤¥×"
 
-#: src/compose.c:2236 src/mimeview.c:139 src/prefs_common.c:2176
+#: src/compose.c:2244 src/mimeview.c:139 src/prefs_common.c:2176
 #: src/select-keys.c:299 src/summaryview.c:362
 msgid "Size"
 msgstr "¥µ¥¤¥º"
 
-#: src/compose.c:2253
+#: src/compose.c:2261
 msgid "Creating compose window...\n"
 msgstr "¥á¥Ã¥»¡¼¥¸ºîÀ®¥¦¥£¥ó¥É¥¦¤òºîÀ®Ãæ...\n"
 
-#: src/compose.c:2299 src/headerview.c:54 src/summary_search.c:145
+#: src/compose.c:2307 src/headerview.c:54 src/summary_search.c:145
 msgid "From:"
 msgstr "º¹½Ð¿Í:"
 
-#: src/compose.c:2722 src/mainwindow.c:1359 src/prefs_account.c:501
+#: src/compose.c:2730 src/mainwindow.c:1359 src/prefs_account.c:501
 #: src/prefs_common.c:636
 msgid "Send"
 msgstr "Á÷¿®"
 
-#: src/compose.c:2723
+#: src/compose.c:2731
 msgid "Send message"
 msgstr "¥á¥Ã¥»¡¼¥¸¤òÁ÷¿®"
 
-#: src/compose.c:2730
+#: src/compose.c:2738
 msgid "Send later"
 msgstr "¸å¤ÇÁ÷¿®"
 
-#: src/compose.c:2731
+#: src/compose.c:2739
 msgid "Put into queue folder and send later"
 msgstr "Á÷¿®ÂÔ¤Á¥Õ¥©¥ë¥À¤ËÆþ¤ì¤Æ¸å¤ÇÁ÷¿®"
 
-#: src/compose.c:2738 src/folderview.c:738
+#: src/compose.c:2746 src/folderview.c:738
 msgid "Draft"
 msgstr "Áð¹Æ"
 
-#: src/compose.c:2739
+#: src/compose.c:2747
 msgid "Save to draft folder"
 msgstr "Áð¹Æ¥Õ¥©¥ë¥À¤ËÊݸ"
 
-#: src/compose.c:2748
+#: src/compose.c:2756
 msgid "Insert"
 msgstr "ÁÞÆþ"
 
-#: src/compose.c:2749
+#: src/compose.c:2757
 msgid "Insert file"
 msgstr "¥Õ¥¡¥¤¥ë¤òÁÞÆþ"
 
-#: src/compose.c:2756
+#: src/compose.c:2764
 msgid "Attach"
 msgstr "źÉÕ"
 
-#: src/compose.c:2757
+#: src/compose.c:2765
 msgid "Attach file"
 msgstr "¥Õ¥¡¥¤¥ë¤òźÉÕ"
 
-#: src/compose.c:2766 src/prefs_common.c:1035
+#: src/compose.c:2774 src/prefs_common.c:1035
 msgid "Signature"
 msgstr "½ð̾"
 
-#: src/compose.c:2767
+#: src/compose.c:2775
 msgid "Insert signature"
 msgstr "½ð̾¤òÁÞÆþ"
 
-#: src/compose.c:2775
+#: src/compose.c:2783
 msgid "Editor"
 msgstr "¥¨¥Ç¥£¥¿"
 
-#: src/compose.c:2776
+#: src/compose.c:2784
 msgid "Edit with external editor"
 msgstr "³°Éô¥¨¥Ç¥£¥¿¤ÇÊÔ½¸"
 
-#: src/compose.c:2784
+#: src/compose.c:2792
 msgid "Linewrap"
 msgstr "¼«Æ°²þ¹Ô"
 
-#: src/compose.c:2785
+#: src/compose.c:2793
 msgid "Wrap long lines"
 msgstr "Ť¤¹Ô¤òÀÞ¤êÊÖ¤¹"
 
-#: src/compose.c:2992
+#: src/compose.c:3000
 msgid "Invalid MIME type."
 msgstr "̵¸ú¤Ê MIME ¥¿¥¤¥×¤Ç¤¹¡£"
 
-#: src/compose.c:3010
+#: src/compose.c:3018
 msgid "File doesn't exist or is empty."
 msgstr "¥Õ¥¡¥¤¥ë¤¬Â¸ºß¤·¤Ê¤¤¤«¤Þ¤¿¤Ï¶õ¤Ç¤¹¡£"
 
-#: src/compose.c:3078
+#: src/compose.c:3086
 msgid "Property"
 msgstr "¥×¥í¥Ñ¥Æ¥£"
 
-#: src/compose.c:3098
+#: src/compose.c:3106
 msgid "Encoding"
 msgstr "¥¨¥ó¥³¡¼¥Ç¥£¥ó¥°"
 
-#: src/compose.c:3121
+#: src/compose.c:3129
 msgid "Path"
 msgstr "¥Ñ¥¹"
 
-#: src/compose.c:3122
+#: src/compose.c:3130
 msgid "File name"
 msgstr "¥Õ¥¡¥¤¥ë̾"
 
-#: src/compose.c:3269
+#: src/compose.c:3277
 #, c-format
 msgid "External editor command line is invalid: `%s'\n"
 msgstr "³°Éô¥¨¥Ç¥£¥¿¤Î¥³¥Þ¥ó¥É¥é¥¤¥ó¤¬Ìµ¸ú¤Ç¤¹: `%s'\n"
 
-#: src/compose.c:3295
+#: src/compose.c:3303
 #, c-format
 msgid ""
 "The external editor is still working.\n"
@@ -834,54 +834,54 @@ msgstr ""
 "¥×¥í¥»¥¹¤ò¶¯À©½ªÎ»¤·¤Þ¤¹¤«?\n"
 "¥×¥í¥»¥¹¥°¥ë¡¼¥×ID: %d"
 
-#: src/compose.c:3308
+#: src/compose.c:3316
 #, c-format
 msgid "Terminated process group id: %d"
 msgstr "½ªÎ»¤·¤¿¥×¥í¥»¥¹¥°¥ë¡¼¥×ID: %d"
 
-#: src/compose.c:3309
+#: src/compose.c:3317
 #, c-format
 msgid "Temporary file: %s"
 msgstr "°ì»þ¥Õ¥¡¥¤¥ë: %s"
 
-#: src/compose.c:3333
+#: src/compose.c:3341
 msgid "Compose: input from monitoring process\n"
 msgstr "Compose: ´Æ»ë¥×¥í¥»¥¹¤«¤é¤ÎÆþÎÏ\n"
 
 #. failed
-#: src/compose.c:3366
+#: src/compose.c:3374
 msgid "Couldn't exec external editor\n"
 msgstr "³°Éô¥¨¥Ç¥£¥¿¤ò¼Â¹Ô¤Ç¤­¤Þ¤»¤ó\n"
 
-#: src/compose.c:3370
+#: src/compose.c:3378
 msgid "Couldn't write to file\n"
 msgstr "¥Õ¥¡¥¤¥ë¤Ë½ñ¤­¹þ¤á¤Þ¤»¤ó\n"
 
-#: src/compose.c:3372
+#: src/compose.c:3380
 msgid "Pipe read failed\n"
 msgstr "¥Ñ¥¤¥×¤ÎÆɤ߹þ¤ß¤Ë¼ºÇÔ\n"
 
-#: src/compose.c:3629
+#: src/compose.c:3637
 msgid "can't remove the old draft message\n"
 msgstr "¸Å¤¤Áð¹Æ¥á¥Ã¥»¡¼¥¸¤òºï½ü¤Ç¤­¤Þ¤»¤ó\n"
 
-#: src/compose.c:3657 src/compose.c:3669
+#: src/compose.c:3665 src/compose.c:3677
 msgid "Select file"
 msgstr "¥Õ¥¡¥¤¥ë¤ÎÁªÂò"
 
-#: src/compose.c:3693
+#: src/compose.c:3701
 msgid "Discard message"
 msgstr "¥á¥Ã¥»¡¼¥¸¤ÎÇË´þ"
 
-#: src/compose.c:3694
+#: src/compose.c:3702
 msgid "This message has been modified. discard it?"
 msgstr "¤³¤Î¥á¥Ã¥»¡¼¥¸¤ÏÊѹ¹¤µ¤ì¤Æ¤¤¤Þ¤¹¡£ÇË´þ¤·¤Þ¤¹¤«?"
 
-#: src/compose.c:3695
+#: src/compose.c:3703
 msgid "Discard"
 msgstr "ÇË´þ"
 
-#: src/compose.c:3695
+#: src/compose.c:3703
 msgid "to Draft"
 msgstr "Áð¹Æ¤Ø"
 
@@ -974,12 +974,12 @@ msgstr "
 msgid "Setting folder info..."
 msgstr "¥Õ¥©¥ë¥À¾ðÊó¤òÀßÄêÃæ..."
 
-#: src/folderview.c:539 src/mainwindow.c:2084 src/setup.c:81
+#: src/folderview.c:539 src/mainwindow.c:2092 src/setup.c:81
 #, c-format
 msgid "Scanning folder %s%c%s ..."
 msgstr "¥Õ¥©¥ë¥À¤ò¥¹¥­¥ã¥óÃæ (%s%c%s) ..."
 
-#: src/folderview.c:544 src/mainwindow.c:2089 src/setup.c:86
+#: src/folderview.c:544 src/mainwindow.c:2097 src/setup.c:86
 #, c-format
 msgid "Scanning folder %s ..."
 msgstr "¥Õ¥©¥ë¥À¤ò¥¹¥­¥ã¥óÃæ (%s)..."
@@ -1272,26 +1272,26 @@ msgstr "namespace 
 msgid "can't select folder: %s\n"
 msgstr "¥Õ¥©¥ë¥À %s ¤òÁªÂò¤Ç¤­¤Þ¤»¤ó\n"
 
-#: src/imap.c:1320
+#: src/imap.c:1324
 msgid "IMAP4 login failed.\n"
 msgstr "IMAP4¤Î¥í¥°¥¤¥ó¤Ë¼ºÇÔ¤·¤Þ¤·¤¿¡£\n"
 
-#: src/imap.c:1490
+#: src/imap.c:1510
 #, c-format
 msgid "can't append %s to %s\n"
 msgstr "%s ¤ò %s ¤ËÄɲäǤ­¤Þ¤»¤ó\n"
 
-#: src/imap.c:1506
+#: src/imap.c:1530
 #, c-format
 msgid "can't copy %d to %s\n"
 msgstr "¥á¥Ã¥»¡¼¥¸ %d ¤ò %s ¤Ë¥³¥Ô¡¼¤Ç¤­¤Þ¤»¤ó\n"
 
-#: src/imap.c:1530
+#: src/imap.c:1554
 #, c-format
 msgid "error while imap command: STORE %d:%d %s\n"
 msgstr "imap ¥³¥Þ¥ó¥ÉÃæ¤Î¥¨¥é¡¼: STORE %d:%d %s\n"
 
-#: src/imap.c:1544
+#: src/imap.c:1568
 msgid "error while imap command: EXPUNGE\n"
 msgstr "imap ¥³¥Þ¥ó¥ÉÃæ¤Î¥¨¥é¡¼: EXPUNGE\n"
 
@@ -2078,11 +2078,11 @@ msgstr "
 msgid "Account setting"
 msgstr "¥¢¥«¥¦¥ó¥È¤ÎÀßÄê"
 
-#: src/mainwindow.c:1659 src/summaryview.c:2530
+#: src/mainwindow.c:1659 src/summaryview.c:2536
 msgid "Exit"
 msgstr "½ªÎ»"
 
-#: src/mainwindow.c:1659 src/summaryview.c:2530
+#: src/mainwindow.c:1659 src/summaryview.c:2536
 msgid "Exit this program?"
 msgstr "¤³¤Î¥×¥í¥°¥é¥à¤ò½ªÎ»¤·¤Þ¤¹¤«?"
 
@@ -2090,7 +2090,7 @@ msgstr "
 msgid "Sending queued message failed."
 msgstr "Á÷¿®ÂÔµ¡Ãæ¤Î¥á¥Ã¥»¡¼¥¸¤ÎÁ÷¿®¤Ë¼ºÇÔ¤·¤Þ¤·¤¿¡£"
 
-#: src/mainwindow.c:1916
+#: src/mainwindow.c:1924
 #, c-format
 msgid "forced charset: %s\n"
 msgstr "¶¯À©»ØÄꥭ¥ã¥é¥¯¥¿¥»¥Ã¥È: %s\n"
@@ -2581,11 +2581,11 @@ msgid "Remove messages on server when received"
 msgstr "¼õ¿®»þ¤Ë¥µ¡¼¥Ð¾å¤Î¥á¥Ã¥»¡¼¥¸¤òºï½ü¤¹¤ë"
 
 #: src/prefs_account.c:796
-msgid "Receive all messages on server"
+msgid "Download all messages on server"
 msgstr "¥µ¡¼¥Ð¾å¤ÎÁ´¤Æ¤Î¥á¥Ã¥»¡¼¥¸¤ò¼õ¿®¤¹¤ë"
 
 #: src/prefs_account.c:799
-msgid "`Receive all' checks for new mail on this account"
+msgid "`Get all' checks for new mail on this account"
 msgstr "¡ÖÁ´¼õ¿®¡×¤Ç¤³¤Î¥¢¥«¥¦¥ó¥È¤Î¿·Ãå¥á¡¼¥ë¤ò¥Á¥§¥Ã¥¯¤¹¤ë"
 
 #: src/prefs_account.c:801
index 2584a4c..e23ac4c 100644 (file)
@@ -1218,7 +1218,8 @@ static void folderview_button_released(GtkWidget *ctree, GdkEventButton *event,
 {
        if (!event) return;
 
-       if (event->button == 1 && folderview->opened != NULL) {
+       if (event->button == 1 && folderview->open_folder == FALSE &&
+           folderview->opened != NULL) {
                gtk_ctree_select(GTK_CTREE(ctree), folderview->opened);
                gtkut_ctree_set_focus_row(GTK_CTREE(ctree),
                                          folderview->opened);
@@ -1277,7 +1278,6 @@ static void folderview_selected(GtkCTree *ctree, GtkCTreeNode *row,
        }
 
        if (!folderview->open_folder) return;
-       folderview->open_folder = FALSE;
 
        item = gtk_ctree_node_get_row_data(ctree, row);
        if (!item) return;
@@ -1308,6 +1308,7 @@ static void folderview_selected(GtkCTree *ctree, GtkCTreeNode *row,
        } else
                folderview->opened = row;
 
+       folderview->open_folder = FALSE;
        can_select = TRUE;
 }
 
index f13391f..0c514f5 100644 (file)
@@ -47,7 +47,7 @@ static GList *session_list = NULL;
 
 static gint imap_cmd_count = 0;
 
-static IMAPSession *imap_session_connect_if_not        (Folder         *folder);
+static IMAPSession *imap_session_get   (Folder         *folder);
 
 static gint imap_do_copy               (Folder         *folder,
                                         FolderItem     *dest,
@@ -63,6 +63,7 @@ static GSList *imap_get_uncached_messages     (IMAPSession    *session,
                                                 gint            first,
                                                 gint            last);
 static GSList *imap_delete_cached_messages     (GSList         *mlist,
+                                                FolderItem     *item,
                                                 gint            first,
                                                 gint            last);
 static void imap_delete_all_cached_messages    (FolderItem     *item);
@@ -168,7 +169,7 @@ static gchar *search_array_contain_str              (GPtrArray      *array,
 static void imap_path_separator_subst          (gchar          *str,
                                                 gchar           separator);
 
-static IMAPSession *imap_session_connect_if_not(Folder *folder)
+static IMAPSession *imap_session_get(Folder *folder)
 {
        RemoteFolder *rfolder = REMOTE_FOLDER(folder);
 
@@ -273,7 +274,7 @@ GSList *imap_get_msg_list(Folder *folder, FolderItem *item, gboolean use_cache)
        g_return_val_if_fail(folder->type == F_IMAP, NULL);
        g_return_val_if_fail(folder->account != NULL, NULL);
 
-       session = imap_session_connect_if_not(folder);
+       session = imap_session_get(folder);
 
        if (!session) {
                mlist = procmsg_read_cache(item, FALSE);
@@ -322,16 +323,18 @@ GSList *imap_get_msg_list(Folder *folder, FolderItem *item, gboolean use_cache)
                }
 
                item->mtime = uid;
+       } else {
+               imap_delete_all_cached_messages(item);
        }
 
        if (begin > 0) {
-               GSList *newlist = NULL;
-
-               mlist = imap_delete_cached_messages(mlist, begin, G_MAXINT);
-               if (begin <= exists)
+               mlist = imap_delete_cached_messages(mlist, item, begin, -1);
+               if (begin <= exists) {
+                       GSList *newlist;
                        newlist = imap_get_uncached_messages
                                (session, item, begin, exists);
-               mlist = g_slist_concat(mlist, newlist);
+                       mlist = g_slist_concat(mlist, newlist);
+               }
        }
 
        item->last_num = exists;
@@ -350,8 +353,6 @@ gchar *imap_fetch_msg(Folder *folder, FolderItem *item, gint num)
        g_return_val_if_fail(folder != NULL, NULL);
        g_return_val_if_fail(item != NULL, NULL);
 
-       session = imap_session_connect_if_not(folder);
-
        path = folder_item_get_path(item);
        filename = g_strconcat(path, G_DIR_SEPARATOR_S, itos(num), NULL);
        g_free(path);
@@ -361,6 +362,7 @@ gchar *imap_fetch_msg(Folder *folder, FolderItem *item, gint num)
                return filename;
        }
 
+       session = imap_session_get(folder);
        if (!session) {
                g_free(filename);
                return NULL;
@@ -390,7 +392,7 @@ gint imap_add_msg(Folder *folder, FolderItem *dest, const gchar *file,
        g_return_val_if_fail(dest != NULL, -1);
        g_return_val_if_fail(file != NULL, -1);
 
-       session = imap_session_connect_if_not(folder);
+       session = imap_session_get(folder);
        if (!session)
                return -1;
 
@@ -426,7 +428,7 @@ static gint imap_do_copy(Folder *folder, FolderItem *dest, MsgInfo *msginfo,
        g_return_val_if_fail(dest != NULL, -1);
        g_return_val_if_fail(msginfo != NULL, -1);
 
-       session = imap_session_connect_if_not(folder);
+       session = imap_session_get(folder);
        if (!session) return -1;
 
        if (msginfo->folder == dest) {
@@ -475,7 +477,7 @@ static gint imap_do_copy_msgs_with_dest(Folder *folder, FolderItem *dest,
        g_return_val_if_fail(dest != NULL, -1);
        g_return_val_if_fail(msglist != NULL, -1);
 
-       session = imap_session_connect_if_not(folder);
+       session = imap_session_get(folder);
        if (!session) return -1;
 
        Xstrdup_a(destdir, dest->path, return -1);
@@ -551,7 +553,7 @@ gint imap_remove_msg(Folder *folder, FolderItem *item, gint num)
        g_return_val_if_fail(item != NULL, -1);
        g_return_val_if_fail(num > 0 && num <= item->last_num, -1);
 
-       session = imap_session_connect_if_not(folder);
+       session = imap_session_get(folder);
        if (!session) return -1;
 
        ok = imap_select(session, IMAP_FOLDER(folder), item->path,
@@ -588,7 +590,7 @@ gint imap_remove_all_msg(Folder *folder, FolderItem *item)
        g_return_val_if_fail(folder != NULL, -1);
        g_return_val_if_fail(item != NULL, -1);
 
-       session = imap_session_connect_if_not(folder);
+       session = imap_session_get(folder);
        if (!session) return -1;
 
        ok = imap_select(session, IMAP_FOLDER(folder), item->path,
@@ -632,7 +634,7 @@ gint imap_create_tree(Folder *folder)
        g_return_val_if_fail(folder->node != NULL, -1);
        g_return_val_if_fail(folder->node->data != NULL, -1);
 
-       imap_session_connect_if_not(folder);
+       imap_session_get(folder);
 
        item = FOLDER_ITEM(folder->node->data);
 
@@ -689,7 +691,7 @@ FolderItem *imap_create_folder(Folder *folder, FolderItem *parent,
        g_return_val_if_fail(parent != NULL, NULL);
        g_return_val_if_fail(name != NULL, NULL);
 
-       session = imap_session_connect_if_not(folder);
+       session = imap_session_get(folder);
        if (!session) return NULL;
 
        if (parent->path)
@@ -704,7 +706,7 @@ FolderItem *imap_create_folder(Folder *folder, FolderItem *parent,
        if (namespace && namespace->separator) {
                imap_path_separator_subst(imappath, namespace->separator);
                imap_path_separator_subst(new_name, namespace->separator);
-               strtailchomp(dirpath, namespace->separator);
+               strtailchomp(dirpath, '/');
                strtailchomp(new_name, namespace->separator);
        }
 
@@ -741,7 +743,7 @@ gint imap_remove_folder(Folder *folder, FolderItem *item)
        g_return_val_if_fail(item != NULL, -1);
        g_return_val_if_fail(item->path != NULL, -1);
 
-       session = imap_session_connect_if_not(folder);
+       session = imap_session_get(folder);
        if (!session) return -1;
 
        Xstrdup_a(path, item->path, return -1);
@@ -809,26 +811,29 @@ static GSList *imap_get_uncached_messages(IMAPSession *session,
        return newlist;
 }
 
-static GSList *imap_delete_cached_messages(GSList *mlist,
+static GSList *imap_delete_cached_messages(GSList *mlist, FolderItem *item,
                                           gint first, gint last)
 {
        GSList *cur, *next;
        MsgInfo *msginfo;
-       gchar *cache_file;
+       gchar *dir;
+
+       g_return_val_if_fail(item != NULL, mlist);
+       g_return_val_if_fail(item->folder != NULL, mlist);
+       g_return_val_if_fail(item->folder->type == F_IMAP, mlist);
+
+       debug_print(_("Deleting cached messages %d - %d ... "), first, last);
+
+       dir = folder_item_get_path(item);
+       remove_numbered_files(dir, first, last);
+       g_free(dir);
 
        for (cur = mlist; cur != NULL; ) {
                next = cur->next;
 
                msginfo = (MsgInfo *)cur->data;
                if (msginfo != NULL && first <= msginfo->msgnum &&
-                   msginfo->msgnum <= last) {
-                       debug_print(_("deleting message %d...\n"),
-                                   msginfo->msgnum);
-
-                       cache_file = procmsg_get_message_file_path(msginfo);
-                       if (is_file_exist(cache_file)) unlink(cache_file);
-                       g_free(cache_file);
-
+                   (last < 0 || msginfo->msgnum <= last)) {
                        procmsg_msginfo_free(msginfo);
                        mlist = g_slist_remove(mlist, msginfo);
                }
@@ -836,6 +841,8 @@ static GSList *imap_delete_cached_messages(GSList *mlist,
                cur = next;
        }
 
+       debug_print(_("done.\n"));
+
        return mlist;
 }
 
@@ -847,7 +854,7 @@ static void imap_delete_all_cached_messages(FolderItem *item)
        g_return_if_fail(item->folder != NULL);
        g_return_if_fail(item->folder->type == F_IMAP);
 
-       debug_print(_("\tDeleting all cached messages... "));
+       debug_print(_("Deleting all cached messages... "));
 
        dir = folder_item_get_path(item);
        remove_all_numbered_files(dir);
@@ -1018,28 +1025,29 @@ static gchar *imap_parse_one_address(SockInfo *sock, gchar *start,
                                     gchar *orig_buf)
 {
        gchar buf[IMAPBUFSIZE];
+       gchar *userid;
+       gchar *domain;
        gchar *cur_pos = start;
 
        cur_pos = imap_parse_atom(sock, cur_pos, buf, orig_buf);
-       conv_unmime_header(out_fromname_str, 256, buf, NULL);
-
-       if (out_fromname_str[0] != '\0') {
-               strcat(out_from_str, "\"");
-               strcat(out_from_str, out_fromname_str);
-               strcat(out_from_str, "\"");
-       }
+       conv_unmime_header(out_fromname_str, IMAPBUFSIZE, buf, NULL);
 
        cur_pos = imap_parse_atom(sock, cur_pos, buf, orig_buf);
 
-       strcat(out_from_str, " <");
-
        cur_pos = imap_parse_atom(sock, cur_pos, buf, orig_buf);
-       strcat(out_from_str, buf);
+       Xstrdup_a(userid, buf, return cur_pos + 1);
 
        cur_pos = imap_parse_atom(sock, cur_pos, buf, orig_buf);
-       strcat(out_from_str, "@");
-       strcat(out_from_str, buf);
-       strcat(out_from_str, ">");
+       Xstrdup_a(domain, buf, return cur_pos + 1);
+
+       if (out_fromname_str[0] != '\0') {
+               g_snprintf(out_from_str, IMAPBUFSIZE, "\"%s\" <%s@%s>",
+                          out_fromname_str, userid, domain);
+       } else {
+               g_snprintf(out_from_str, IMAPBUFSIZE, "%s@%s",
+                          userid, domain);
+               strcpy(out_fromname_str, out_from_str);
+       }
 
        while (*cur_pos == ' ') cur_pos++;
 
@@ -1314,7 +1322,11 @@ static gint imap_cmd_login(SockInfo *sock,
 {
        gint ok;
 
-       imap_cmd_gen_send(sock, "LOGIN \"%s\" %s", user, pass);
+       if (strchr(user, ' ') != NULL)
+               imap_cmd_gen_send(sock, "LOGIN \"%s\" %s", user, pass);
+       else
+               imap_cmd_gen_send(sock, "LOGIN %s %s", user, pass);
+
        ok = imap_cmd_ok(sock, NULL);
        if (ok != IMAP_SUCCESS)
                log_warning(_("IMAP4 login failed.\n"));
@@ -1372,7 +1384,11 @@ static gint imap_cmd_select(SockInfo *sock, const gchar *folder,
        *exists = *recent = *unseen = *uid = 0;
        argbuf = g_ptr_array_new();
 
-       imap_cmd_gen_send(sock, "SELECT \"%s\"", folder);
+       if (strchr(folder, ' ') != NULL)
+               imap_cmd_gen_send(sock, "SELECT \"%s\"", folder);
+       else
+               imap_cmd_gen_send(sock, "SELECT %s", folder);
+
        if ((ok = imap_cmd_ok(sock, argbuf)) != IMAP_SUCCESS)
                goto bail;
 
@@ -1418,19 +1434,31 @@ bail:
 static gint imap_cmd_status(SockInfo *sock, const gchar *folder,
                            const gchar *status)
 {
-       imap_cmd_gen_send(sock, "STATUS \"%s\" (%s)", folder, status);
+       if (strchr(folder, ' ') != NULL)
+               imap_cmd_gen_send(sock, "STATUS \"%s\" (%s)", folder, status);
+       else
+               imap_cmd_gen_send(sock, "STATUS %s (%s)", folder, status);
+
        return imap_cmd_ok(sock, NULL);
 }
 
 static gint imap_cmd_create(SockInfo *sock, const gchar *folder)
 {
-       imap_cmd_gen_send(sock, "CREATE \"%s\"", folder);
+       if (strchr(folder, ' ') != NULL)
+               imap_cmd_gen_send(sock, "CREATE \"%s\"", folder);
+       else
+               imap_cmd_gen_send(sock, "CREATE %s", folder);
+
        return imap_cmd_ok(sock, NULL);
 }
 
 static gint imap_cmd_delete(SockInfo *sock, const gchar *folder)
 {
-       imap_cmd_gen_send(sock, "DELETE \"%s\"", folder);
+       if (strchr(folder, ' ') != NULL)
+               imap_cmd_gen_send(sock, "DELETE \"%s\"", folder);
+       else
+               imap_cmd_gen_send(sock, "DELETE %s", folder);
+
        return imap_cmd_ok(sock, NULL);
 }
 
@@ -1500,7 +1528,11 @@ static gint imap_cmd_copy(SockInfo *sock, gint num, const gchar *destfolder)
 
        g_return_val_if_fail(destfolder != NULL, IMAP_ERROR);
 
-       imap_cmd_gen_send(sock, "COPY %d %s", num, destfolder);
+       if (strchr(destfolder, ' ') != NULL)
+               imap_cmd_gen_send(sock, "COPY %d \"%s\"", num, destfolder);
+       else
+               imap_cmd_gen_send(sock, "COPY %d %s", num, destfolder);
+
        ok = imap_cmd_ok(sock, NULL);
        if (ok != IMAP_SUCCESS) {
                log_warning(_("can't copy %d to %s\n"), num, destfolder);
@@ -1592,7 +1624,7 @@ static void imap_cmd_gen_send(SockInfo *sock, const gchar *format, ...)
 
        g_snprintf(buf, sizeof(buf), "%d %s\r\n", imap_cmd_count, tmp);
        if (!strncasecmp(tmp, "LOGIN ", 6) && (p = strchr(tmp + 6, ' '))) {
-               *(p + 1) = '\0';
+               *p = '\0';
                log_print("IMAP4> %d %s ********\n", imap_cmd_count, tmp);
        } else
                log_print("IMAP4> %d %s\n", imap_cmd_count, tmp);
index 527669a..ba5fc10 100644 (file)
@@ -2030,15 +2030,15 @@ static void compose_mail_cb(MainWindow *mainwin, guint action,
 static void compose_news_cb(MainWindow *mainwin, guint action,
                            GtkWidget *widget)
 {
-       PrefsAccount * ac;
+       PrefsAccount * ac = NULL;
        GList * list;
        GList * cur;
 
        if (mainwin->summaryview->folder_item) {
                ac = mainwin->summaryview->folder_item->folder->account;
                if (ac && ac->protocol == A_NNTP) {
-                       FolderItem * item = mainwin->summaryview->folder_item;
-                       compose_new_with_recipient(ac, item->path);
+                       compose_new_with_recipient
+                               (ac, mainwin->summaryview->folder_item->path);
                        return;
                }
        }
index 94a3b3f..31ee30a 100644 (file)
@@ -75,9 +75,10 @@ static GSList *news_get_uncached_articles(NNTPSession        *session,
 static MsgInfo *news_parse_xover        (const gchar   *xover_str);
 static gchar *news_parse_xhdr           (const gchar   *xhdr_str,
                                          MsgInfo       *msginfo);
-static GSList *news_delete_old_article  (GSList        *alist,
+static GSList *news_delete_old_articles         (GSList        *alist,
+                                         FolderItem    *item,
                                          gint           first);
-static void news_delete_all_article     (FolderItem    *item);
+static void news_delete_all_articles    (FolderItem    *item);
 
 
 static Session *news_session_new(const gchar *server, gushort port,
@@ -208,7 +209,7 @@ GSList *news_get_article_list(Folder *folder, FolderItem *item,
                cache_last = procmsg_get_last_num_in_cache(alist);
                newlist = news_get_uncached_articles
                        (session, item, cache_last, &first, &last);
-               alist = news_delete_old_article(alist, first);
+               alist = news_delete_old_articles(alist, item, first);
 
                alist = g_slist_concat(alist, newlist);
                item->last_num = last;
@@ -217,7 +218,7 @@ GSList *news_get_article_list(Folder *folder, FolderItem *item,
 
                alist = news_get_uncached_articles
                        (session, item, 0, NULL, &last);
-               news_delete_all_article(item);
+               news_delete_all_articles(item);
                item->last_num = last;
        }
 
@@ -601,26 +602,30 @@ static gchar *news_parse_xhdr(const gchar *xhdr_str, MsgInfo *msginfo)
                return g_strdup(p);
 }
 
-static GSList *news_delete_old_article(GSList *alist, gint first)
+static GSList *news_delete_old_articles(GSList *alist, FolderItem *item,
+                                       gint first)
 {
        GSList *cur, *next;
        MsgInfo *msginfo;
-       gchar *cache_file;
+       gchar *dir;
+
+       g_return_val_if_fail(item != NULL, alist);
+       g_return_val_if_fail(item->folder != NULL, alist);
+       g_return_val_if_fail(item->folder->type == F_NEWS, alist);
 
        if (first < 2) return alist;
 
+       debug_print(_("Deleting cached articles 1 - %d ... "), first - 1);
+
+       dir = folder_item_get_path(item);
+       remove_numbered_files(dir, 1, first - 1);
+       g_free(dir);
+
        for (cur = alist; cur != NULL; ) {
                next = cur->next;
 
                msginfo = (MsgInfo *)cur->data;
                if (msginfo && msginfo->msgnum < first) {
-                       debug_print(_("deleting article %d...\n"),
-                                   msginfo->msgnum);
-
-                       cache_file = procmsg_get_message_file_path(msginfo);
-                       if (is_file_exist(cache_file)) unlink(cache_file);
-                       g_free(cache_file);
-
                        procmsg_msginfo_free(msginfo);
                        alist = g_slist_remove(alist, msginfo);
                }
@@ -631,39 +636,20 @@ static GSList *news_delete_old_article(GSList *alist, gint first)
        return alist;
 }
 
-static void news_delete_all_article(FolderItem *item)
+static void news_delete_all_articles(FolderItem *item)
 {
-       DIR *dp;
-       struct dirent *d;
        gchar *dir;
-       gchar *file;
 
-       dir = folder_item_get_path(item);
-       if (!is_dir_exist(dir))
-               make_dir_hier(dir);
-
-       if ((dp = opendir(dir)) == NULL) {
-               FILE_OP_ERROR(dir, "opendir");
-               g_free(dir);
-               return;
-       }
+       g_return_if_fail(item != NULL);
+       g_return_if_fail(item->folder != NULL);
+       g_return_if_fail(item->folder->type == F_NEWS);
 
        debug_print(_("\tDeleting all cached articles... "));
 
-       while ((d = readdir(dp)) != NULL) {
-               if (to_number(d->d_name) < 0) continue;
-
-               file = g_strconcat(dir, G_DIR_SEPARATOR_S, d->d_name, NULL);
-
-               if (is_file_exist(file)) {
-                       if (unlink(file) < 0)
-                               FILE_OP_ERROR(file, "unlink");
-               }
-
-               g_free(file);
-       }
-
-       closedir(dp);
+       dir = folder_item_get_path(item);
+       if (!is_dir_exist(dir))
+               make_dir_hier(dir);
+       remove_all_numbered_files(dir);
        g_free(dir);
 
        debug_print(_("done.\n"));
index f5479dd..c266df1 100644 (file)
@@ -1067,11 +1067,16 @@ void summary_select_by_msgnum(SummaryView *summaryview, guint msgnum)
        node = summary_find_msg_by_msgnum(summaryview, msgnum);
 
        if (node) {
+               GTK_EVENTS_FLUSH();
+               gtk_ctree_node_moveto(ctree, node, -1, 0.5, 0);
+               gtk_widget_grab_focus(GTK_WIDGET(ctree));
                gtk_sctree_unselect_all(GTK_SCTREE(ctree));
                gtk_sctree_select(GTK_SCTREE(ctree), node);
-               if (summaryview->displayed == node)
-                       summaryview->displayed = NULL;
-               summary_display_msg(summaryview, node, FALSE);
+               if (summaryview->msg_is_toggled_on) {
+                       if (summaryview->displayed == node)
+                               summaryview->displayed = NULL;
+                       summary_display_msg(summaryview, node, FALSE);
+               }
        }
 }
 
@@ -1766,7 +1771,7 @@ static void summary_set_header(gchar *text[], MsgInfo *msginfo)
 
        text[S_COL_MARK]   = NULL;
        text[S_COL_UNREAD] = NULL;
-       text[S_COL_MIME] = NULL;
+       text[S_COL_MIME]   = NULL;
        text[S_COL_NUMBER] = itos_buf(col_number, msginfo->msgnum);
        text[S_COL_SIZE]   = to_human_readable(msginfo->size);
 #if 0
@@ -2578,6 +2583,9 @@ void summary_execute(SummaryView *summaryview)
        gtk_ctree_node_moveto(ctree, summaryview->selected, -1, 0.5, 0);
 
        gtk_clist_thaw(clist);
+
+       if (summaryview->folder_item->folder->type == F_IMAP)
+               summary_show(summaryview, summaryview->folder_item, FALSE);
 }
 
 static void summary_execute_move(SummaryView *summaryview)
@@ -2985,6 +2993,13 @@ void summary_pass_key_press_event(SummaryView *summaryview, GdkEventKey *event)
 #define BREAK_ON_MODIFIER_KEY() \
        if ((event->state & (GDK_MOD1_MASK|GDK_CONTROL_MASK)) != 0) break
 
+#define KEY_PRESS_EVENT_STOP() \
+       if (gtk_signal_n_emissions_by_name \
+               (GTK_OBJECT(ctree), "key_press_event") > 0) { \
+               gtk_signal_emit_stop_by_name(GTK_OBJECT(ctree), \
+                                            "key_press_event"); \
+       }
+
 static void summary_key_pressed(GtkWidget *widget, GdkEventKey *event,
                                SummaryView *summaryview)
 {
@@ -2998,12 +3013,7 @@ static void summary_key_pressed(GtkWidget *widget, GdkEventKey *event,
        case GDK_g:             /* Go */
        case GDK_G:
                BREAK_ON_MODIFIER_KEY();
-
-               if (gtk_signal_n_emissions_by_name
-                       (GTK_OBJECT(ctree), "key_press_event") > 0)
-                       gtk_signal_emit_stop_by_name(GTK_OBJECT(ctree),
-                                                    "key_press_event");
-
+               KEY_PRESS_EVENT_STOP();
                to_folder = foldersel_folder_sel(NULL);
                if (to_folder) {
                        debug_print(_("Go to %s\n"), to_folder->path);
@@ -3012,9 +3022,15 @@ static void summary_key_pressed(GtkWidget *widget, GdkEventKey *event,
                return;
        case GDK_w:             /* Write new message */
                BREAK_ON_MODIFIER_KEY();
-               if (summaryview->folder_item)
-                       compose_new(summaryview->folder_item->folder->account);
-               else
+               if (summaryview->folder_item) {
+                       PrefsAccount *ac;
+                       ac = summaryview->folder_item->folder->account;
+                       if (ac && ac->protocol == A_NNTP)
+                               compose_new_with_recipient
+                                       (ac, summaryview->folder_item->path);
+                       else
+                               compose_new(ac);
+               } else
                        compose_new(NULL);
                return;
        case GDK_D:             /* Empty trash */
@@ -3124,6 +3140,7 @@ static void summary_key_pressed(GtkWidget *widget, GdkEventKey *event,
        case GDK_x:             /* Execute */
        case GDK_X:
                BREAK_ON_MODIFIER_KEY();
+               KEY_PRESS_EVENT_STOP();
                summary_execute(summaryview);
                break;
        case GDK_a:             /* Reply to the message */
@@ -3152,6 +3169,9 @@ static void summary_key_pressed(GtkWidget *widget, GdkEventKey *event,
        }
 }
 
+#undef BREAK_ON_MODIFIER_KEY
+#undef KEY_PRESS_EVENT_STOP
+
 static void summary_open_row(GtkSCTree *sctree, SummaryView *summaryview)
 {
        if (summaryview->folder_item->stype == F_DRAFT)
index 7fe6c65..f5b7200 100644 (file)
@@ -1377,11 +1377,12 @@ gint remove_all_files(const gchar *dir)
        return 0;
 }
 
-gint remove_all_numbered_files(const gchar *dir)
+gint remove_numbered_files(const gchar *dir, gint first, gint last)
 {
        DIR *dp;
        struct dirent *d;
        gchar *prev_dir;
+       gint fileno;
 
        prev_dir = g_get_current_dir();
 
@@ -1396,10 +1397,12 @@ gint remove_all_numbered_files(const gchar *dir)
        }
 
        while ((d = readdir(dp)) != NULL) {
-               if (to_number(d->d_name) < 0) continue;
-
-               if (unlink(d->d_name) < 0)
-                       FILE_OP_ERROR(d->d_name, "unlink");
+               fileno = to_number(d->d_name);
+               if (fileno >= 0 && first <= fileno &&
+                   (last < 0 || fileno <= last)) {
+                       if (unlink(d->d_name) < 0)
+                               FILE_OP_ERROR(d->d_name, "unlink");
+               }
        }
 
        closedir(dp);
@@ -1415,6 +1418,11 @@ gint remove_all_numbered_files(const gchar *dir)
        return 0;
 }
 
+gint remove_all_numbered_files(const gchar *dir)
+{
+       return remove_numbered_files(dir, 0, -1);
+}
+
 gint remove_dir_recursive(const gchar *dir)
 {
        struct stat s;
index de6de58..91230cb 100644 (file)
@@ -261,6 +261,9 @@ gboolean is_dir_exist               (const gchar    *dir);
 gint change_dir                        (const gchar    *dir);
 gint make_dir_hier             (const gchar    *dir);
 gint remove_all_files          (const gchar    *dir);
+gint remove_numbered_files     (const gchar    *dir,
+                                gint            first,
+                                gint            last);
 gint remove_all_numbered_files (const gchar    *dir);
 gint remove_dir_recursive      (const gchar    *dir);
 gint copy_file                 (const gchar    *src,