2005-01-27 [colin] 1.0.0cvs16
[claws.git] / src / mainwindow.c
index 06b187409d657f7efed3dea8f978badecfbddbe0..498f824ed19d6607b6266112cf35d6b72eb9e086 100644 (file)
@@ -160,6 +160,9 @@ static void import_mbox_cb   (MainWindow    *mainwin,
 static void export_mbox_cb      (MainWindow    *mainwin,
                                  guint          action,
                                  GtkWidget     *widget);
+static void export_list_mbox_cb  (MainWindow   *mainwin, 
+                                 guint          action,
+                                 GtkWidget     *widget);
 static void empty_trash_cb      (MainWindow    *mainwin,
                                  guint          action,
                                  GtkWidget     *widget);
@@ -444,6 +447,8 @@ static GtkItemFactoryEntry mainwin_entries[] =
        {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/_Export selected to mbox file..."), 
+                                               NULL, export_list_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>"},
@@ -1980,6 +1985,7 @@ static void main_window_set_widgets(MainWindow *mainwin, SeparateType type)
                if (prefs_common.folderview_visible)
                        gtk_widget_show(folderwin);
        }
+
        if (type & SEPARATE_MESSAGE) {
                messagewin = gtk_window_new(GTK_WINDOW_TOPLEVEL);
                gtk_window_set_title(GTK_WINDOW(messagewin),
@@ -2350,6 +2356,12 @@ static void export_mbox_cb(MainWindow *mainwin, guint action,
        export_mbox(mainwin->summaryview->folder_item);
 }
 
+static void export_list_mbox_cb(MainWindow *mainwin, guint action,
+                               GtkWidget *widget)
+{
+       summaryview_export_mbox_list(mainwin->summaryview);
+}
+
 static void empty_trash_cb(MainWindow *mainwin, guint action,
                           GtkWidget *widget)
 {
@@ -2443,16 +2455,12 @@ void main_window_reply_cb(MainWindow *mainwin, guint action,
 {
        MessageView *msgview = (MessageView*)mainwin->messageview;
        GSList *msginfo_list = NULL;
-       gchar *body;
 
        g_return_if_fail(msgview != NULL);
 
        msginfo_list = summary_get_selection(mainwin->summaryview);
        g_return_if_fail(msginfo_list != NULL);
-       
-       body = messageview_get_selection(msgview);
-       compose_reply_mode((ComposeMode)action, msginfo_list, body);
-       g_free(body);
+       compose_reply_from_messageview(msgview, msginfo_list, action);
        g_slist_free(msginfo_list);
 }