sync with sylpheed 0.7.0cvs27
authorPaul Mangan <paul@claws-mail.org>
Thu, 31 Jan 2002 11:15:55 +0000 (11:15 +0000)
committerPaul Mangan <paul@claws-mail.org>
Thu, 31 Jan 2002 11:15:55 +0000 (11:15 +0000)
13 files changed:
ChangeLog
ChangeLog.claws
ChangeLog.jp
configure.in
src/compose.c
src/gtkutils.c
src/gtkutils.h
src/mainwindow.c
src/mh.c
src/prefs_common.c
src/summaryview.c
src/summaryview.h
src/textview.c

index 11d376d..f416c73 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,22 @@
+2002-01-31
+
+       * src/gtkutils.[ch]: added gtk_stext_clear().
+       * src/compose.[ch]
+         src/mainwindow.c
+         src/summaryview.[ch]: enabled multiple forwarding.
+       * src/summaryview.c:
+         summary_set_marks_selected(): set marks for all selected row.
+         summary_reply(): moved from summary_reply_cb().
+       * compose.[ch]: compose_forward(): modified so that it receives
+         the message list.
+       * src/mainwindow.c: cleanup for reply processing.
+       * src/summaryview.c: summary_reply(): fixed a memory leak.
+         summary_key_pressed(): removed hardcoded mark / mark as unread
+         shortcuts.
+       * src/mainwindow.c
+         src/prefs_common.c: added mark / mark as unread shortcuts to
+         the menu.
+
 2002-01-30
 
        * src/compose.c: compose_wrap_line_all(): wrap quoted part even
@@ -5,6 +24,10 @@
          auto-wrapping on reply).
        * src/prefs_account.c: prefs_account_open(): initialize tmp_ac_prefs
          when creating a new account.
+       * src/mh.c: mh_get_msg_list(): use also st_ctime to detect
+         directory change.
+       * src/prefs_common.c: prefs_interface_create(): modified the
+         description of key binds selector.
 
 2002-01-29
 
index 4ed35dc..5ab55a0 100644 (file)
@@ -1,3 +1,16 @@
+2002-01-31 [paul]      0.7.0claws41
+
+       * sync with sylpheed 0.7.0cvs27
+               see ChangeLog entries 2002-01-30 (src/mh.c, src/prefs_common.c)
+               and 2002-01-31
+
+       * src/textview.c
+               comment out elements of textview_show_part() as temporary
+               workaround for attachment 'Display as text' bug 
+
+       * po/pt_BR.po
+               updated by Fabio Junior Beneditto
+
 2002-01-30 [paul]      0.7.0claws40
 
        * sync with sylpheed 0.7.0cvs24
index 61b43f3..5513503 100644 (file)
@@ -1,3 +1,22 @@
+2002-01-31
+
+       * src/gtkutils.[ch]: gtk_stext_clear() ¤òÄɲá£
+       * src/compose.[ch]
+         src/mainwindow.c
+         src/summaryview.[ch]: Ê£¿ôžÁ÷¤¬¤Ç¤­¤ë¤è¤¦¤Ë¤·¤¿¡£
+       * src/summaryview.c:
+         summary_set_marks_selected(): ÁªÂò¹ÔÁ´¤Æ¤Ë¥Þ¡¼¥¯¤òÉÕ¤±¤ë¤è¤¦¤Ë¤·¤¿¡£
+         summary_reply(): summary_reply_cb() ¤«¤é°ÜÆ°¡£
+       * compose.[ch]: compose_forward(): ¥á¥Ã¥»¡¼¥¸¥ê¥¹¥È¤ò¼õ¤±¤ë¤è¤¦¤Ë
+         ½¤Àµ¡£
+       * src/mainwindow.c: ÊÖ¿®¤Î½èÍý¤òÀ°Íý¡£
+       * src/summaryview.c: summary_reply(): ¥á¥â¥ê¥ê¡¼¥¯¤ò½¤Àµ¡£
+         summary_key_pressed(): ¥Ï¡¼¥É¥³¡¼¥É¤µ¤ì¤¿¥Þ¡¼¥¯¡¿Ì¤ÆɤȤ·¤Æ¥Þ¡¼¥¯
+         ¤Î¥·¥ç¡¼¥È¥«¥Ã¥È¤òºï½ü¡£
+       * src/mainwindow.c
+         src/prefs_common.c: ¥á¥Ë¥å¡¼¤Ë¥Þ¡¼¥¯¡¿Ì¤ÆɤȤ·¤Æ¥Þ¡¼¥¯¤Î¥·¥ç¡¼¥È
+         ¥«¥Ã¥È¤òÄɲá£
+
 2002-01-30
 
        * src/compose.c: compose_wrap_line_all():
