2004-11-11 [paul] 0.9.12cvs145
authorPaul Mangan <paul@claws-mail.org>
Thu, 11 Nov 2004 12:05:48 +0000 (12:05 +0000)
committerPaul Mangan <paul@claws-mail.org>
Thu, 11 Nov 2004 12:05:48 +0000 (12:05 +0000)
* ChangeLog
* ChangeLog.jp
* src/account.c
* src/folderview.c
* src/folderview.h
* src/imap.c
* src/imap_gtk.c
* src/inc.c
* src/mainwindow.c
* src/mh_gtk.c
* src/news_gtk.c
* src/pop.c
* src/prefs_account.c
* src/prefs_account.h
* src/prefs_ext_prog.c
* src/procmsg.c
* src/procmsg.h
* src/summary_search.c
* src/summaryview.c
* src/textview.c
* src/common/defs.h
* src/common/utils.c
* src/common/utils.h
* src/gtk/menu.c
* src/gtk/menu.h
sync with main 1.0.0beta2 (plus 4)

28 files changed:
ChangeLog
ChangeLog.claws
ChangeLog.jp
PATCHSETS
configure.ac
src/account.c
src/common/defs.h
src/common/utils.c
src/common/utils.h
src/folderview.c
src/folderview.h
src/gtk/menu.c
src/gtk/menu.h
src/imap.c
src/imap_gtk.c
src/inc.c
src/mainwindow.c
src/mh_gtk.c
src/news_gtk.c
src/pop.c
src/prefs_account.c
src/prefs_account.h
src/prefs_ext_prog.c
src/procmsg.c
src/procmsg.h
src/summary_search.c
src/summaryview.c
src/textview.c

index 1c32e6c..b5f2bf9 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,171 @@
+2004-11-11
+
+       * src/statusbar.c: statusbar_create(): set the width of widget to 1
+         not to expand automatically.
+       * src/utils.[ch]: trim_string_before(): trim beginning characters
+         longer than the specified length and add "...".
+       * src/folderview.c
+         src/summaryview.c: use trim_string_before() to display folder name.
+
+2004-11-10
+
+       * src/defs.h
+         src/prefs_common.c: made mozilla-firefox as default browser.
+
+2004-11-09
+
+       * src/summaryview.c: summary_key_pressed()
+         src/textview.c: textview_key_pressed(): back scroll when Shift or
+         Alt and Space key is pressed. Also back scroll when Shift and Enter
+         key is pressed.
+
+2004-11-09
+
+       * src/foldersel.c: foldersel_new_folder(): select newly created
+         folder.
+
+2004-11-08
+
+       * version 1.0.0beta2
+
+2004-11-08
+
+       * src/account.c
+         src/imap.c
+         src/inc.c
+         src/pop.c
+         src/prefs_account.[ch]: obsoleted RecvProtocol::A_APOP and made an
+         option for APOP.
+         prefs_account_protocol_set_optmenu(): refactored.
+
+2004-11-07
+
+       * src/folderview.c: folderview_empty_trash_cb(): removed unused
+         variables.
+
+2004-11-05
+
+       * src/summary_search.c: use C string instead of wide character string.
+         Enabled AND/OR matching.
+
+2004-11-05
+
+       * src/folderview.[ch]
+         src/mainwindow.c: change menu sensitivity of File/Folder and
+         File/Mailbox according to selected folder.
+         Enabled newsgroups subscription from 'File/Folder/Create new folder'.
+
+2004-11-04
+
+       * src/folderview.[ch]
+         src/mainwindow.c: reorganized folder/mailbox menus.
+         Enabled 'Remove mailbox', 'Check for new messages' and
+         'Rebuild folder tree' on main menu.
+         Removed 'Remove mailbox' from the folder context menu.
+
+2004-11-04
+
+       * src/folderview.c
+         src/mainwindow.c
+         src/procmsg.[ch]: added 'Empty trash' to the folder context menu.
+
+2004-11-01
+
+       * src/filter.[ch]
+         src/summaryview.c: don't move/delete immediately when
+         immediate_execution is off.
+
+2004-10-29
+
+       * version 1.0.0beta1
+
+2004-10-29
+
+       * upgraded to gettext-0.14.1.
+
+2004-10-28
+
+       * src/compose.c: reorganized the menu.
+       * src/mh.c: removed g_print() for debug.
+
+2004-10-27
+
+       * src/compose.c
+         src/prefs_template.c
+         src/template.[ch]: added Cc: to template parameter.
+
+2004-10-26
+
+       * src/prefs_filter_edit.c: fixed condition menu switching problem
+         on editing existing rules.
+
+2004-10-25
+
+       * src/filter.c: filter_action_exec(): update counters of FolderItem
+         on local filtering (fixes wrong folderview message count).
+
+2004-10-25
+
+       * src/mbox.c: proc_mbox(): check if folder_table is NULL (fix
+         warnings).
+
+2004-10-21
+
+       * src/pixmaps/stock_add_16.xpm
+         src/pixmaps/stock_remove_16.xpm: converted from stock icons in
+         gtk-2.4.
+       * src/prefs_filter_edit.c: use icons for add/remove button.
+       * src/stock_pixmap.[ch]: added add/remove icons.
+
+2004-10-21
+
+       * src/pixmaps/stock_dialog_error_48.xpm
+         src/pixmaps/stock_dialog_info_48.xpm
+         src/pixmaps/stock_dialog_question_48.xpm
+         src/pixmaps/stock_dialog_warning_48.xpm: converted dialog icons from
+         stock icons in gtk-2.4.
+       * src/alertpanel.[ch]: added icons to the alert dialog.
+         alertpanel_message(): Added AlertType.
+       * src/stock_pixmaps.[ch]: added dialog icons.
+
+
+2004-10-08
+
+       * src/procmsg.c: removed verbose debug prints.
+
+2004-10-07
+
+       * version 0.9.99
+
+2004-10-07
+
+       * src/procmsg.c: procmsg_send_queue()
+         src/send_message.c: send_queue_info_free(): fixed segmentation fault
+         when trying to send an invalid queued message.
+
+2004-10-06
+
+       * src/mainwindow.c: added separators to the File menu.
+       * src/prefs_filter_edit.c: removed some debug prints.
+
+2004-10-05
+
+       * src/inputdialog.c: input_dialog_open(): don't start auto-checking
+         mail while opening the input dialog.
+
+2004-10-04
+
+       * src/mh.c: mh_remove_all_msg()
+         src/procmsg.c: procmsg_empty_trash(): fixed wrong message count
+         after emptying trash.
+
+2004-10-01
+
+       * src/prefs_filter.c: fixed a bug that didn't add an auto-created
+         rule.
+       * src/prefs_filter_edit.c: prefs_filter_edit_dialog_to_rule(): check
+         if rule name exists.
+
 2004-09-30
 
        * src/filter.c: filter_apply_msginfo(): don't apply filter if
index 74760d4..49f98a0 100644 (file)
@@ -1,3 +1,32 @@
+2004-11-11 [paul]      0.9.12cvs145
+
+       * ChangeLog
+       * ChangeLog.jp
+       * src/account.c
+       * src/folderview.c
+       * src/folderview.h
+       * src/imap.c
+       * src/imap_gtk.c
+       * src/inc.c
+       * src/mainwindow.c
+       * src/mh_gtk.c
+       * src/news_gtk.c
+       * src/pop.c
+       * src/prefs_account.c
+       * src/prefs_account.h
+       * src/prefs_ext_prog.c
+       * src/procmsg.c
+       * src/procmsg.h
+       * src/summary_search.c
+       * src/summaryview.c
+       * src/textview.c
+       * src/common/defs.h
+       * src/common/utils.c
+       * src/common/utils.h
+       * src/gtk/menu.c
+       * src/gtk/menu.h
+               sync with main 1.0.0beta2 (plus 4)
+
 2004-11-09 [christoph] 0.9.12cvs144
 
        * src/compose.c
