fix messageview toolbar reply
authorOliver Haertel <o.h.a@gmx.net>
Fri, 28 Feb 2003 21:34:56 +0000 (21:34 +0000)
committerOliver Haertel <o.h.a@gmx.net>
Fri, 28 Feb 2003 21:34:56 +0000 (21:34 +0000)
ChangeLog.claws
configure.ac
src/messageview.c
src/summaryview.c
src/summaryview.h
src/toolbar.c
src/toolbar.h

index 33739dc466cced02eef9a5f49695e13a3105e1ac..7187e32d7f57c34b63e44129e044ee9410b084e9 100644 (file)
@@ -1,3 +1,18 @@
+2003-02-28 [oliver]    0.8.10claws63
+       
+       * src/toolbar.[ch]
+               * fix bug where reply in Messageview replied to 
+               Message displayed in summaryview
+               (reportedd via ML by chinatinte at gmx dot ch)
+               * fix bug where toolbar popups (WITH_QUOTE, WITHOUT_QOUTE)
+               didn't work in separate MessageView Toolbar
+               (wondering if anybody uses this at all ?)
+       * src/summaryview.[ch]
+               use toolbar.c's toolbar_reply instead of summary_reply (removed)
+               (generalize reply and forward code);
+       * src/messageview.c 
+               remove focus_in event which updated summaryview to messageview
+
 2003-02-28 [paul]      0.8.10claws62
 
        * po/Makefile.in.in
index 30c2d74e38f2934960a8513aab1bfd2bb80e7840..2ae01d3ca53e80ba359711e987a374d59b1284aa 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=8
 MICRO_VERSION=10
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=claws62
+EXTRA_VERSION=claws63
 VERSION=$MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION$EXTRA_VERSION
 
 dnl set $target
index ca8b24a6d2b6cc83a175fe52f5549d208c047213..5673a31e52b391404b1720f989ac7a3f1e9a3f55 100644 (file)
@@ -62,9 +62,6 @@ static void messageview_size_allocate_cb(GtkWidget    *widget,
 static void key_pressed                        (GtkWidget      *widget,
                                         GdkEventKey    *event,
                                         MessageView    *messageview);
-static void focus_in                   (GtkWidget      *widget, 
-                                        GdkEventFocus  *event,
-                                        gpointer        data);
 
 static void return_receipt_show                (NoticeView     *noticeview, 
                                         MsgInfo        *msginfo);      
@@ -219,8 +216,6 @@ MessageView *messageview_create_with_new_window(MainWindow *mainwin)
                           GTK_SIGNAL_FUNC(messageview_destroy_cb), msgview);
        gtk_signal_connect(GTK_OBJECT(window), "key_press_event",
                           GTK_SIGNAL_FUNC(key_pressed), msgview);
-       gtk_signal_connect(GTK_OBJECT(window), "focus_in_event",
-                          GTK_SIGNAL_FUNC(focus_in), msgview);
 
        messageview_add_toolbar(msgview, window);
 
@@ -727,15 +722,6 @@ static void key_pressed(GtkWidget *widget, GdkEventKey *event,
                gtk_widget_destroy(messageview->window);
 }
 
-static void focus_in(GtkWidget *widget, GdkEventFocus *event,
-                    gpointer data)
-{
-       MessageView *msgview = (MessageView*)data;
-
-       summary_select_by_msgnum(msgview->mainwin->summaryview, 
-                                msgview->msginfo->msgnum);
-}
-
 void messageview_toggle_view_real(MessageView *messageview)
 {
        MainWindow *mainwin = messageview->mainwin;
index 922f5d80912d5f07c143a389692888163fe55b90..1b69cd95c4248eacd6a7c485ecb0ce8631087a2b 100644 (file)
@@ -4102,120 +4102,6 @@ void summary_filter_open(SummaryView *summaryview, PrefsFilterType type)
        prefs_filtering_open(NULL, header, key);
 }
 