@@ -6,6 +25,10 @@
          ²þ¹Ô¤Î¤¿¤á¤Ë¤¢¤ë¤Î¤Ç)¡£
        * src/prefs_account.c: prefs_account_open(): ¿·µ¬¥¢¥«¥¦¥ó¥È¤òºîÀ®
          ¤¹¤ë¤È¤­¤Ë tmp_ac_prefs ¤ò½é´ü²½¤¹¤ë¤è¤¦¤Ë¤·¤¿¡£
+       * src/mh.c: mh_get_msg_list(): ¥Ç¥£¥ì¥¯¥È¥ê¤Î¹¹¿·¤ò¸¡½Ð¤¹¤ë¤¿¤á¤Ë
+         st_ctime ¤â»È¤¦¤è¤¦¤Ë¤·¤¿¡£
+       * src/prefs_common.c: prefs_interface_create(): ¥­¡¼¥Ð¥¤¥ó¥É¥»¥ì¥¯¥¿
+         ¤ÎÀâÌÀ¤ò½¤Àµ¡£
 
 2002-01-29
 
index 8558df1..a289959 100644 (file)
@@ -8,7 +8,7 @@ MINOR_VERSION=7
 MICRO_VERSION=0
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=claws40
+EXTRA_VERSION=claws41
 VERSION=$MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION$EXTRA_VERSION
 
 dnl set $target
