aboutsummaryrefslogtreecommitdiffstats
path: root/mail/mail-ops.c
diff options
context:
space:
mode:
authorDan Winship <danw@src.gnome.org>2000-07-01 05:33:54 +0800
committerDan Winship <danw@src.gnome.org>2000-07-01 05:33:54 +0800
commit8a2058e527f0d8311c05cec4f4487468cd167d14 (patch)
tree33166cdc0a76e013fe0237383392613df6f015c6 /mail/mail-ops.c
parenta640827879982297ad569419b88d5ec88e551fd0 (diff)
downloadgsoc2013-evolution-8a2058e527f0d8311c05cec4f4487468cd167d14.tar
gsoc2013-evolution-8a2058e527f0d8311c05cec4f4487468cd167d14.tar.gz
gsoc2013-evolution-8a2058e527f0d8311c05cec4f4487468cd167d14.tar.bz2
gsoc2013-evolution-8a2058e527f0d8311c05cec4f4487468cd167d14.tar.lz
gsoc2013-evolution-8a2058e527f0d8311c05cec4f4487468cd167d14.tar.xz
gsoc2013-evolution-8a2058e527f0d8311c05cec4f4487468cd167d14.tar.zst
gsoc2013-evolution-8a2058e527f0d8311c05cec4f4487468cd167d14.zip
Use gnome-print to do a print preview.
* mail-ops.c (print_msg): Use gnome-print to do a print preview. * folder-browser-factory.c: Hook up "Print" button. svn path=/trunk/; revision=3835
Diffstat (limited to 'mail/mail-ops.c')
-rw-r--r--mail/mail-ops.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/mail/mail-ops.c b/mail/mail-ops.c
index 169566cd99..27ad27a51c 100644
--- a/mail/mail-ops.c
+++ b/mail/mail-ops.c
@@ -26,6 +26,8 @@
#include <config.h>
#include <errno.h>
#include <gnome.h>
+#include <libgnomeprint/gnome-print-master.h>
+#include <libgnomeprint/gnome-print-master-preview.h>
#include "mail.h"
#include "mail-threads.h"
#include "folder-browser.h"
@@ -884,3 +886,22 @@ providers_config (BonoboUIHandler *uih, void *user_data, const char *path)
gtk_widget_show (pc);
}
+void
+print_msg (GtkWidget *button, gpointer user_data)
+{
+ FolderBrowser *fb = user_data;
+ GnomePrintMaster *print_master;
+ GnomePrintContext *print_context;
+ GtkWidget *preview;
+
+ print_master = gnome_print_master_new ();
+
+ print_context = gnome_print_master_get_context (print_master);
+ gtk_html_print (fb->mail_display->html, print_context);
+
+ preview = GTK_WIDGET (gnome_print_master_preview_new (
+ print_master, "Mail Print Preview"));
+ gtk_widget_show (preview);
+
+ gtk_object_unref (GTK_OBJECT (print_master));
+}