index a1e1001..d3fb89f 100644 (file)
@@ -1,3 +1,173 @@
+2004-11-11
+
+       * src/statusbar.c: statusbar_create(): ¼«Æ°Åª¤Ë¿­Ä¹¤·¤Ê¤¤¤è¤¦¤Ë
+         ¥¦¥£¥¸¥§¥Ã¥È¤ÎÉý¤ò1¤Ë»ØÄê¡£
+       * src/utils.[ch]: trim_string_before(): »ØÄꤷ¤¿Ä¹¤µ¤òĶ¤¨¤ëÀèƬ¤Î
+         Ê¸»ú¤òÀÚ¤êµÍ¤á¡¢ "..." ¤òÄɲá£
+       * src/folderview.c
+         src/summaryview.c: trim_string_before() ¤ò»È¤Ã¤Æ¥Õ¥©¥ë¥À̾¤òɽ¼¨
+         ¤¹¤ë¤è¤¦¤Ë¤·¤¿¡£
+
+2004-11-10
+
+       * src/defs.h
+         src/prefs_common.c: mozilla-firefox ¤ò¥Ç¥Õ¥©¥ë¥È¤Î¥Ö¥é¥¦¥¶¤Ë¤·¤¿¡£
+
+2004-11-09
+
+       * src/summaryview.c: summary_key_pressed()
+         src/textview.c: textview_key_pressed(): Shift ¤Þ¤¿¤Ï Alt ¤È¥¹¥Ú¡¼¥¹
+         ¥­¡¼¤¬²¡¤µ¤ì¤¿¾ì¹ç¥Ð¥Ã¥¯¥¹¥¯¥í¡¼¥ë¤¹¤ë¤è¤¦¤Ë¤·¤¿¡£ Shift ¤È Enter
+         ¥­¡¼¤¬²¡¤µ¤ì¤¿¾ì¹ç¤â¥Ð¥Ã¥¯¥¹¥¯¥í¡¼¥ë¤¹¤ë¤è¤¦¤Ë¤·¤¿¡£
+
+2004-11-09
+
+       * src/foldersel.c: foldersel_new_folder(): ¿·µ¬¤ËºîÀ®¤µ¤ì¤¿¥Õ¥©¥ë¥À¤ò
+         ÁªÂò¤¹¤ë¤è¤¦¤Ë¤·¤¿¡£
+
+2004-11-08
+
+       * version 1.0.0beta2
+
+2004-11-08
+
+       * src/account.c
+         src/imap.c
+         src/inc.c
+         src/pop.c
+         src/prefs_account.[ch]: RecvProtocol::A_APOP ¤òÇѻߤ·¡¢ APOP ¤Î
+         ¥ª¥×¥·¥ç¥ó¤òÄɲá£
+         prefs_account_protocol_set_optmenu(): ¥ê¥Õ¥¡¥¯¥¿¥ê¥ó¥°¡£
+
+2004-11-07
+
+       * src/folderview.c: folderview_empty_trash_cb(): Ì¤»ÈÍѤÎÊÑ¿ô¤òºï½ü¡£
+
+2004-11-05
+
+       * src/summary_search.c: ¥ï¥¤¥É¥­¥ã¥é¥¯¥¿Ê¸»úÎó¤ÎÂå¤ï¤ê¤Ë C Ê¸»úÎó
+         ¤ò»ÈÍÑ¡£ AND/OR ¥Þ¥Ã¥Á¤¬¤Ç¤­¤ë¤è¤¦¤Ë¤·¤¿¡£
+
+2004-11-05
+
+       * src/folderview.[ch]
+         src/mainwindow.c: ÁªÂò¥Õ¥©¥ë¥À¤Ë±þ¤¸¤Æ¥Õ¥¡¥¤¥ë/¥Õ¥©¥ë¥À ¤È
+         ¥Õ¥¡¥¤¥ë/¥á¡¼¥ë¥Ü¥Ã¥¯¥¹ ¤Î¥á¥Ë¥å¡¼¤Î¥»¥ó¥·¥Æ¥£¥Ó¥Æ¥£¤òÊѹ¹¤¹¤ë
+         ¤è¤¦¤Ë¤·¤¿¡£
+         ¡Ö¥Õ¥¡¥¤¥ë/¥Õ¥©¥ë¥À/¿·µ¬¥Õ¥©¥ë¥À¤òºîÀ®¡×¤«¤é¥Ë¥å¡¼¥¹¥°¥ë¡¼¥×¤Î
+         ¹ØÆɤ¬¹Ô¤¨¤ë¤è¤¦¤Ë¤·¤¿¡£
+
+2004-11-04
+
+       * src/folderview.[ch]
+         src/mainwindow.c: ¥Õ¥©¥ë¥À/¥á¡¼¥ë¥Ü¥Ã¥¯¥¹¤Î¥á¥Ë¥å¡¼¤òºÆ¹½À®¡£
+         ¥á¥¤¥ó¥á¥Ë¥å¡¼¤Ç¡Ö¥á¡¼¥ë¥Ü¥Ã¥¯¥¹¤òºï½ü¡×¡¢¡Ö¿·Ãå¥á¥Ã¥»¡¼¥¸¤ò
+         ¥Á¥§¥Ã¥¯¡×¡¢¡Ö¥Õ¥©¥ë¥À¥Ä¥ê¡¼¤òºÆ¹½ÃۡפòÍ­¸ú¤Ë¤·¤¿¡£
+         ¥Õ¥©¥ë¥À¤Î¥³¥ó¥Æ¥­¥¹¥È¥á¥Ë¥å¡¼¤«¤é¡Ö¥á¡¼¥ë¥Ü¥Ã¥¯¥¹¤òºï½ü¡×¤ò
+         ºï½ü¡£
+
+2004-11-04
+
+       * src/folderview.c
+         src/mainwindow.c
+         src/procmsg.[ch]: ¥Õ¥©¥ë¥À¤Î¥³¥ó¥Æ¥­¥¹¥È¥á¥Ë¥å¡¼¤Ë¡Ö¤´¤ßÈ¢¤ò
+         ¶õ¤Ë¤¹¤ë¡×¤òÄɲá£
+
+2004-11-01
+
+       * src/filter.[ch]
+         src/summaryview.c: immediate_execution ¤¬ off ¤Î¾ì¹ç¤Ï¨ºÂ¤Ë°ÜÆ°
+         ¤Þ¤¿¤Ïºï½ü¤·¤Ê¤¤¤è¤¦¤Ë¤·¤¿¡£
+
+2004-10-29
+
+       * version 1.0.0beta1
+
+2004-10-29
+
+       * gettext-0.14.1 ¤Ë¹¹¿·¡£
+
+2004-10-28
+
+       * src/compose.c: ¥á¥Ë¥å¡¼¤òºÆ¹½À®¡£
+       * src/mh.c: ¥Ç¥Ð¥Ã¥°ÍѤΠg_print() ¤òºï½ü¡£
+
+2004-10-27
+
+       * src/compose.c
+         src/prefs_template.c
+         src/template.[ch]: ¥Æ¥ó¥×¥ì¡¼¥È¤Î¥Ñ¥é¥á¡¼¥¿¤Ë Cc: ¤òÄɲá£
+
+2004-10-26
+
+       * src/prefs_filter_edit.c: ´û¸¤Î¥ë¡¼¥ë¤ÎÊÔ½¸Ãæ¤Î¾ò·ï¥á¥Ë¥å¡¼ÀÚÂؤ¨
+         ¤ÎÌäÂê¤ò½¤Àµ¡£
+
+2004-10-25
+
+       * src/filter.c: filter_action_exec(): ¥í¡¼¥«¥ë¥Õ¥£¥ë¥¿¥ê¥ó¥°»þ
+         FolderItem ¤Î¥«¥¦¥ó¥¿¤ò¹¹¿·¤¹¤ë¤è¤¦¤Ë¤·¤¿(¥Õ¥©¥ë¥À¥Ó¥å¡¼¤Î
+         ¥á¥Ã¥»¡¼¥¸¥«¥¦¥ó¥È¤¬¤ª¤«¤·¤¯¤Ê¤ë¤Î¤ò½¤Àµ)¡£
+
+2004-10-25
+
+       * src/mbox.c: proc_mbox(): folder_table ¤¬ NULL ¤«¤É¤¦¤«¤ò¥Á¥§¥Ã¥¯
+         (·Ù¹ð¤ò½¤Àµ)¡£
+
+2004-10-21
+
+       * src/pixmaps/stock_add_16.xpm
+         src/pixmaps/stock_remove_16.xpm: gtk-2.4 ¤Î¥¹¥È¥Ã¥¯¥¢¥¤¥³¥ó¤«¤éÊÑ´¹¡£
+       * src/prefs_filter_edit.c: ÄɲÃ/ºï½ü¥Ü¥¿¥ó¤Ë¥¢¥¤¥³¥ó¤ò»ÈÍÑ¡£
+       * src/stock_pixmap.[ch]: ÄɲÃ/ºï½ü¤Î¥¢¥¤¥³¥ó¤òÄɲá£
+
+2004-10-21
+
+       * src/pixmaps/stock_dialog_error_48.xpm
+         src/pixmaps/stock_dialog_info_48.xpm
+         src/pixmaps/stock_dialog_question_48.xpm
+         src/pixmaps/stock_dialog_warning_48.xpm: gtk-2.4 ¤Î¥¹¥È¥Ã¥¯¥¢¥¤¥³¥ó
+         ¤«¤é¥À¥¤¥¢¥í¥°¥¢¥¤¥³¥ó¤òÊÑ´¹¡£
+       * src/alertpanel.[ch]: ·Ù¹ð¥À¥¤¥¢¥í¥°¤Ë¥¢¥¤¥³¥ó¤òÄɲá£
+         alertpanel_message(): AlertType ¤òÄɲá£
+       * src/stock_pixmaps.[ch]: ¥À¥¤¥¢¥í¥°¥¢¥¤¥³¥ó¤òÄɲá£
+
+2004-10-08
+
+       * src/procmsg.c: ¾éĹ¤Ê¥Ç¥Ð¥Ã¥°½ÐÎϤòºï½ü¡£
+
+2004-10-07
+
+       * version 0.9.99
+
+2004-10-07
+
+       * src/procmsg.c: procmsg_send_queue()
+         src/send_message.c: send_queue_info_free(): ÉÔÀµ¤Ê¥­¥å¡¼¥á¥Ã¥»¡¼¥¸
+         ¤òÁ÷¿®¤·¤è¤¦¤È¤·¤¿¤È¤­¤Ë segmentation fault ¤Ë¤Ê¤ë¥Ð¥°¤ò½¤Àµ¡£
+
+2004-10-06
+
+       * src/mainwindow.c: ¥Õ¥¡¥¤¥ë¥á¥Ë¥å¡¼¤Ë¥»¥Ñ¥ì¡¼¥¿¤òÄɲá£
+       * src/prefs_filter_edit.c: ¤¤¤¯¤Ä¤«¤Î¥Ç¥Ð¥Ã¥°½ÐÎϤòºï½ü¡£
+
+2004-10-05
+
+       * src/inputdialog.c: input_dialog_open(): ÆþÎÏ¥À¥¤¥¢¥í¥°¤¬³«¤¤¤Æ¤¤¤ë
+         ´Ö¤Ï¥á¡¼¥ë¤Î¼«Æ°¥Á¥§¥Ã¥¯¤ò³«»Ï¤·¤Ê¤¤¤è¤¦¤Ë¤·¤¿¡£
+
+2004-10-04
+
+       * src/mh.c: mh_remove_all_msg()
+         src/procmsg.c: procmsg_empty_trash(): ¤´¤ßÈ¢¤ò¶õ¤Ë¤·¤¿¸å¥á¥Ã¥»¡¼¥¸
+         ¿ô¤Î¥«¥¦¥ó¥È¤¬¤ª¤«¤·¤¯¤Ê¤ë¤Î¤ò½¤Àµ¡£
+
+2004-10-01
+
+       * src/prefs_filter.c: ¼«Æ°ºîÀ®¤µ¤ì¤¿¥ë¡¼¥ë¤òÄɲäǤ­¤Ê¤¤¥Ð¥°¤ò½¤Àµ¡£
+       * src/prefs_filter_edit.c: prefs_filter_edit_dialog_to_rule(): ¥ë¡¼¥ë
+         Ì¾¤¬Â¸ºß¤¹¤ë¤«¤É¤¦¤«¤ò¥Á¥§¥Ã¥¯¡£
+
 2004-09-30
 
        * src/filter.c: filter_apply_msginfo(): FilterRule::enabled == FALSE