index 946ef3b..2bf2660 100644 (file)
@@ -1723,8 +1723,6 @@ static gchar *compose_quote_fmt(Compose *compose, MsgInfo *msginfo,
                buf = "";
 
        gtk_stext_freeze(text);
-       gtk_stext_set_point(text, 0);
-       gtk_stext_forward_delete(text, gtk_stext_get_length(text));
 
        for (p = buf; *p != '\0'; ) {
                lastp = strchr(p, '\n');
@@ -4995,6 +4993,8 @@ static void compose_template_apply(Compose *compose, Template *tmpl)
        if (tmpl->to && *tmpl->to != '\0')
                compose_entry_append(compose, tmpl->to, COMPOSE_TO);
 
+       gtk_stext_clear(GTK_STEXT(compose->text));
+
        if (compose->replyinfo == NULL) {
                MsgInfo dummyinfo;
 
index be92717..b7910bc 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
- * Copyright (C) 1999-2001 Hiroyuki Yamamoto
+ * Copyright (C) 1999-2002 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
@@ -361,6 +361,14 @@ gboolean gtkut_stext_is_uri_string(GtkSText *text,
        return FALSE;
 }
 
+void gtk_stext_clear(GtkSText *text)
+{
+       gtk_stext_freeze(text);
+       gtk_stext_set_point(text, 0);
+       gtk_stext_forward_delete(text, gtk_stext_get_length(text));
+       gtk_stext_thaw(text);
+}
+
 void gtkut_widget_disable_theme_engine(GtkWidget *widget)
 {
        GtkStyle *style, *new_style;
index a9e1fa5..0cc5c3a 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
- * Copyright (C) 1999-2001 Hiroyuki Yamamoto
+ * Copyright (C) 1999-2002 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
@@ -122,6 +122,7 @@ guint gtkut_stext_str_compare               (GtkSText       *text,
 gboolean gtkut_stext_is_uri_string     (GtkSText       *text,
                                         guint           start_pos,
                                         guint           text_len);
+void gtk_stext_clear                   (GtkSText       *text);
 
 void gtkut_widget_disable_theme_engine (GtkWidget      *widget);
 void gtkut_widget_wait_for_draw                (GtkWidget      *widget);
index 01a1c46..0c3ea54 100644 (file)
@@ -1431,7 +1431,7 @@ void main_window_set_toolbar_sensitive(MainWindow *mainwin)
                {mainwin->reply_btn       , M_HAVE_ACCOUNT|M_SINGLE_TARGET_EXIST},
                {mainwin->replyall_btn    , M_HAVE_ACCOUNT|M_SINGLE_TARGET_EXIST},
                {mainwin->replysender_btn , M_HAVE_ACCOUNT|M_SINGLE_TARGET_EXIST},
-               {mainwin->fwd_btn         , M_HAVE_ACCOUNT|M_SINGLE_TARGET_EXIST},
+               {mainwin->fwd_btn         , M_HAVE_ACCOUNT|M_TARGET_EXIST},
                /* {mainwin->prefs_btn      , M_UNLOCKED},
                {mainwin->account_btn    , M_UNLOCKED}, */
                {mainwin->next_btn        , M_MSG_EXIST},
@@ -1497,13 +1497,13 @@ void main_window_set_menu_sensitive(MainWindow *mainwin)
                {"/Message/Reply to sender"       , M_HAVE_ACCOUNT|M_SINGLE_TARGET_EXIST},
                {"/Message/Reply to all"          , M_HAVE_ACCOUNT|M_SINGLE_TARGET_EXIST},
                {"/Message/Follow-up and reply to", M_HAVE_ACCOUNT|M_SINGLE_TARGET_EXIST|M_NEWS},
-               {"/Message/Forward"               , M_HAVE_ACCOUNT|M_SINGLE_TARGET_EXIST},
+               {"/Message/Forward"               , M_HAVE_ACCOUNT|M_TARGET_EXIST},
                {"/Message/Bounce"                , M_HAVE_ACCOUNT|M_SINGLE_TARGET_EXIST},
-               {"/Message/Re-edit", M_HAVE_ACCOUNT|M_ALLOW_REEDIT},
-               {"/Message/Move...", M_TARGET_EXIST|M_EXEC|M_UNLOCKED},
-               {"/Message/Copy...", M_TARGET_EXIST|M_EXEC|M_UNLOCKED},
-               {"/Message/Delete" , M_TARGET_EXIST|M_EXEC|M_UNLOCKED},
-               {"/Message/Mark"   , M_TARGET_EXIST},
+               {"/Message/Re-edit"               , M_HAVE_ACCOUNT|M_ALLOW_REEDIT},
+               {"/Message/Move..."               , M_TARGET_EXIST|M_EXEC|M_UNLOCKED},
+               {"/Message/Copy..."               , M_TARGET_EXIST|M_EXEC|M_UNLOCKED},
+               {"/Message/Delete"                , M_TARGET_EXIST|M_EXEC|M_UNLOCKED},
+               {"/Message/Mark"                  , M_TARGET_EXIST},
                {"/Message/Delete duplicated messages", M_MSG_EXIST|M_EXEC|M_UNLOCKED},
 
                {"/Tool/Add sender to address book", M_SINGLE_TARGET_EXIST},
@@ -2572,85 +2572,7 @@ static void compose_news_cb(MainWindow *mainwin, guint action,
 
 static void reply_cb(MainWindow *mainwin, guint action, GtkWidget *widget)
 {
-       GList  *sel = GTK_CLIST(mainwin->summaryview->ctree)->selection;
-       MsgInfo *msginfo;
-
-       msginfo = gtk_ctree_node_get_row_data
-               (GTK_CTREE(mainwin->summaryview->ctree),
-                mainwin->summaryview->selected);
-
-       if (!msginfo) return;
-
-       switch (action) {
-       case COMPOSE_REPLY:
-               compose_reply(msginfo, prefs_common.reply_with_quote,
-                             FALSE, FALSE);
-               break;
-       case COMPOSE_REPLY_WITH_QUOTE:
-               compose_reply(msginfo, TRUE, FALSE, FALSE);
-               break;
-       case COMPOSE_REPLY_WITHOUT_QUOTE:
-               compose_reply(msginfo, FALSE, FALSE, FALSE);
-               break;
-       case COMPOSE_REPLY_TO_SENDER:
-               compose_reply(msginfo, prefs_common.reply_with_quote,
-                             FALSE, TRUE);
-               break;
-       case COMPOSE_REPLY_TO_SENDER_WITH_QUOTE:
-               compose_reply(msginfo, TRUE, FALSE, TRUE);
-               break;
-       case COMPOSE_REPLY_TO_SENDER_WITHOUT_QUOTE:
-               compose_reply(msginfo, FALSE, FALSE, TRUE);
-               break;
-       case COMPOSE_FOLLOWUP_AND_REPLY_TO:
-               compose_followup_and_reply_to(msginfo,
-                                             prefs_common.reply_with_quote,
-                                             FALSE, TRUE);
-               break;
-       case COMPOSE_REPLY_TO_ALL:
-               compose_reply(msginfo, prefs_common.reply_with_quote,
-                             TRUE, TRUE);
-               break;
-       case COMPOSE_REPLY_TO_ALL_WITH_QUOTE:
-               compose_reply(msginfo, TRUE, TRUE, TRUE);
-               break;
-       case COMPOSE_REPLY_TO_ALL_WITHOUT_QUOTE:
-               compose_reply(msginfo, FALSE, TRUE, TRUE);
-               break;
-       case COMPOSE_FORWARD:
-               if (prefs_common.forward_as_attachment) {
-                       reply_cb(mainwin, COMPOSE_FORWARD_AS_ATTACH, widget);
-                       return;
-               } else {
-                       reply_cb(mainwin, COMPOSE_FORWARD_INLINE, widget);
-                       return;
-               }
-               break;
-       case COMPOSE_FORWARD_INLINE:
-               if (!sel->next) {
-                       compose_forward(NULL, msginfo, FALSE);
-                       break;
-               }
-               /* if (sel->next) FALL_THROUGH */
-       case COMPOSE_FORWARD_AS_ATTACH:
-               {
-                       GSList *msginfo_list = NULL;
-                       for ( ; sel != NULL; sel = sel->next)
-                               msginfo_list = g_slist_append(msginfo_list, 
-                                       gtk_ctree_node_get_row_data(GTK_CTREE(mainwin->summaryview->ctree),
-                                               GTK_CTREE_NODE(sel->data)));
-                       compose_forward_multiple(NULL, msginfo_list);
-                       g_slist_free(msginfo_list);
-               }                       
-               break;
-       case COMPOSE_BOUNCE:
-                       compose_bounce(NULL, msginfo);
-                       break;
-       default:
-               g_warning("reply_cb(): invalid action type: %d\n", action);
-       }
-
-       summary_set_marks_selected(mainwin->summaryview);
+       summary_reply(mainwin->summaryview, (ComposeMode)action);
 }
 
 static void move_to_cb(MainWindow *mainwin, guint action, GtkWidget *widget)
index 76bd09c..eeb7fc6 100644 (file)
--- a/src/mh.c
+++ b/src/mh.c
@@ -116,11 +116,14 @@ GSList *mh_get_msg_list(Folder *folder, FolderItem *item, gboolean use_cache)
        if (stat(path, &s) < 0) {
                FILE_OP_ERROR(path, "stat");
        } else {
-               if (item->mtime == s.st_mtime) {
+               time_t mtime;
+
+               mtime = MAX(s.st_mtime, s.st_ctime);
+               if (item->mtime == mtime) {
                        debug_print("Folder is not modified.\n");
                        scan_new = FALSE;
                } else
-                       item->mtime = s.st_mtime;
+                       item->mtime = mtime;
        }
        g_free(path);
 
index 2687230..8cf09a7 100644 (file)
@@ -2496,7 +2496,7 @@ PACK_FRAME(vbox1, keybind_frame, _("Shortcut key"));
 
        keybind_label = gtk_label_new
                (_("Select the preset key bindings.\n"
-                  "You can also modify each menu shortcut by pressing\n"
+                  "You can also modify each menu's shortcuts by pressing\n"
                   "any key(s) when placing the mouse pointer on the item."));
        gtk_widget_show (keybind_label);
        gtk_box_pack_start (GTK_BOX (hbox1), keybind_label, FALSE, FALSE, 0);
@@ -3504,7 +3504,9 @@ static void prefs_keybind_apply_clicked(GtkWidget *widget)
                "(menu-path \"<Main>/Message/Move...\" \"<control>O\")\n"
                "(menu-path \"<Main>/Message/Copy...\" \"<shift><control>O\")\n"
                "(menu-path \"<Main>/Message/Delete\" \"<control>D\")\n"
+               "(menu-path \"<Main>/Message/Mark/Mark\" \"<shift>asterisk\")\n"
                "(menu-path \"<Main>/Message/Mark/Unmark\" \"U\")\n"
+               "(menu-path \"<Main>/Message/Mark/Mark as unread\" \"<shift>exclam\")\n"
 
                "(menu-path \"<Main>/Tool/Address book\" \"<shift><control>A\")\n"
                "(menu-path \"<Main>/Tool/Execute\" \"X\")\n"
@@ -3546,7 +3548,9 @@ static void prefs_keybind_apply_clicked(GtkWidget *widget)
                "(menu-path \"<Main>/Message/Move...\" \"O\")\n"
                "(menu-path \"<Main>/Message/Copy...\" \"<shift>O\")\n"
                "(menu-path \"<Main>/Message/Delete\" \"D\")\n"
+               "(menu-path \"<Main>/Message/Mark/Mark\" \"<shift>asterisk\")\n"
                "(menu-path \"<Main>/Message/Mark/Unmark\" \"U\")\n"
+               "(menu-path \"<Main>/Message/Mark/Mark as unread\" \"<shift>exclam\")\n"
 
                "(menu-path \"<Main>/Tool/Address book\" \"<shift><control>A\")\n"
                "(menu-path \"<Main>/Tool/Execute\" \"X\")\n"
@@ -3588,7 +3592,9 @@ static void prefs_keybind_apply_clicked(GtkWidget *widget)
                "(menu-path \"<Main>/Message/Move...\" \"<alt>O\")\n"
                "(menu-path \"<Main>/Message/Copy...\" \"\")\n"
                "(menu-path \"<Main>/Message/Delete\" \"<alt>D\")\n"
+               "(menu-path \"<Main>/Message/Mark/Mark\" \"<shift>asterisk\")\n"
                "(menu-path \"<Main>/Message/Mark/Unmark\" \"U\")\n"
+               "(menu-path \"<Main>/Message/Mark/Mark as unread\" \"<shift>exclam\")\n"
 
                "(menu-path \"<Main>/Tool/Address book\" \"<alt>A\")\n"
                "(menu-path \"<Main>/Tool/Execute\" \"<alt>X\")\n"
@@ -3630,7 +3636,9 @@ static void prefs_keybind_apply_clicked(GtkWidget *widget)
                "(menu-path \"<Main>/Message/Move...\" \"\")\n"
                "(menu-path \"<Main>/Message/Copy...\" \"\")\n"
                "(menu-path \"<Main>/Message/Delete\" \"\")\n"
+               "(menu-path \"<Main>/Message/Mark/Mark\" \"\")\n"
                "(menu-path \"<Main>/Message/Mark/Unmark\" \"\")\n"
+               "(menu-path \"<Main>/Message/Mark/Mark as unread\" \"\")\n"
 
                "(menu-path \"<Main>/Tool/Address book\" \"\")\n"
                "(menu-path \"<Main>/Tool/Execute\" \"\")\n"
index 01a0c86..e7ff226 100644 (file)
@@ -16,6 +16,7 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  */
+
 #include "defs.h"
 
 #include <glib.h>
@@ -2675,10 +2676,10 @@ static void summary_set_row_marks(SummaryView *summaryview, GtkCTreeNode *row)
 
 void summary_set_marks_selected(SummaryView *summaryview)
 {
-       GtkCTree *ctree = GTK_CTREE(summaryview->ctree);
        GList *cur;
 
-       for (cur = GTK_CLIST(ctree)->selection; cur != NULL; cur = cur->next)
+       for (cur = GTK_CLIST(summaryview->ctree)->selection; cur != NULL;
+            cur = cur->next)
                summary_set_row_marks(summaryview, GTK_CTREE_NODE(cur->data));
 }
 
@@ -3944,6 +3945,88 @@ void summary_filter_open(SummaryView *summaryview, PrefsFilterType type)
        prefs_filter_open(header, key);
 }
 
+void summary_reply(SummaryView *summaryview, ComposeMode mode)
+{
+       GtkWidget *widget;
+       MsgInfo *msginfo;
+       GList  *sel = GTK_CLIST(summaryview->ctree)->selection;
+
+       msginfo = gtk_ctree_node_get_row_data(GTK_CTREE(summaryview->ctree),
+                                             summaryview->selected);
+       if (!msginfo) return;
+
+       switch (mode) {
+       case COMPOSE_REPLY:
+               compose_reply(msginfo, prefs_common.reply_with_quote,
+                             FALSE, FALSE);
+               break;
+       case COMPOSE_REPLY_WITH_QUOTE:
+               compose_reply(msginfo, TRUE, FALSE, FALSE);
+               break;
+       case COMPOSE_REPLY_WITHOUT_QUOTE:
+               compose_reply(msginfo, FALSE, FALSE, FALSE);
+               break;
+       case COMPOSE_REPLY_TO_SENDER:
+               compose_reply(msginfo, prefs_common.reply_with_quote,
+                             FALSE, TRUE);
+               break;
+       case COMPOSE_FOLLOWUP_AND_REPLY_TO:
+               compose_followup_and_reply_to(msginfo,
+                                             prefs_common.reply_with_quote,
+                                             FALSE, TRUE);
+               break;
+       case COMPOSE_REPLY_TO_SENDER_WITH_QUOTE:
+               compose_reply(msginfo, TRUE, FALSE, TRUE);
+               break;
+       case COMPOSE_REPLY_TO_SENDER_WITHOUT_QUOTE:
+               compose_reply(msginfo, FALSE, FALSE, TRUE);
+               break;
+       case COMPOSE_REPLY_TO_ALL:
+               compose_reply(msginfo, prefs_common.reply_with_quote,
+                             TRUE, TRUE);
+               break;
+       case COMPOSE_REPLY_TO_ALL_WITH_QUOTE:
+               compose_reply(msginfo, TRUE, TRUE, FALSE);
+               break;
+       case COMPOSE_REPLY_TO_ALL_WITHOUT_QUOTE:
+               compose_reply(msginfo, FALSE, TRUE, FALSE);
+               break;
+       case COMPOSE_FORWARD:
+               if (prefs_common.forward_as_attachment) {
+                       summary_reply_cb(summaryview, COMPOSE_FORWARD_AS_ATTACH, widget);
+                       return;
+               } else {
+                       summary_reply_cb(summaryview, COMPOSE_FORWARD_INLINE, widget);
+                       return;
+               }
+               break;
+       case COMPOSE_FORWARD_INLINE:
+               if (!sel->next) {
+                       compose_forward(NULL, msginfo, FALSE);
+                       break;
+               }
+               /* if (sel->next) FALL THROUGH */
+       case COMPOSE_FORWARD_AS_ATTACH:
+               {
+                       GSList *msginfo_list = NULL;
+                       for ( ; sel != NULL; sel = sel->next)
+                               msginfo_list = g_slist_append(msginfo_list, 
+                                       gtk_ctree_node_get_row_data(GTK_CTREE(summaryview->ctree),
+                                               GTK_CTREE_NODE(sel->data)));
+                       compose_forward_multiple(NULL, msginfo_list);
+                       g_slist_free(msginfo_list);
+               }                       
+               break;
+       case COMPOSE_BOUNCE:
+               compose_bounce(NULL, msginfo);
+               break;
+       default:
+               g_warning("summary_reply_cb(): invalid action: %d\n", mode);
+       }
+
+       summary_set_marks_selected(summaryview);
+}
+
 /* color label */
 
 #define N_COLOR_LABELS colorlabel_get_color_count()
@@ -4395,12 +4478,6 @@ static void summary_key_pressed(GtkWidget *widget, GdkEventKey *event,
                textview_scroll_one_line(summaryview->messageview->textview,
                                         (event->state & GDK_MOD1_MASK) != 0);
                break;
-       case GDK_asterisk:      /* Mark */
-               summary_mark(summaryview);
-               break;
-       case GDK_exclam:        /* Mark as unread */
-               summary_mark_as_unread(summaryview);
-               break;
        case GDK_Delete:
                RETURN_IF_LOCKED();
                BREAK_ON_MODIFIER_KEY();
@@ -4442,6 +4519,7 @@ static void summary_selected(GtkCTree *ctree, GtkCTreeNode *row,
 
        summary_status_show(summaryview);
        summary_set_menu_sensitive(summaryview);
+       main_window_set_toolbar_sensitive(summaryview->mainwin);
 
        if (GTK_CLIST(ctree)->selection &&
             GTK_CLIST(ctree)->selection->next) {
@@ -4504,83 +4582,7 @@ static void summary_col_resized(GtkCList *clist, gint column, gint width,
 static void summary_reply_cb(SummaryView *summaryview, guint action,
                             GtkWidget *widget)
 {
-       MsgInfo *msginfo;
-       GList  *sel = GTK_CLIST(summaryview->ctree)->selection;
-
-       msginfo = gtk_ctree_node_get_row_data(GTK_CTREE(summaryview->ctree),
-                                             summaryview->selected);
-       if (!msginfo) return;
-
-       switch ((ComposeMode)action) {
-       case COMPOSE_REPLY:
-               compose_reply(msginfo, prefs_common.reply_with_quote,
-                             FALSE, FALSE);
-               break;
-       case COMPOSE_REPLY_WITH_QUOTE:
-               compose_reply(msginfo, TRUE, FALSE, FALSE);
-               break;
-       case COMPOSE_REPLY_WITHOUT_QUOTE:
-               compose_reply(msginfo, FALSE, FALSE, FALSE);
-               break;
-       case COMPOSE_REPLY_TO_SENDER:
-               compose_reply(msginfo, prefs_common.reply_with_quote,
-                             FALSE, TRUE);
-               break;
-       case COMPOSE_FOLLOWUP_AND_REPLY_TO:
-               compose_followup_and_reply_to(msginfo,
-                                             prefs_common.reply_with_quote,
-                                             FALSE, TRUE);
-               break;
-       case COMPOSE_REPLY_TO_SENDER_WITH_QUOTE:
-               compose_reply(msginfo, TRUE, FALSE, TRUE);
-               break;
-       case COMPOSE_REPLY_TO_SENDER_WITHOUT_QUOTE:
-               compose_reply(msginfo, FALSE, FALSE, TRUE);
-               break;
-       case COMPOSE_REPLY_TO_ALL:
-               compose_reply(msginfo, prefs_common.reply_with_quote,
-                             TRUE, TRUE);
-               break;
-       case COMPOSE_REPLY_TO_ALL_WITH_QUOTE:
-               compose_reply(msginfo, TRUE, TRUE, FALSE);
-               break;
-       case COMPOSE_REPLY_TO_ALL_WITHOUT_QUOTE:
-               compose_reply(msginfo, FALSE, TRUE, FALSE);
-               break;
-       case COMPOSE_FORWARD:
-               if (prefs_common.forward_as_attachment) {
-                       summary_reply_cb(summaryview, COMPOSE_FORWARD_AS_ATTACH, widget);
-                       return;
-               } else {
-                       summary_reply_cb(summaryview, COMPOSE_FORWARD_INLINE, widget);
-                       return;
-               }
-               break;
-       case COMPOSE_FORWARD_INLINE:
-               if (!sel->next) {
-                       compose_forward(NULL, msginfo, FALSE);
-                       break;
-               }
-               /* if (sel->next) FALL THROUGH */
-       case COMPOSE_FORWARD_AS_ATTACH:
-               {
-                       GSList *msginfo_list = NULL;
-                       for ( ; sel != NULL; sel = sel->next)
-                               msginfo_list = g_slist_append(msginfo_list, 
-                                       gtk_ctree_node_get_row_data(GTK_CTREE(summaryview->ctree),
-                                               GTK_CTREE_NODE(sel->data)));
-                       compose_forward_multiple(NULL, msginfo_list);
-                       g_slist_free(msginfo_list);
-               }                       
-               break;
-       case COMPOSE_BOUNCE:
-               compose_bounce(NULL, msginfo);
-               break;
-       default:
-               g_warning("summary_reply_cb(): invalid action: %d\n", action);
-       }
-
-       summary_set_marks_selected(summaryview);
+       summary_reply(summaryview, (ComposeMode)action);
 }
 
 static void summary_execute_cb(SummaryView *summaryview, guint action,
index 5101490..98b7e1d 100644 (file)
@@ -35,6 +35,7 @@ typedef struct _SummaryColumnState    SummaryColumnState;
 #include "headerview.h"
 #include "messageview.h"
 #include "headerwindow.h"
+#include "compose.h"
 #include "prefs_filter.h"
 #include "folder.h"
 #include "gtksctree.h"
@@ -198,6 +199,7 @@ void summary_unthread                 (SummaryView          *summaryview);
 void summary_filter              (SummaryView          *summaryview);
 void summary_filter_open         (SummaryView          *summaryview,
                                   PrefsFilterType       type);
+
 void summary_sort                (SummaryView          *summaryview,
                                   SummarySortType       type);
 
@@ -238,6 +240,9 @@ void summary_add_address      (SummaryView          *summaryview);
 void summary_select_all                  (SummaryView          *summaryview);
 void summary_unselect_all        (SummaryView          *summaryview);
 
+void summary_reply               (SummaryView          *summaryview,
+                                  ComposeMode           mode);
+
 void summary_set_colorlabel      (SummaryView          *summaryview,
                                   guint                 labelcolor,
                                   GtkWidget            *widget);
index 8ef9005..1f75beb 100644 (file)
@@ -382,7 +382,7 @@ void textview_show_part(TextView *textview, MimeInfo *mimeinfo, FILE *fp)
                procheader_header_array_destroy(headers);
        }
 
-#if 0
+/* #if 0 */
        tmpfp = procmime_decode_content(NULL, fp, mimeinfo);
 
        if (tmpfp) {
@@ -395,14 +395,14 @@ void textview_show_part(TextView *textview, MimeInfo *mimeinfo, FILE *fp)
                                textview_write_line(textview, buf, conv);
                fclose(tmpfp);
        }
-#else
+/* #else
        tmpfp = procmime_get_text_content(mimeinfo, fp);
 
        while (fgets(buf, sizeof(buf), tmpfp) != NULL)
                textview_write_line(textview, buf, conv);
 
        fclose(tmpfp);
-#endif
+#endif */
 
        conv_code_converter_destroy(conv);