aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
authorSrinivasa Ragavan <sragavan@src.gnome.org>2007-02-12 14:11:14 +0800
committerSrinivasa Ragavan <sragavan@src.gnome.org>2007-02-12 14:11:14 +0800
commit9862306af9b5019372cbcb6693b5ae1d56297776 (patch)
tree25b7efb0d1b3478601a172e289f0360df96c0f0a /mail
parent0670e0a9070dac6359d34822f7433e9502fc1d22 (diff)
downloadgsoc2013-evolution-9862306af9b5019372cbcb6693b5ae1d56297776.tar.gz
gsoc2013-evolution-9862306af9b5019372cbcb6693b5ae1d56297776.tar.zst
gsoc2013-evolution-9862306af9b5019372cbcb6693b5ae1d56297776.zip
Print migration updates from Ebby Wiselyn.
svn path=/trunk/; revision=33201
Diffstat (limited to 'mail')
-rw-r--r--mail/ChangeLog9
-rw-r--r--mail/em-folder-browser.c2
-rw-r--r--mail/em-folder-view.c16
-rw-r--r--mail/em-format-html-print.c17
4 files changed, 24 insertions, 20 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index a1ca779205..f6139a86ef 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,3 +1,12 @@
+2007-02-12 Srinivasa Ragavan <sragavan@novell.com>
+
+ ** Print migration updates from Ebby Wiselyn
+
+ * em-folder-browser.c:
+ * em-folder-view.c: (emfv_print_response), (em_folder_view_print):
+ * em-format-html-print.c: (efhp_footer_cb), (emfhp_complete),
+ (mail_draw_page):
+
2007-02-10 Duarte Loreto <happyguy_pt@hotmail.com>
* default/pt/Inbox: Updated welcome message to 2.8 version
diff --git a/mail/em-folder-browser.c b/mail/em-folder-browser.c
index e176c27d80..c94baeb759 100644
--- a/mail/em-folder-browser.c
+++ b/mail/em-folder-browser.c
@@ -48,8 +48,6 @@
#undef interface
#endif
-#include <libgnomeprintui/gnome-print-dialog.h>
-
#include "mail-mt.h"
#include "mail-ops.h"
#include "mail-tools.h"
diff --git a/mail/em-folder-view.c b/mail/em-folder-view.c
index a1f24b1c8c..933382d4e1 100644
--- a/mail/em-folder-view.c
+++ b/mail/em-folder-view.c
@@ -44,8 +44,6 @@
#include <libgnome/gnome-url.h>
-#include <libgnomeprintui/gnome-print-dialog.h>
-
#include <gconf/gconf-client.h>
#include <camel/camel-mime-message.h>
@@ -2144,8 +2142,12 @@ emfv_print_response(GtkWidget *w, int resp, struct _print_data *data)
g_object_unref(print);
break;
}
- g_object_unref (data->emfv);
- g_object_unref (data->settings);
+
+ if (w)
+ gtk_widget_destroy (w);
+
+ g_object_unref (data->emfv);
+ g_object_unref (data->settings);
camel_object_unref (data->folder);
g_free (data->uid);
g_free (data);
@@ -2170,7 +2172,7 @@ int em_folder_view_print(EMFolderView *emfv, int preview)
data = g_malloc0(sizeof(*data));
data->emfv = emfv;
g_object_ref(emfv);
- data->settings = e_print_load_config ();
+ data->settings = e_print_load_settings ();
data->preview = preview;
data->folder = emfv->folder;
camel_object_ref(data->folder);
@@ -2179,13 +2181,13 @@ int em_folder_view_print(EMFolderView *emfv, int preview)
if (preview) {
GtkDialog *dialog = (GtkDialog *)e_print_get_dialog_with_config (_("Print Message"),
- GNOME_PRINT_DIALOG_COPIES, data->settings);
+ 0, data->settings);
gtk_dialog_set_default_response (dialog, GTK_RESPONSE_APPLY);
e_dialog_set_transient_for ((GtkWindow *) dialog, (GtkWidget *) emfv);
emfv_print_response(dialog, GTK_RESPONSE_APPLY, data);
} else {
GtkDialog *dialog = (GtkDialog *)e_print_get_dialog_with_config (_("Print Message"),
- GNOME_PRINT_DIALOG_COPIES, data->settings);
+ 0, data->settings);
gtk_dialog_set_default_response (dialog, GTK_RESPONSE_OK);
e_dialog_set_transient_for ((GtkWindow *) dialog, (GtkWidget *) emfv);
emfv_print_response (dialog, GTK_RESPONSE_OK, data);
diff --git a/mail/em-format-html-print.c b/mail/em-format-html-print.c
index 34ddd2fac8..a527ded879 100644
--- a/mail/em-format-html-print.c
+++ b/mail/em-format-html-print.c
@@ -26,10 +26,8 @@
#endif
#include <string.h>
-
#include <libgnomeprint/gnome-print-job.h>
#include <libgnomeprintui/gnome-print-job-preview.h>
-
#include <gtkhtml/gtkhtml.h>
#include <gtk/gtkwindow.h>
@@ -152,9 +150,8 @@ efhp_footer_cb(GtkHTML *html, GtkPrintContext *print_context, double x, double y
cairo_set_font_size (cr, 6);
cairo_show_text (cr, text);
cairo_restore(cr);
- cairo_show_page (cr);
g_free(text);
- info->page_num++;
+ info->page_num++;
}
}
@@ -171,11 +168,12 @@ emfhp_complete(EMFormatHTMLPrint *efhp, void *data)
struct footer_info info;
page_setup = gtk_page_setup_new ();
- paper_size = gtk_paper_size_new ("iso_a4");/*FIXME paper size hard coded */
+ paper_size = gtk_paper_size_new ("iso_a4");/*FIXME paper size hardcoded */
print = gtk_print_operation_new ();
gtk_page_setup_set_paper_size (page_setup, paper_size);
- settings = e_print_load_config ();
+ settings = e_print_load_settings ();
+ gtk_print_operation_set_print_settings (print, settings);
/* running the dialog */
gtk_print_operation_set_default_page_setup (print, page_setup);
gtk_print_operation_set_n_pages (print, 1);
@@ -193,11 +191,9 @@ emfhp_complete(EMFormatHTMLPrint *efhp, void *data)
gtk_print_operation_run (print, GTK_PRINT_OPERATION_ACTION_PRINT_DIALOG, NULL, NULL);
else
gtk_print_operation_run (print, GTK_PRINT_OPERATION_ACTION_PREVIEW, NULL, NULL);
+ settings = gtk_print_operation_get_print_settings (print);
+ e_print_save_settings (settings);
g_object_unref (print);
- g_object_unref (settings);
- g_object_unref (paper_size);
- g_object_unref (page_setup);
- g_object_unref (efhp);
}
static void
@@ -218,7 +214,6 @@ mail_draw_page (GtkPrintOperation *print, GtkPrintContext *context, gint page_nr
} else {
gtk_html_print_page (mdi->efhp->formathtml.html, context);
}
- g_object_unref(mdi->efhp);
}
int em_format_html_print_print(EMFormatHTMLPrint *efhp, EMFormatHTML *source, struct GtkPrintSettings *settings, int preview)