index 1aec58b..e2949dd 100644 (file)
--- a/PATCHSETS
+++ b/PATCHSETS
 ( cvs diff -u -r 1.127 -r 1.128 src/textview.c; ) > 0.9.12cvs142.patchset
 ( cvs diff -u -r 1.449 -r 1.450 src/summaryview.c; ) > 0.9.12cvs143.patchset
 ( cvs diff -u -r 1.453 -r 1.454 src/compose.c; cvs diff -u -r 1.261 -r 1.262 src/folder.c; cvs diff -u -r 1.312 -r 1.313 src/mainwindow.c; cvs diff -u -r 1.116 -r 1.118 src/prefs_account.c; cvs diff -u -r 1.53 -r 1.54 src/prefs_account.h; cvs diff -u -r 1.8 -r 1.9 src/plugins/pgpmime/pgpmime.c; ) > 0.9.12cvs144.patchset
+( cvs diff -u -r 1.444 -r 1.445 ChangeLog; cvs diff -u -r 1.439 -r 1.440 ChangeLog.jp; cvs diff -u -r 1.75 -r 1.76 src/account.c; cvs diff -u -r 1.250 -r 1.251 src/folderview.c; cvs diff -u -r 1.26 -r 1.27 src/folderview.h; cvs diff -u -r 1.208 -r 1.209 src/imap.c; cvs diff -u -r 1.2 -r 1.3 src/imap_gtk.c; cvs diff -u -r 1.178 -r 1.179 src/inc.c; cvs diff -u -r 1.312 -r 1.313 src/mainwindow.c; cvs diff -u -r 1.4 -r 1.5 src/mh_gtk.c; cvs diff -u -r 1.2 -r 1.3 src/news_gtk.c; cvs diff -u -r 1.69 -r 1.70 src/pop.c; cvs diff -u -r 1.118 -r 1.119 src/prefs_account.c; cvs diff -u -r 1.54 -r 1.55 src/prefs_account.h; cvs diff -u -r 1.5 -r 1.6 src/prefs_ext_prog.c; cvs diff -u -r 1.169 -r 1.170 src/procmsg.c; cvs diff -u -r 1.71 -r 1.72 src/procmsg.h; cvs diff -u -r 1.18 -r 1.19 src/summary_search.c; cvs diff -u -r 1.450 -r 1.451 src/summaryview.c; cvs diff -u -r 1.128 -r 1.129 src/textview.c; cvs diff -u -r 1.16 -r 1.17 src/common/defs.h; cvs diff -u -r 1.57 -r 1.58 src/common/utils.c; cvs diff -u -r 1.33 -r 1.34 src/common/utils.h; cvs diff -u -r 1.10 -r 1.11 src/gtk/menu.c; cvs diff -u -r 1.8 -r 1.9 src/gtk/menu.h; ) > 0.9.12cvs145.patchset
index 133f770..cc80e9b 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=9
 MICRO_VERSION=12
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=144
+EXTRA_VERSION=145
 EXTRA_RELEASE=
 
 if test \( $EXTRA_VERSION -eq 0 \) -o \( "x$EXTRA_RELEASE" != "x" \); then