-void summary_reply(SummaryView *summaryview, ComposeMode mode)
-{
-       GList *sel = GTK_CLIST(summaryview->ctree)->selection;
-       MsgInfo *msginfo;
-       gchar *text;
-
-       msginfo = gtk_ctree_node_get_row_data(GTK_CTREE(summaryview->ctree),
-                                             summaryview->selected);
-       if (!msginfo) return;
-
-       text = gtkut_editable_get_selection
-               (GTK_EDITABLE(summaryview->messageview->textview->text));
-
-       if (!text && summaryview->messageview->type == MVIEW_MIME
-           && summaryview->messageview->mimeview->type == MIMEVIEW_TEXT
-           && summaryview->messageview->mimeview->textview
-           && !summaryview->messageview->mimeview->textview->default_text) {
-               text = gtkut_editable_get_selection (GTK_EDITABLE 
-                        (summaryview->messageview->mimeview->textview->text));   
-       }
-       
-       switch (mode) {
-       case COMPOSE_REPLY:
-               if (prefs_common.default_reply_list)
-                       compose_reply(msginfo, prefs_common.reply_with_quote,
-                                     FALSE, TRUE, FALSE, text);
-               else
-                       compose_reply(msginfo, prefs_common.reply_with_quote,
-                                     FALSE, FALSE, FALSE, text);
-               break;
-       case COMPOSE_REPLY_WITH_QUOTE:
-               if (prefs_common.default_reply_list)
-                       compose_reply(msginfo, TRUE, FALSE, TRUE, FALSE, text);
-               else
-                       compose_reply(msginfo, TRUE, FALSE, FALSE, FALSE, text);
-               break;
-       case COMPOSE_REPLY_WITHOUT_QUOTE:
-               if (prefs_common.default_reply_list)
-                       compose_reply(msginfo, FALSE, FALSE, TRUE, FALSE, NULL);
-               else
-                       compose_reply(msginfo, FALSE, FALSE, FALSE, FALSE, NULL);
-               break;
-       case COMPOSE_REPLY_TO_SENDER:
-               compose_reply(msginfo, prefs_common.reply_with_quote,
-                             FALSE, FALSE, TRUE, text);
-               break;
-       case COMPOSE_FOLLOWUP_AND_REPLY_TO:
-               compose_followup_and_reply_to(msginfo,
-                                             prefs_common.reply_with_quote,
-                                             FALSE, FALSE, text);
-               break;
-       case COMPOSE_REPLY_TO_SENDER_WITH_QUOTE:
-               compose_reply(msginfo, TRUE, FALSE, FALSE, TRUE, text);
-               break;
-       case COMPOSE_REPLY_TO_SENDER_WITHOUT_QUOTE:
-               compose_reply(msginfo, FALSE, FALSE, FALSE, TRUE, NULL);
-               break;
-       case COMPOSE_REPLY_TO_ALL:
-               compose_reply(msginfo, prefs_common.reply_with_quote,
-                             TRUE, FALSE, FALSE, text);
-               break;
-       case COMPOSE_REPLY_TO_ALL_WITH_QUOTE:
-               compose_reply(msginfo, TRUE, TRUE, FALSE, FALSE, text);
-               break;
-       case COMPOSE_REPLY_TO_ALL_WITHOUT_QUOTE:
-               compose_reply(msginfo, FALSE, TRUE, FALSE, FALSE, NULL);
-               break;
-       case COMPOSE_REPLY_TO_LIST:
-               compose_reply(msginfo, prefs_common.reply_with_quote,
-                             FALSE, TRUE, FALSE, text);
-               break;
-       case COMPOSE_REPLY_TO_LIST_WITH_QUOTE:
-               compose_reply(msginfo, TRUE, FALSE, TRUE, FALSE, text);
-               break;
-       case COMPOSE_REPLY_TO_LIST_WITHOUT_QUOTE:
-               compose_reply(msginfo, FALSE, FALSE, TRUE, FALSE, NULL);
-               break;
-       case COMPOSE_FORWARD:
-               if (prefs_common.forward_as_attachment) {
-                       summary_reply_cb(summaryview, COMPOSE_FORWARD_AS_ATTACH, NULL);
-                       return;
-               } else {
-                       summary_reply_cb(summaryview, COMPOSE_FORWARD_INLINE, NULL);
-                       return;
-               }
-               break;
-       case COMPOSE_FORWARD_INLINE:
-               if (sel && !sel->next) {
-                       compose_forward(NULL, msginfo, FALSE, text);
-                       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_REDIRECT:
-               compose_redirect(NULL, msginfo);
-               break;
-       default:
-               g_warning("summary_reply_cb(): invalid action: %d\n", mode);
-       }
-
-       summary_set_marks_selected(summaryview);
-       g_free(text);
-}
-
 /* color label */
 
 #define N_COLOR_LABELS colorlabel_get_color_count()
@@ -4868,7 +4754,10 @@ static void summary_col_resized(GtkCList *clist, gint column, gint width,
 static void summary_reply_cb(SummaryView *summaryview, guint action,
                             GtkWidget *widget)
 {
-       summary_reply(summaryview, (ComposeMode)action);
+       ToolbarItem *item;
+       item->parent = summaryview;
+       item->type = TOOLBAR_MAIN;
+       toolbar_reply(item, action);
 }
 
 static void summary_execute_cb(SummaryView *summaryview, guint action,
index 713150358bb12ce6ef558722c0d4e2b389c0adeb..fd41e1b8daad386b7b84cc941bb78e1867c616e2 100644 (file)
@@ -254,9 +254,6 @@ void summary_select_all               (SummaryView          *summaryview);
 void summary_unselect_all        (SummaryView          *summaryview);
 void summary_select_thread       (SummaryView          *summaryview);
 
-void summary_reply               (SummaryView          *summaryview,
-                                  ComposeMode           mode);
-
 void summary_set_colorlabel      (SummaryView          *summaryview,
                                   guint                 labelcolor,
                                   GtkWidget            *widget);
index 2c3ba87bfd58b89c2277b4226dc021c5773569bb..21f17e534436b5994acaea0f965153ccad8b0c67 100644 (file)
@@ -1115,10 +1115,7 @@ static void toolbar_compose_cb(GtkWidget *widget, gpointer data)
 
 static void toolbar_popup_cb(gpointer data, guint action, GtkWidget *widget)
 {
-       MainWindow *mainwin = get_mainwin(data);
-
-       g_return_if_fail(mainwin != NULL);
-       reply_cb(mainwin, action, widget);
+       toolbar_reply(data, action);
 }
 
 
@@ -1127,40 +1124,8 @@ static void toolbar_popup_cb(gpointer data, guint action, GtkWidget *widget)
  */
 static void toolbar_reply_cb(GtkWidget *widget, gpointer data)
 {
-       ToolbarItem *toolbar_item = (ToolbarItem*)data;
-       MainWindow *mainwin = get_mainwin(data);
-
-       g_return_if_fail(toolbar_item != NULL);
-
-       switch (toolbar_item->type) {
-       case TOOLBAR_MAIN:
-               mainwin = (MainWindow*)toolbar_item->parent;
-               if (prefs_common.default_reply_list)
-                       reply_cb(mainwin, 
-                                prefs_common.reply_with_quote ? COMPOSE_REPLY_TO_LIST_WITH_QUOTE 
-                                : COMPOSE_REPLY_TO_LIST_WITHOUT_QUOTE, 
-                                NULL);
-               else
-                       reply_cb(mainwin, 
-                                prefs_common.reply_with_quote ? COMPOSE_REPLY_WITH_QUOTE 
-                                : COMPOSE_REPLY_WITHOUT_QUOTE,
-                                NULL);
-               break;
-       case TOOLBAR_MSGVIEW:
-               if (prefs_common.default_reply_list)
-                       reply_cb(mainwin, 
-                                prefs_common.reply_with_quote ? COMPOSE_REPLY_TO_LIST_WITH_QUOTE 
-                                : COMPOSE_REPLY_TO_LIST_WITHOUT_QUOTE,
-                                NULL);
-               else
-                       reply_cb(mainwin,
-                                prefs_common.reply_with_quote ? COMPOSE_REPLY_WITH_QUOTE 
-                                : COMPOSE_REPLY_WITHOUT_QUOTE,
-                                NULL);
-               break;
-       default:
-               debug_print("toolbar event not supported\n");
-       }
+       toolbar_reply(data, prefs_common.reply_with_quote ? 
+                     COMPOSE_REPLY_WITH_QUOTE : COMPOSE_REPLY_WITHOUT_QUOTE);
 }
 
 
@@ -1169,30 +1134,9 @@ static void toolbar_reply_cb(GtkWidget *widget, gpointer data)
  */
 static void toolbar_reply_to_all_cb(GtkWidget *widget, gpointer data)
 {
-       ToolbarItem *toolbar_item = (ToolbarItem*)data;
-       MainWindow *mainwin;
-       MessageView *msgview;
-
-       g_return_if_fail(toolbar_item != NULL);
-
-       switch (toolbar_item->type) {
-       case TOOLBAR_MAIN:
-               mainwin = (MainWindow*)toolbar_item->parent;
-               reply_cb(mainwin, 
-                        prefs_common.reply_with_quote ? COMPOSE_REPLY_TO_ALL_WITH_QUOTE 
-                        : COMPOSE_REPLY_TO_ALL_WITHOUT_QUOTE, 
-                        NULL);
-               break;
-       case TOOLBAR_MSGVIEW:
-               msgview = (MessageView*)toolbar_item->parent;
-               compose_reply(msgview->msginfo,
-                             prefs_common.reply_with_quote ? COMPOSE_REPLY_TO_ALL_WITH_QUOTE 
-                             : COMPOSE_REPLY_TO_ALL_WITHOUT_QUOTE,
-                             TRUE, FALSE, FALSE, NULL);
-               break;
-       default:
-               debug_print("toolbar event not supported\n");
-       }
+       toolbar_reply(data,
+                     prefs_common.reply_with_quote ? COMPOSE_REPLY_TO_ALL_WITH_QUOTE 
+                     : COMPOSE_REPLY_TO_ALL_WITHOUT_QUOTE);
 }
 
 
@@ -1201,30 +1145,9 @@ static void toolbar_reply_to_all_cb(GtkWidget *widget, gpointer data)
  */
 static void toolbar_reply_to_list_cb(GtkWidget *widget, gpointer data)
 {
-       ToolbarItem *toolbar_item = (ToolbarItem*)data;
-       MainWindow *mainwin;
-       MessageView *msgview;
-
-       g_return_if_fail(toolbar_item != NULL);
-
-       switch (toolbar_item->type) {
-       case TOOLBAR_MAIN:
-               mainwin = (MainWindow*)toolbar_item->parent;
-               reply_cb(mainwin, 
-                        prefs_common.reply_with_quote ? COMPOSE_REPLY_TO_LIST_WITH_QUOTE 
-                        : COMPOSE_REPLY_TO_LIST_WITHOUT_QUOTE, 
-                        NULL);
-               break;
-       case TOOLBAR_MSGVIEW:
-               msgview = (MessageView*)toolbar_item->parent;
-               compose_reply(msgview->msginfo,
-                             prefs_common.reply_with_quote ? COMPOSE_REPLY_TO_LIST_WITH_QUOTE 
-                             : COMPOSE_REPLY_TO_LIST_WITHOUT_QUOTE,
-                             FALSE, TRUE, FALSE, NULL);
-               break;
-       default:
-               debug_print("toolbar event not supported\n");
-       }
+       toolbar_reply(data, 
+                     prefs_common.reply_with_quote ? COMPOSE_REPLY_TO_LIST_WITH_QUOTE 
+                     : COMPOSE_REPLY_TO_LIST_WITHOUT_QUOTE);
 }
 
 
@@ -1233,30 +1156,9 @@ static void toolbar_reply_to_list_cb(GtkWidget *widget, gpointer data)
  */ 
 static void toolbar_reply_to_sender_cb(GtkWidget *widget, gpointer data)
 {
-       ToolbarItem *toolbar_item = (ToolbarItem*)data;
-       MainWindow *mainwin;
-       MessageView *msgview;
-
-       g_return_if_fail(toolbar_item != NULL);
-
-       switch (toolbar_item->type) {
-       case TOOLBAR_MAIN:
-               mainwin = (MainWindow*)toolbar_item->parent;
-               reply_cb(mainwin, 
-                        prefs_common.reply_with_quote ? COMPOSE_REPLY_TO_SENDER_WITH_QUOTE 
-                        : COMPOSE_REPLY_TO_SENDER_WITHOUT_QUOTE, 
-                        NULL);
-               break;
-       case TOOLBAR_MSGVIEW:
-               msgview = (MessageView*)toolbar_item->parent;
-               compose_reply(msgview->msginfo,
-                             prefs_common.reply_with_quote ? COMPOSE_REPLY_TO_SENDER_WITH_QUOTE 
-                             : COMPOSE_REPLY_TO_SENDER_WITHOUT_QUOTE,
-                             FALSE, FALSE, FALSE, NULL);
-               break;
-       default:
-               debug_print("toolbar event not supported\n\n");
-       }
+       toolbar_reply(data, 
+                     prefs_common.reply_with_quote ? COMPOSE_REPLY_TO_SENDER_WITH_QUOTE 
+                     : COMPOSE_REPLY_TO_SENDER_WITHOUT_QUOTE);
 }
 
 /*
@@ -1289,30 +1191,7 @@ static void toolbar_addrbook_cb(GtkWidget *widget, gpointer data)
  */
 static void toolbar_forward_cb(GtkWidget *widget, gpointer data)
 {
-       ToolbarItem *toolbar_item = (ToolbarItem*)data;
-       MainWindow *mainwin = get_mainwin(data);
-       
-       g_return_if_fail(toolbar_item != NULL);
-
-       switch (toolbar_item->type) {
-       case TOOLBAR_MAIN:
-               mainwin = (MainWindow*)toolbar_item->parent;
-               if (prefs_common.forward_as_attachment)
-                       reply_cb(mainwin, COMPOSE_FORWARD_AS_ATTACH, NULL);
-               else
-                       reply_cb(mainwin, COMPOSE_FORWARD, NULL);
-               break;
-               
-       case TOOLBAR_MSGVIEW:
-               if (prefs_common.forward_as_attachment)
-                       reply_cb(mainwin, COMPOSE_FORWARD_AS_ATTACH, NULL);
-               else
-                       reply_cb(mainwin, COMPOSE_FORWARD, NULL);
-               break;
-               
-       default:
-               debug_print("toolbar event not supported\n");
-       }
+       toolbar_reply(data, COMPOSE_FORWARD);
 }
 
 
@@ -2072,13 +1951,149 @@ void delete_msgview_cb(gpointer data, guint action, GtkWidget *widget)
        }       
 }
 
-void reply_cb(gpointer data, guint action, GtkWidget *widget)
+void toolbar_reply(gpointer data, guint action)
 {
-       MainWindow *mainwin = (MainWindow*)data;
+       ToolbarItem *toolbar_item = (ToolbarItem*)data;
+       MainWindow *mainwin;
+       MessageView *msgview;
+       SummaryView *summaryview;
+       GList *sel = NULL;
+       MsgInfo *msginfo = NULL;
+       gchar *text;
+       gchar *path;
 
-       g_return_if_fail(mainwin != NULL);
+       switch (toolbar_item->type) {
+       case TOOLBAR_MAIN:
+               mainwin = (MainWindow*)toolbar_item->parent;
+               summaryview = mainwin->summaryview;
+               msginfo = gtk_ctree_node_get_row_data(GTK_CTREE(summaryview->ctree),
+                                                     summaryview->selected);
+               msgview = mainwin->summaryview->messageview;
+               sel = GTK_CLIST(summaryview->ctree)->selection;
+               break;
+       case TOOLBAR_MSGVIEW:
+               msgview = (MessageView*)toolbar_item->parent;
+               summaryview = msgview->mainwin->summaryview;
+               msginfo = msgview->msginfo;
+               break;
+       default:
+               break;
+       }
+
+       if (!msginfo) return;
 
-       summary_reply(mainwin->summaryview, (ComposeMode)action);
+       text = gtkut_editable_get_selection
+               (GTK_EDITABLE(msgview->textview->text));
+       
+       if (!text && msgview->type == MVIEW_MIME
+           && msgview->mimeview->type == MIMEVIEW_TEXT
+           && msgview->mimeview->textview
+           && !msgview->mimeview->textview->default_text) {
+               text = gtkut_editable_get_selection 
+                       (GTK_EDITABLE(msgview->mimeview->textview->text));   
+       }
+
+       switch (action) {
+       case COMPOSE_REPLY:
+               compose_reply(msginfo, prefs_common.reply_with_quote,
+                             FALSE, prefs_common.default_reply_list, FALSE, text);
+               break;
+       case COMPOSE_REPLY_WITH_QUOTE:
+               compose_reply(msginfo, TRUE, FALSE, prefs_common.default_reply_list, FALSE, text);
+               break;
+       case COMPOSE_REPLY_WITHOUT_QUOTE:
+               compose_reply(msginfo, FALSE, FALSE, prefs_common.default_reply_list, FALSE, NULL);
+               break;
+       case COMPOSE_REPLY_TO_SENDER:
+               compose_reply(msginfo, prefs_common.reply_with_quote,
+                             FALSE, FALSE, TRUE, text);
+               break;
+       case COMPOSE_FOLLOWUP_AND_REPLY_TO:
+               compose_followup_and_reply_to(msginfo,
+                                             prefs_common.reply_with_quote,
+                                             FALSE, FALSE, text);
+               break;
+       case COMPOSE_REPLY_TO_SENDER_WITH_QUOTE:
+               compose_reply(msginfo, TRUE, FALSE, FALSE, TRUE, text);
+               break;
+       case COMPOSE_REPLY_TO_SENDER_WITHOUT_QUOTE:
+               compose_reply(msginfo, FALSE, FALSE, FALSE, TRUE, NULL);
+               break;
+       case COMPOSE_REPLY_TO_ALL:
+               compose_reply(msginfo, prefs_common.reply_with_quote,
+                             TRUE, FALSE, FALSE, text);
+               break;
+       case COMPOSE_REPLY_TO_ALL_WITH_QUOTE:
+               compose_reply(msginfo, TRUE, TRUE, FALSE, FALSE, text);
+               break;
+       case COMPOSE_REPLY_TO_ALL_WITHOUT_QUOTE:
+               compose_reply(msginfo, FALSE, TRUE, FALSE, FALSE, NULL);
+               break;
+       case COMPOSE_REPLY_TO_LIST:
+               compose_reply(msginfo, prefs_common.reply_with_quote,
+                             FALSE, TRUE, FALSE, text);
+               break;
+       case COMPOSE_REPLY_TO_LIST_WITH_QUOTE:
+               compose_reply(msginfo, TRUE, FALSE, TRUE, FALSE, text);
+               break;
+       case COMPOSE_REPLY_TO_LIST_WITHOUT_QUOTE:
+               compose_reply(msginfo, FALSE, FALSE, TRUE, FALSE, NULL);
+               break;
+       case COMPOSE_FORWARD:
+               if (prefs_common.forward_as_attachment) {
+                       toolbar_reply(data, COMPOSE_FORWARD_AS_ATTACH);
+                       return;
+               } else {
+                       toolbar_reply(data, COMPOSE_FORWARD_INLINE);
+                       return;
+               }
+               break;
+       case COMPOSE_FORWARD_INLINE:
+               /* check if we reply to more than one Message */
+               if (sel && !sel->next && toolbar_item->type == TOOLBAR_MAIN) {
+                               compose_forward(NULL, msginfo, FALSE, text);
+                               break;
+               } else if (sel == NULL && toolbar_item->type == TOOLBAR_MSGVIEW) {
+                       compose_forward(NULL, msginfo, FALSE, text);
+                       break;
+               }
+               /* more messages FALL THROUGH */
+       case COMPOSE_FORWARD_AS_ATTACH:
+               {
+                       GSList *msginfo_list = NULL;
+                       /* check if we reply to more than one Message */
+                       if (sel != 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)));
+                       } else {
+                               /* invoked from messageview */
+                               msginfo_list = g_slist_append(msginfo_list, msginfo);
+                       }
+                       
+                       compose_forward_multiple(NULL, msginfo_list);
+                       g_slist_free(msginfo_list);
+
+               }                       
+               break;
+       case COMPOSE_REDIRECT:
+               compose_redirect(NULL, msginfo);
+               break;
+       default:
+               g_warning("toolbar_reply(): invalid action: %d\n", action);
+       }
+       
+       summary_set_marks_selected(summaryview);
+
+       g_free(text);   
+}
+
+
+void reply_cb(gpointer data, guint action, GtkWidget *widget)
+{
+       toolbar_reply(data, action);
 }
 
 void inc_mail_cb(gpointer data, guint action, GtkWidget *widget)
