From a07a513dcca1b9a8a90499658a27a528660ade40 Mon Sep 17 00:00:00 2001 From: hiro Date: Thu, 30 Nov 2006 07:44:59 +0000 Subject: implemented printing of MIME part. Code cleanups. git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@1386 ee746299-78ed-0310-b773-934348b2243d --- src/messageview.c | 26 +++----------------------- 1 file changed, 3 insertions(+), 23 deletions(-) (limited to 'src/messageview.c') diff --git a/src/messageview.c b/src/messageview.c index 872a72ab..1b436a71 100644 --- a/src/messageview.c +++ b/src/messageview.c @@ -50,6 +50,7 @@ #include "alertpanel.h" #include "inputdialog.h" #include "manage_window.h" +#include "printing.h" #include "procmsg.h" #include "procheader.h" #include "procmime.h" @@ -753,32 +754,11 @@ static void save_as_cb(gpointer data, guint action, GtkWidget *widget) static void print_cb(gpointer data, guint action, GtkWidget *widget) { MessageView *messageview = (MessageView *)data; - const gchar *cmdline; - gchar *msg; if (!messageview->msginfo) return; - cmdline = prefs_common.print_cmd; - - msg = g_strconcat - (_("The message will be printed with the following command:"), - "\n\n", cmdline ? cmdline : _("(Default print command)"), - NULL); - if (alertpanel(_("Print"), msg, GTK_STOCK_OK, GTK_STOCK_CANCEL, NULL) - != G_ALERTDEFAULT) { - g_free(msg); - return; - } - g_free(msg); - - if (cmdline && str_find_format_times(cmdline, 's') != 1) { - alertpanel_error(_("Print command line is invalid:\n`%s'"), - cmdline); - return; - } - - procmsg_print_message(messageview->msginfo, cmdline, - messageview->textview->show_all_headers); + printing_print_message(messageview->msginfo, + messageview->textview->show_all_headers); } static void close_cb(gpointer data, guint action, GtkWidget *widget) -- cgit v1.2.3