index eca51b5..40f9109 100644 (file)
@@ -1002,9 +1002,8 @@ static void account_selected(GtkCList *clist, gint row, gint column,
                PrefsAccount *ac;
 
                ac = gtk_clist_get_row_data(clist, row);
-               if (ac->protocol == A_POP3 || ac->protocol == A_APOP ||
-                   ac->protocol == A_IMAP4 || ac->protocol == A_NNTP ||
-                   ac->protocol == A_LOCAL) {
+               if (ac->protocol == A_POP3 || ac->protocol == A_IMAP4 ||
+                   ac->protocol == A_NNTP || ac->protocol == A_LOCAL) {
                        ac->recv_at_getall ^= TRUE;
                        account_clist_set_row(ac, row);
                }
@@ -1042,11 +1041,6 @@ static gint account_clist_set_row(PrefsAccount *ac_prefs, gint row)
                              "POP3 (SSL)" :
                              ac_prefs->ssl_pop == SSL_STARTTLS ?
                              "POP3 (TLS)" : "POP3") :
-                            ac_prefs->protocol == A_APOP ?
-                            (ac_prefs->ssl_pop == SSL_TUNNEL ?
-                             "POP3 (APOP, SSL)" :
-                             ac_prefs->ssl_pop == SSL_STARTTLS ?
-                             "POP3 (APOP, TLS)" : "POP3 (APOP)") :
                             ac_prefs->protocol == A_IMAP4 ?
                             (ac_prefs->ssl_imap == SSL_TUNNEL ?
                              "IMAP4 (SSL)" :
@@ -1058,7 +1052,6 @@ static gint account_clist_set_row(PrefsAccount *ac_prefs, gint row)
                             "";
 #else
        text[COL_PROTOCOL] = ac_prefs->protocol == A_POP3  ? "POP3" :
-                            ac_prefs->protocol == A_APOP  ? "POP3 (APOP)" :
                             ac_prefs->protocol == A_IMAP4 ? "IMAP4" :
                             ac_prefs->protocol == A_LOCAL ? "Local" :
                             ac_prefs->protocol == A_NNTP  ? "NNTP" : "";
@@ -1077,7 +1070,6 @@ static gint account_clist_set_row(PrefsAccount *ac_prefs, gint row)
        }
 
        has_getallbox = (ac_prefs->protocol == A_POP3  ||
-                        ac_prefs->protocol == A_APOP  ||
                         ac_prefs->protocol == A_IMAP4 ||
                         ac_prefs->protocol == A_NNTP ||
                         ac_prefs->protocol == A_LOCAL);
index 3ec7d0c..e0cb0d5 100644 (file)
@@ -86,7 +86,7 @@
 /* #define DEFAULT_INC_PATH    "/usr/bin/imget" */
 /* #define DEFAULT_INC_PROGRAM "imget" */
 #define DEFAULT_SENDMAIL_CMD   "/usr/sbin/sendmail -t -i"
-#define DEFAULT_BROWSER_CMD    "mozilla -remote 'openURL(%s, new-window)'"
+#define DEFAULT_BROWSER_CMD    "mozilla-firefox -remote 'openURL(%s,new-window)'"
 
 #ifdef _PATH_MAILDIR
 #  define DEFAULT_SPOOL_PATH   _PATH_MAILDIR
index 22ec214..f04b73e 100644 (file)
@@ -143,6 +143,26 @@ void ptr_array_free_strings(GPtrArray *array)
        }
 }
 