index dcd205d34094be5962e034775fec33168c235325..26742083024cc3abeb6e83cb5a736d8e1c9758f6 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
- * Copyright (C) 1999-2002 Hiroyuki Yamamoto
+ * Copyright (C) 2001-2003 Hiroyuki Yamamoto and the Sylpheed-Claws team
  *
  * 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
@@ -195,10 +195,10 @@ void      toolbar_comp_set_sensitive      (gpointer        data,
                                         gboolean        sensitive);
 
 /* invoked by mainwindow entries and toolbar actions */
-void   delete_msgview_cb               (gpointer        data, 
-                                        guint           action, 
+void   reply_cb                        (gpointer        data, 
+                                        guint           action, 
                                         GtkWidget      *widget);
-void   reply_cb                        (gpointer        data, 
+void   delete_msgview_cb               (gpointer        data, 
                                         guint           action, 
                                         GtkWidget      *widget);
 void   inc_mail_cb                     (gpointer        data,
@@ -230,5 +230,6 @@ void        toolbar_set_style               (GtkWidget      *toolbar_wid,
                                         guint           action);
 void   toolbar_destroy                 (Toolbar        *toolbar);
 void   toolbar_init                    (Toolbar        *toolbar);
-                                           
+void   toolbar_reply                   (gpointer        data, 
+                                        guint           action);
 #endif /* __CUSTOM_TOOLBAR_H__ */