+gboolean str_find(const gchar *haystack, const gchar *needle)
+{
+       return strstr(haystack, needle) != NULL ? TRUE : FALSE;
+}
+
+gboolean str_case_find(const gchar *haystack, const gchar *needle)
+{
+       return strcasestr(haystack, needle) != NULL ? TRUE : FALSE;
+}
+
+gboolean str_find_equal(const gchar *haystack, const gchar *needle)
+{
+       return strcmp(haystack, needle) == 0;
+}
+
+gboolean str_case_find_equal(const gchar *haystack, const gchar *needle)
+{
+       return strcasecmp(haystack, needle) == 0;
+}
+
 gint to_number(const gchar *nstr)
 {
        register const guchar *p;
index 717fc65..13325d7 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
- * Copyright (C) 1999-2003 Hiroyuki Yamamoto
+ * Copyright (C) 1999-2004 Hiroyuki Yamamoto
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -175,6 +175,18 @@ guint str_case_hash                (gconstpointer   key);
 
 void ptr_array_free_strings    (GPtrArray      *array);
 
+typedef gboolean (*StrFindFunc) (const gchar   *haystack,
+                                const gchar    *needle);
+
+gboolean str_find              (const gchar    *haystack,
+                                const gchar    *needle);
+gboolean str_case_find         (const gchar    *haystack,
+                                const gchar    *needle);
+gboolean str_find_equal                (const gchar    *haystack,
+                                const gchar    *needle);
+gboolean str_case_find_equal   (const gchar    *haystack,
+                                const gchar    *needle);
+
 /* number-string conversion */
 gint to_number                 (const gchar *nstr);
 gchar *itos_buf                        (gchar       *nstr,
index 0e54913..338f768 100644 (file)
@@ -579,7 +579,7 @@ static void mark_all_read_cb(FolderView *folderview, guint action,
 {
        FolderItem *item;
 
-       item = folderview_get_selected(folderview);
+       item = folderview_get_selected_item(folderview);
        if (item == NULL)
                return;
 
@@ -651,6 +651,14 @@ void folderview_select_next_unread(FolderView *folderview)
                folderview_select_node(folderview, node);
 }
 
+FolderItem *folderview_get_selected_item(FolderView *folderview)
+{
+       GtkCTree *ctree = GTK_CTREE(folderview->ctree);
+
+       if (!folderview->selected) return NULL;
+       return gtk_ctree_node_get_row_data(ctree, folderview->selected);
+}
+
 void folderview_update_msg_num(FolderView *folderview, GtkCTreeNode *row)
 {
        GtkCTree *ctree = GTK_CTREE(folderview->ctree);
@@ -2136,12 +2144,6 @@ static void folderview_drag_end_cb(GtkWidget         *widget,
        folderview->nodes_to_recollapse = NULL;
 }
 
-FolderItem *folderview_get_selected(FolderView *folderview)
-{
-       return (FolderItem *) gtk_ctree_node_get_row_data(
-               GTK_CTREE(folderview->ctree), folderview->selected);
-}
-
 void folderview_register_popup(FolderViewPopup *fpopup)
 {
        GList *folderviews;
index f589a76..79e5fb4 100644 (file)
@@ -72,13 +72,17 @@ struct _FolderViewPopup
 void folderview_initialize             (void);
 FolderView *folderview_create          (void);
 void folderview_init                   (FolderView     *folderview);
+
 void folderview_set                    (FolderView     *folderview);
 void folderview_set_all                        (void);
+
 void folderview_select                 (FolderView     *folderview,
                                         FolderItem     *item);
 void folderview_unselect               (FolderView     *folderview);
-FolderItem *folderview_get_selected    (FolderView     *folderview);
 void folderview_select_next_unread     (FolderView     *folderview);
+
+FolderItem *folderview_get_selected_item(FolderView    *folderview);
+
 void folderview_update_msg_num         (FolderView     *folderview,
                                         GtkCTreeNode   *row);
 
index ac8ae96..a11d073 100644 (file)
@@ -274,6 +274,17 @@ gint menu_find_option_menu_index(GtkOptionMenu *optmenu, gpointer data,
        return -1;
 }
 
+gpointer menu_get_option_menu_active_user_data(GtkOptionMenu *optmenu)
+{
+       GtkWidget *menu;
+       GtkWidget *menuitem;
+
+       menu = gtk_option_menu_get_menu(optmenu);
+       menuitem = gtk_menu_get_active(GTK_MENU(menu));
+
+       return gtk_object_get_user_data(GTK_OBJECT(menuitem));
+}
+
 /* call backs for accelerator changes on selected menu items */
 static void menu_item_add_accel( GtkWidget *widget, guint accel_signal_id, GtkAccelGroup *accel_group,
                                 guint accel_key, GdkModifierType accel_mods, GtkAccelFlags accel_flags,
index 00e780f..e5acaa2 100644 (file)
@@ -85,6 +85,8 @@ gint menu_find_option_menu_index(GtkOptionMenu                *optmenu,
                                 gpointer                data,
                                 GCompareFunc            func);
 
+gpointer menu_get_option_menu_active_user_data
+                               (GtkOptionMenu          *optmenu);
 void menu_connect_identical_items(void);
 
 void menu_select_by_data       (GtkMenu                *menu,
index f7a0cd7..7e27aae 100644 (file)
@@ -333,7 +333,9 @@ static gint imap_cmd_login  (IMAPSession    *session,
                                 const gchar    *pass);
 static gint imap_cmd_logout    (IMAPSession    *session);
 static gint imap_cmd_noop      (IMAPSession    *session);
+#if USE_OPENSSL
 static gint imap_cmd_starttls  (IMAPSession    *session);
+#endif
 static gint imap_cmd_namespace (IMAPSession    *session,
                                 gchar         **ns_str);
 static gint imap_cmd_list      (IMAPSession    *session,
@@ -2662,11 +2664,13 @@ static gint imap_cmd_noop(IMAPSession *session)
        return imap_cmd_ok(session, NULL);
 }
 
+#if USE_OPENSSL
 static gint imap_cmd_starttls(IMAPSession *session)
 {
        imap_gen_send(session, "STARTTLS");
        return imap_cmd_ok(session, NULL);
 }
+#endif
 
 #define THROW(err) { ok = err; goto catch; }
 
index c79b763..155822e 100644 (file)
@@ -164,7 +164,7 @@ static void rename_folder_cb(FolderView *folderview, guint action,
        gchar *old_id;
        gchar *new_id;
 
-       item = folderview_get_selected(folderview);
+       item = folderview_get_selected_item(folderview);
        g_return_if_fail(item != NULL);
        g_return_if_fail(item->path != NULL);
        g_return_if_fail(item->folder != NULL);
@@ -220,7 +220,7 @@ static void move_folder_cb(FolderView *folderview, guint action, GtkWidget *widg
 {
        FolderItem *from_folder = NULL, *to_folder = NULL;
 
-       from_folder = folderview_get_selected(folderview);
+       from_folder = folderview_get_selected_item(folderview);
        if (!from_folder || from_folder->folder->klass != imap_get_class())
                return;
 
@@ -331,7 +331,7 @@ static void update_tree_cb(FolderView *folderview, guint action,
 {
        FolderItem *item;
 
-       item = folderview_get_selected(folderview);
+       item = folderview_get_selected_item(folderview);
        g_return_if_fail(item != NULL);
 
        summary_show(folderview->summaryview, NULL);
index 4588356..99f1f89 100644 (file)
--- a/src/inc.c
+++ b/src/inc.c
@@ -458,7 +458,7 @@ static IncSession *inc_session_new(PrefsAccount *account)
 
        g_return_val_if_fail(account != NULL, NULL);
 
-       if (account->protocol != A_POP3 && account->protocol != A_APOP)
+       if (account->protocol != A_POP3)
                return NULL;
        if (!account->recv_server || !account->userid)
                return NULL;
index ba19b25..a966804 100644 (file)
@@ -439,9 +439,12 @@ static GtkItemFactoryEntry mainwin_entries[] =
        {N_("/_File"),                          NULL, NULL, 0, "<Branch>"},
        {N_("/_File/_Add mailbox"),             NULL, NULL, 0, "<Branch>"},
        {N_("/_File/_Add mailbox/MH..."),       NULL, add_mailbox_cb, 0, NULL},
+       {N_("/_File/---"),                      NULL, NULL, 0, "<Separator>"},
        {N_("/_File/Change folder order"),      NULL, foldersort_cb,  0, NULL},
+       {N_("/_File/---"),                      NULL, NULL, 0, "<Separator>"},
        {N_("/_File/_Import mbox file..."),     NULL, import_mbox_cb, 0, NULL},
        {N_("/_File/_Export to mbox file..."),  NULL, export_mbox_cb, 0, NULL},
+       {N_("/_File/---"),                      NULL, NULL, 0, "<Separator>"},
        {N_("/_File/Empty all _Trash folders"), "<shift>D", empty_trash_cb, 0, NULL},
        {N_("/_File/---"),                      NULL, NULL, 0, "<Separator>"},
        {N_("/_File/_Save as..."),              "<control>S", save_as_cb, 0, NULL},
@@ -1591,7 +1594,7 @@ void main_window_empty_trash(MainWindow *mainwin, gboolean confirm)
                manage_window_focus_in(mainwin->window, NULL, NULL);
        }
 
-       procmsg_empty_trash();
+       procmsg_empty_all_trash();
 
        if (mainwin->summaryview->folder_item &&
            mainwin->summaryview->folder_item->stype == F_TRASH)
@@ -2727,7 +2730,7 @@ static void delete_duplicated_cb(MainWindow *mainwin, guint action,
 {
        FolderItem *item;
 
-       item = folderview_get_selected(mainwin->folderview);
+       item = folderview_get_selected_item(mainwin->folderview);
        if (item) {
                main_window_cursor_wait(mainwin);
                STATUSBAR_PUSH(mainwin, _("Deleting duplicated messages..."));
index 7dfda25..6bc7596 100644 (file)
@@ -156,7 +156,7 @@ static void delete_folder_cb(FolderView *folderview, guint action,
        gchar *old_path;
        gchar *old_id;
 
-       item = folderview_get_selected(folderview);
+       item = folderview_get_selected_item(folderview);
        g_return_if_fail(item != NULL);
        g_return_if_fail(item->path != NULL);
        g_return_if_fail(item->folder != NULL);
@@ -207,7 +207,7 @@ static void rename_folder_cb(FolderView *folderview, guint action,
        gchar *old_id;
        gchar *new_id;
 
-       item = folderview_get_selected(folderview);
+       item = folderview_get_selected_item(folderview);
        g_return_if_fail(item != NULL);
        g_return_if_fail(item->path != NULL);
        g_return_if_fail(item->folder != NULL);
@@ -261,7 +261,7 @@ static void move_folder_cb(FolderView *folderview, guint action, GtkWidget *widg
 {
        FolderItem *from_folder = NULL, *to_folder = NULL;
 
-       from_folder = folderview_get_selected(folderview);
+       from_folder = folderview_get_selected_item(folderview);
        if (!from_folder || from_folder->folder->klass != mh_get_class())
                return;
 
@@ -277,7 +277,7 @@ static void update_tree_cb(FolderView *folderview, guint action,
 {
        FolderItem *item;
 
-       item = folderview_get_selected(folderview);
+       item = folderview_get_selected_item(folderview);
        g_return_if_fail(item != NULL);
 
        summary_show(folderview->summaryview, NULL);
@@ -298,7 +298,7 @@ static void remove_mailbox_cb(FolderView *folderview, guint action,
        gchar *message;
        AlertValue avalue;
 
-       item = folderview_get_selected(folderview);
+       item = folderview_get_selected_item(folderview);
        g_return_if_fail(item != NULL);
        g_return_if_fail(item->folder != NULL);
        if (folder_item_parent(item)) return;
index b800bf4..99d85d1 100644 (file)
@@ -268,7 +268,7 @@ static void update_tree_cb(FolderView *folderview, guint action,
 {
        FolderItem *item;
 
-       item = folderview_get_selected(folderview);
+       item = folderview_get_selected_item(folderview);
        g_return_if_fail(item != NULL);
 
        summary_show(folderview->summaryview, NULL);
index c630365..202bf1b 100644 (file)
--- a/src/pop.c
+++ b/src/pop.c
@@ -873,7 +873,7 @@ static gint pop3_session_recv_msg(Session *session, const gchar *msg)
                        pop3_stls_send(pop3_session);
                else
 #endif
-               if (pop3_session->ac_prefs->protocol == A_APOP)
+               if (pop3_session->ac_prefs->use_apop_auth)
                        pop3_getauth_apop_send(pop3_session);
                else
                        pop3_getauth_user_send(pop3_session);
@@ -882,7 +882,7 @@ static gint pop3_session_recv_msg(Session *session, const gchar *msg)
        case POP3_STLS:
                if (pop3_stls_recv(pop3_session) != PS_SUCCESS)
                        return -1;
-               if (pop3_session->ac_prefs->protocol == A_APOP)
+               if (pop3_session->ac_prefs->use_apop_auth)
                        pop3_getauth_apop_send(pop3_session);
                else
                        pop3_getauth_user_send(pop3_session);
index 0e5934c..548d15f 100644 (file)
@@ -89,6 +89,7 @@ static struct Basic {
 
 static struct Receive {
        GtkWidget *pop3_frame;
+       GtkWidget *use_apop_chkbtn;
        GtkWidget *rmmail_chkbtn;
        GtkWidget *leave_time_entry;
        GtkWidget *getall_chkbtn;
@@ -282,6 +283,10 @@ static PrefParam param[] = {
         &receive.inbox_entry, prefs_set_data_from_entry, prefs_set_entry},
 
        /* Receive */
+       {"use_apop_auth", "FALSE", &tmp_ac_prefs.use_apop_auth, P_BOOL,
+        &receive.use_apop_chkbtn,
+        prefs_set_data_from_toggle, prefs_set_toggle},
+
        {"remove_mail", "TRUE", &tmp_ac_prefs.rmmail, P_BOOL,
         &receive.rmmail_chkbtn,
         prefs_set_data_from_toggle, prefs_set_toggle},
@@ -574,6 +579,12 @@ void prefs_account_read_config(PrefsAccount *ac_prefs, const gchar *label)
        if (id < 0) g_warning("wrong account id: %d\n", id);
        ac_prefs->account_id = id;
 
+       if (ac_prefs->protocol == A_APOP) {
+               debug_print("converting protocol A_APOP to new prefs.\n");
+               ac_prefs->protocol = A_POP3;
+               ac_prefs->use_apop_auth = TRUE;
+       }
+
        prefs_custom_header_read_config(ac_prefs);
 }
 
@@ -940,9 +951,7 @@ static void prefs_account_basic_create(void)
 
        optmenu_menu = gtk_menu_new ();
 
-       MENUITEM_ADD (optmenu_menu, menuitem, _("POP3 (normal)"),  A_POP3);
-       SET_ACTIVATE (menuitem);
-       MENUITEM_ADD (optmenu_menu, menuitem, _("POP3 (APOP auth)"),  A_APOP);
+       MENUITEM_ADD (optmenu_menu, menuitem, _("POP3"),  A_POP3);
        SET_ACTIVATE (menuitem);
        MENUITEM_ADD (optmenu_menu, menuitem, _("IMAP4"), A_IMAP4);
        SET_ACTIVATE (menuitem);
@@ -1116,6 +1125,7 @@ static void prefs_account_receive_create(void)
        GtkWidget *vbox1;
        GtkWidget *frame1;
        GtkWidget *vbox2;
+       GtkWidget *use_apop_chkbtn;
        GtkWidget *rmmail_chkbtn;
        GtkWidget *hbox_spc;
        GtkWidget *leave_time_label;
@@ -1154,6 +1164,9 @@ static void prefs_account_receive_create(void)
        gtk_container_add (GTK_CONTAINER (frame1), vbox2);
        gtk_container_set_border_width (GTK_CONTAINER (vbox2), 8);
 
+       PACK_CHECK_BUTTON (vbox2, use_apop_chkbtn,
+                          _("Use secure authentication (APOP)"));
+
        PACK_CHECK_BUTTON (vbox2, rmmail_chkbtn,
                           _("Remove messages on server when received"));
 
@@ -1310,6 +1323,7 @@ static void prefs_account_receive_create(void)
                (vbox1, recvatgetall_chkbtn,
                 _("`Get all' checks for new messages on this account"));
 
+       receive.use_apop_chkbtn       = use_apop_chkbtn;
        receive.pop3_frame               = frame1;
        receive.rmmail_chkbtn            = rmmail_chkbtn;
        receive.leave_time_entry         = leave_time_entry;
@@ -2164,19 +2178,18 @@ static gint prefs_account_apply(void)
                return -1;
        }
        if (((protocol == A_POP3) || 
-            (protocol == A_APOP) || 
             (protocol == A_LOCAL && !gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(basic.mailcmd_chkbtn))) || 
             (protocol == A_NONE)) &&
            *gtk_entry_get_text(GTK_ENTRY(basic.smtpserv_entry)) == '\0') {
                alertpanel_error(_("SMTP server is not entered."));
                return -1;
        }
-       if ((protocol == A_POP3 || protocol == A_APOP || protocol == A_IMAP4) &&
+       if ((protocol == A_POP3 || protocol == A_IMAP4) &&
            *gtk_entry_get_text(GTK_ENTRY(basic.uid_entry)) == '\0') {
                alertpanel_error(_("User ID is not entered."));
                return -1;
        }
-       if ((protocol == A_POP3 || protocol == A_APOP) &&
+       if (protocol == A_POP3 &&
            *gtk_entry_get_text(GTK_ENTRY(basic.recvserv_entry)) == '\0') {
                alertpanel_error(_("POP3 server is not entered."));
                return -1;
@@ -2295,43 +2308,19 @@ static void prefs_account_protocol_set_optmenu(PrefParam *pparam)
        GtkOptionMenu *optmenu = GTK_OPTION_MENU(*pparam->widget);
        GtkWidget *menu;
        GtkWidget *menuitem;
-       GList *children;
-       gint list_order[] = {
-               0,  /* A_POP3  */
-               1,  /* A_APOP  */
-               -1, /* A_RPOP  */
-               2,  /* A_IMAP4 */
-               3,  /* A_NNTP  */
-               4,  /* A_LOCAL */
-               5,  /* A_NONE  */
-       };
+       gint index;
 
        protocol = *((RecvProtocol *)pparam->data);
-       if (protocol < 0 || protocol > A_NONE) return;
-       if (list_order[protocol] < 0) return;
-       gtk_option_menu_set_history(optmenu, list_order[protocol]);
+       index = menu_find_option_menu_index
+               (optmenu, GINT_TO_POINTER(protocol), NULL);
+       if (index < 0) return;
+       gtk_option_menu_set_history(optmenu, index);
 
        menu = gtk_option_menu_get_menu(optmenu);
        menu_set_insensitive_all(GTK_MENU_SHELL(menu));
 
-#define SET_NTH_SENSITIVE(proto) \
-{ \
-       menuitem = g_list_nth_data(children, list_order[proto]); \
-       if (menuitem) \
-               gtk_widget_set_sensitive(menuitem, TRUE); \
-}
-
-       children = GTK_MENU_SHELL(menu)->children;
-       SET_NTH_SENSITIVE(protocol);
-       if (protocol == A_POP3) {
-               SET_NTH_SENSITIVE(A_APOP);
-       } else if (protocol == A_APOP) {
-               SET_NTH_SENSITIVE(A_POP3);
-       }
-
-#undef SET_NTH_SENSITIVE
-
        menuitem = gtk_menu_get_active(GTK_MENU(menu));
+       gtk_widget_set_sensitive(menuitem, TRUE);
        gtk_menu_item_activate(GTK_MENU_ITEM(menuitem));
 }
 
index 690a345..4a4d125 100644 (file)
@@ -28,8 +28,8 @@ typedef struct _PrefsAccount  PrefsAccount;
 
 typedef enum {
        A_POP3,
-       A_APOP,
-       A_RPOP,
+       A_APOP, /* deprecated */
+       A_RPOP, /* deprecated */
        A_IMAP4,
        A_NNTP,
        A_LOCAL,
@@ -84,6 +84,7 @@ struct _PrefsAccount
        gchar *tmp_pass;
 
        /* Receive */
+       gboolean use_apop_auth;
        gboolean rmmail;
        gint msg_leave_time;
        gboolean getall;
index 453495f..0e227d3 100644 (file)
@@ -138,8 +138,8 @@ void prefs_ext_prog_create_widget(PrefsPage *_page, GtkWindow *window,
                               "gnome-moz-remote --newwin '%s'",
                               "kfmclient openURL '%s'",
                               "opera -newwindow '%s'",
-                              "kterm -e w3m '%s'",
-                              "kterm -e lynx '%s'",
+                              "rxvt -e w3m '%s'",
+                              "rxvt -e lynx '%s'",
                               NULL);
        uri_entry = GTK_COMBO (uri_combo)->entry;
        gtk_entry_set_text(GTK_ENTRY(uri_entry), prefs_common.uri_cmd ? prefs_common.uri_cmd : "");
index 9e5d411..21f88b3 100644 (file)
@@ -600,24 +600,31 @@ void procmsg_get_filter_keyword(MsgInfo *msginfo, gchar **header, gchar **key,
        }
 }
 
-void procmsg_empty_trash(void)
+void procmsg_empty_trash(FolderItem *trash)
+{
+       FILE *fp;
+
+       if (trash && trash->total_msgs > 0) {
+               GSList *mlist = folder_item_get_msg_list(trash);
+               GSList *cur;
+               for (cur = mlist ; cur != NULL ; cur = cur->next) {
+                       MsgInfo * msginfo = (MsgInfo *) cur->data;
+                       partial_mark_for_delete(msginfo);
+                       procmsg_msginfo_free(msginfo);
+               }
+
+               folder_item_remove_all_msg(trash);
+       }
+}
+
+void procmsg_empty_all_trash(void)
 {
        FolderItem *trash;
        GList *cur;
 
        for (cur = folder_get_list(); cur != NULL; cur = cur->next) {
                trash = FOLDER(cur->data)->trash;
-               if (trash && trash->total_msgs > 0) {
-                       GSList *mlist = folder_item_get_msg_list(trash);
-                       GSList *cur;
-                       for (cur = mlist ; cur != NULL ; cur = cur->next) {
-                               MsgInfo * msginfo = (MsgInfo *) cur->data;
-                               partial_mark_for_delete(msginfo);
-                               procmsg_msginfo_free(msginfo);
-                       }
-
-                       folder_item_remove_all_msg(trash);
-               }
+               procmsg_empty_trash(trash);
        }
 }
 
index 2d566aa..e79e5af 100644 (file)
@@ -265,7 +265,9 @@ void        procmsg_get_filter_keyword      (MsgInfo          *msginfo,
                                         gchar           **key,
                                         PrefsFilterType   type);
 
-void   procmsg_empty_trash             (void);
+void   procmsg_empty_trash             (FolderItem     *trash);
+void   procmsg_empty_all_trash         (void);
+
 gint   procmsg_send_queue              (FolderItem     *queue,
                                         gboolean        save_msgs);
 gint   procmsg_save_to_outbox          (FolderItem     *outbox,
index 98cf947..71df7f5 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
- * Copyright (C) 1999-2003 Hiroyuki Yamamoto
+ * Copyright (C) 1999-2004 Hiroyuki Yamamoto
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -29,6 +29,7 @@
 #include <gtk/gtkwindow.h>
 #include <gtk/gtkvbox.h>
 #include <gtk/gtktable.h>
+#include <gtk/gtkoptionmenu.h>
 #include <gtk/gtklabel.h>
 #include <gtk/gtkentry.h>
 #include <gtk/gtkhbox.h>
 #include "summaryview.h"
 #include "messageview.h"
 #include "mainwindow.h"
+#include "menu.h"
 #include "utils.h"
 #include "gtkutils.h"
 #include "manage_window.h"
 #include "alertpanel.h"
 
 static GtkWidget *window;
+static GtkWidget *bool_optmenu;
 static GtkWidget *from_entry;
 static GtkWidget *to_entry;
 static GtkWidget *subject_entry;
@@ -89,6 +92,9 @@ void summary_search(SummaryView *summaryview)
 static void summary_search_create(SummaryView *summaryview)
 {
        GtkWidget *vbox1;
+       GtkWidget *bool_hbox;
+       GtkWidget *bool_menu;
+       GtkWidget *menuitem;
        GtkWidget *table1;
        GtkWidget *from_label;
        GtkWidget *to_label;
@@ -112,6 +118,19 @@ static void summary_search_create(SummaryView *summaryview)
        gtk_widget_show (vbox1);
        gtk_container_add (GTK_CONTAINER (window), vbox1);
 
+       bool_hbox = gtk_hbox_new(FALSE, 4);
+       gtk_widget_show(bool_hbox);
+       gtk_box_pack_start(GTK_BOX(vbox1), bool_hbox, FALSE, FALSE, 0);
+
+       bool_optmenu = gtk_option_menu_new();
+       gtk_widget_show(bool_optmenu);
+       gtk_box_pack_start(GTK_BOX(bool_hbox), bool_optmenu, FALSE, FALSE, 0);
+
+       bool_menu = gtk_menu_new();
+       MENUITEM_ADD(bool_menu, menuitem, _("Match any of the following"), 0);
+       MENUITEM_ADD(bool_menu, menuitem, _("Match all of the following"), 1);
+       gtk_option_menu_set_menu(GTK_OPTION_MENU(bool_optmenu), bool_menu);
+
        table1 = gtk_table_new (4, 3, FALSE);
        gtk_widget_show (table1);
        gtk_box_pack_start (GTK_BOX (vbox1), table1, TRUE, TRUE, 0);
@@ -199,12 +218,6 @@ static void summary_search_create(SummaryView *summaryview)
        gtk_signal_connect(GTK_OBJECT(all_checkbtn), "clicked",
                           GTK_SIGNAL_FUNC(all_clicked), summaryview);
 
-       and_checkbtn =
-               gtk_check_button_new_with_label (_("AND search"));
-       gtk_widget_show (and_checkbtn);
-       gtk_box_pack_start (GTK_BOX (checkbtn_hbox), and_checkbtn,
-                           FALSE, FALSE, 0);
-
        gtkut_button_set_create(&confirm_area,
                                &search_btn, _("Search"),
                                &clear_btn,  _("Clear"),
@@ -230,50 +243,38 @@ static void summary_search_execute(GtkButton *button, gpointer data)
        GtkCTree *ctree = GTK_CTREE(summaryview->ctree);
        GtkCTreeNode *node;
        MsgInfo *msginfo;
+       gboolean bool_and;
        gboolean case_sens;
        gboolean backward;
        gboolean search_all;
-       gboolean search_and;
        gboolean all_searched = FALSE;
-       gboolean all_matched = FALSE;
-       gboolean from_matched;
-       gboolean   to_matched;
-       gboolean subj_matched;
+       gboolean matched;
        gboolean body_matched;
-       gchar *body_str;
-       wchar_t *wcs_hs, *fromwcs, *towcs, *subjwcs;
-       wchar_t *(* WCSFindFunc) (const wchar_t *haystack,
-                                 const wchar_t *needle);
+       gchar *from_str, *to_str, *subject_str, *body_str;
+       StrFindFunc str_find_func;
 
        if (summary_is_locked(summaryview)) return;
        summary_lock(summaryview);
 
+       bool_and = GPOINTER_TO_INT
+               (menu_get_option_menu_active_user_data
+                       (GTK_OPTION_MENU(bool_optmenu)));
        case_sens = gtk_toggle_button_get_active
                (GTK_TOGGLE_BUTTON(case_checkbtn));
        backward = gtk_toggle_button_get_active
                (GTK_TOGGLE_BUTTON(backward_checkbtn));
        search_all = gtk_toggle_button_get_active
                (GTK_TOGGLE_BUTTON(all_checkbtn));
-       search_and = gtk_toggle_button_get_active
-               (GTK_TOGGLE_BUTTON(and_checkbtn));
-       
+
        if (case_sens)
-#if HAVE_WCSSTR
-               WCSFindFunc = wcsstr;
-#else
-#if HAVE_WCSWCS
-               WCSFindFunc = wcswcs;
-#else
-               WCSFindFunc = wcscasestr;
-#endif
-#endif /* HAVE_WCSSTR */
+               str_find_func = str_find;
        else
-               WCSFindFunc = wcscasestr;
+               str_find_func = str_case_find;
 
-       fromwcs = (wchar_t *)GTK_ENTRY(from_entry)->text;
-       towcs   = (wchar_t *)GTK_ENTRY(to_entry)->text;
-       subjwcs = (wchar_t *)GTK_ENTRY(subject_entry)->text;
-       body_str = gtk_entry_get_text(GTK_ENTRY(body_entry));
+       from_str    = gtk_entry_get_text(GTK_ENTRY(from_entry));
+       to_str      = gtk_entry_get_text(GTK_ENTRY(to_entry));
+       subject_str = gtk_entry_get_text(GTK_ENTRY(subject_entry));
+       body_str    = gtk_entry_get_text(GTK_ENTRY(body_entry));
 
        if (search_all) {
                gtk_clist_freeze(GTK_CLIST(ctree));
@@ -340,44 +341,61 @@ static void summary_search_execute(GtkButton *button, gpointer data)
                                break;
                }
 
-               from_matched = to_matched = subj_matched = body_matched = FALSE;
-               all_matched = search_and;
-               
-               msginfo = gtk_ctree_node_get_row_data(ctree, node);
 
-               if (*fromwcs && msginfo->from) {
-                       wcs_hs = strdup_mbstowcs(msginfo->from);
-                       if (wcs_hs && WCSFindFunc(wcs_hs, fromwcs) != NULL)
-                               from_matched = TRUE;
-                       else
-                               all_matched = FALSE;
-                       g_free(wcs_hs);
-               }
-               if (*towcs && msginfo->to) {
-                       wcs_hs = strdup_mbstowcs(msginfo->to);
-                       if (wcs_hs && WCSFindFunc(wcs_hs, towcs) != NULL)
-                               to_matched = TRUE;
-                       else
-                               all_matched = FALSE;
-                       g_free(wcs_hs);
-               }
-               if (*subjwcs && msginfo->subject) {
-                       wcs_hs = strdup_mbstowcs(msginfo->subject);
-                       if (wcs_hs && WCSFindFunc(wcs_hs, subjwcs) != NULL)
-                               subj_matched = TRUE;
-                       else
-                               all_matched = FALSE;
-                       g_free(wcs_hs);
-               }
-               if (*body_str) {
-                       if (procmime_find_string(msginfo, body_str, case_sens))
-                               body_matched = TRUE;
-                       else
-                               all_matched = FALSE;
+               msginfo = gtk_ctree_node_get_row_data(ctree, node);
+               body_matched = FALSE;
+
+               if (bool_and) {
+                       matched = TRUE;
+                       if (*from_str) {
+                               if (!msginfo->from ||
+                                   !str_find_func(msginfo->from, from_str))
+                                       matched = FALSE;
+                       }
+                       if (matched && *to_str) {
+                               if (!msginfo->to ||
+                                   !str_find_func(msginfo->to, to_str))
+                                       matched = FALSE;
+                       }
+                       if (matched && *subject_str) {
+                               if (!msginfo->subject ||
+                                   !str_find_func(msginfo->subject, subject_str))
+                                       matched = FALSE;
+                       }
+                       if (matched && *body_str) {
+                               if (procmime_find_string(msginfo, body_str,
+                                                        str_find_func))
+                                       body_matched = TRUE;
+                               else
+                                       matched = FALSE;
+                       }
+                       if (matched && !*from_str && !*to_str &&
+                           !*subject_str && !*body_str)
+                               matched = FALSE;
+               } else {
+                       matched = FALSE;
+                       if (*from_str && msginfo->from) {
+                               if (str_find_func(msginfo->from, from_str))
+                                       matched = TRUE;
+                       }
+                       if (!matched && *to_str && msginfo->to) {
+                               if (str_find_func(msginfo->to, to_str))
+                                       matched = TRUE;
+                       }
+                       if (!matched && *subject_str && msginfo->subject) {
+                               if (str_find_func(msginfo->subject, subject_str))
+                                       matched = TRUE;
+                       }
+                       if (!matched && *body_str) {
+                               if (procmime_find_string(msginfo, body_str,
+                                                        str_find_func)) {
+                                       matched = TRUE;
+                                       body_matched = TRUE;
+                               }
+                       }
                }
 
-               if ((from_matched || to_matched || subj_matched || body_matched)
-                   && (!search_and || all_matched)) {
+               if (matched) {
                        if (search_all)
                                gtk_ctree_select(ctree, node);
                        else {
index a5b343a..2d301eb 100644 (file)
@@ -4357,6 +4357,7 @@ static gint summary_key_pressed(GtkWidget *widget, GdkEventKey *event,
        MessageView *messageview;
        TextView *textview;
        GtkAdjustment *adj;
+       gboolean mod_pressed;
 
        if (summary_is_locked(summaryview)) return TRUE;
        if (!event) return TRUE;
@@ -4396,9 +4397,16 @@ static gint summary_key_pressed(GtkWidget *widget, GdkEventKey *event,
                                                    summaryview->selected);
                                break;
                        }
-                       if (!textview_scroll_page(textview, FALSE))
-                               summary_select_next_unread(summaryview);
-               }                               
+                       mod_pressed = ((event->state & 
+                                       (GDK_SHIFT_MASK|GDK_MOD1_MASK)) != 0);
+                       if (mod_pressed) {
+                               if (!textview_scroll_page(textview, TRUE))
+                                       summary_select_prev_unread(summaryview);
+                       } else {
+                               if (!textview_scroll_page(textview, FALSE))
+                                       summary_select_next_unread(summaryview);
+                       }                               
+               }
                break;
        case GDK_BackSpace:     /* Page up */
                textview_scroll_page(textview, TRUE);
@@ -4410,7 +4418,8 @@ static gint summary_key_pressed(GtkWidget *widget, GdkEventKey *event,
                        break;
                }
                textview_scroll_one_line
-                       (textview, (event->state & GDK_MOD1_MASK) != 0);
+                       (textview, (event->state &
+                                   (GDK_SHIFT_MASK|GDK_MOD1_MASK)) != 0);
                break;
        case GDK_Delete:
                BREAK_ON_MODIFIER_KEY();
index 809d3e3..9c47a6b 100644 (file)
@@ -1756,14 +1756,18 @@ static gint textview_key_pressed(GtkWidget *widget, GdkEventKey *event,
                if (summaryview)
                        summary_pass_key_press_event(summaryview, event);
                else
-                       textview_scroll_page(textview, FALSE);
+                       textview_scroll_page
+                               (textview,
+                                (event->state &
+                                 (GDK_SHIFT_MASK|GDK_MOD1_MASK)) != 0);
                break;
        case GDK_BackSpace:
                textview_scroll_page(textview, TRUE);
                break;
        case GDK_Return:
-               textview_scroll_one_line(textview,
-                                        (event->state & GDK_MOD1_MASK) != 0);
+               textview_scroll_one_line
+                       (textview, (event->state &
+                                   (GDK_SHIFT_MASK|GDK_MOD1_MASK)) != 0);
                break;
        case GDK_Delete:
                if (summaryview)