aboutsummaryrefslogtreecommitdiffstats
path: root/mail/em-format-html-print.c
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2010-05-31 22:24:14 +0800
committerMatthew Barnes <mbarnes@redhat.com>2010-06-01 00:01:49 +0800
commit4f01d3d1823fd8d7b53919b03ff44cc46ad92b77 (patch)
tree93b7541b92635862399d7783cb2fed77cee74ef5 /mail/em-format-html-print.c
parent3d9b0002c5802e3d8c3a426221bfb5294691326e (diff)
downloadgsoc2013-evolution-4f01d3d1823fd8d7b53919b03ff44cc46ad92b77.tar
gsoc2013-evolution-4f01d3d1823fd8d7b53919b03ff44cc46ad92b77.tar.gz
gsoc2013-evolution-4f01d3d1823fd8d7b53919b03ff44cc46ad92b77.tar.bz2
gsoc2013-evolution-4f01d3d1823fd8d7b53919b03ff44cc46ad92b77.tar.lz
gsoc2013-evolution-4f01d3d1823fd8d7b53919b03ff44cc46ad92b77.tar.xz
gsoc2013-evolution-4f01d3d1823fd8d7b53919b03ff44cc46ad92b77.tar.zst
gsoc2013-evolution-4f01d3d1823fd8d7b53919b03ff44cc46ad92b77.zip
Keep chipping away at direct GtkHTML usage.
EMFormatHTML now holds a sealed EWebView instead of a public GtkHTML, accessible through em_format_html_get_web_view(). Rename e_mail_reader_get_html_display() to e_mail_reader_get_formatter() and have it return an EMFormatHTML instead of an EMFormatHTMLDisplay, since that's usually the type you want (or else an EMFormat, but never an EMFormatHTMLDisplay).
Diffstat (limited to 'mail/em-format-html-print.c')
-rw-r--r--mail/em-format-html-print.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/mail/em-format-html-print.c b/mail/em-format-html-print.c
index 954254552c..e660602e46 100644
--- a/mail/em-format-html-print.c
+++ b/mail/em-format-html-print.c
@@ -65,16 +65,15 @@ static void
efhp_init (GObject *o)
{
EMFormatHTMLPrint *efhp = (EMFormatHTMLPrint *)o;
- GtkWidget *html = (GtkWidget *)efhp->parent.html;
+ EWebView *web_view;
- /* ?? */
- gtk_widget_set_name(html, "EvolutionMailPrintHTMLWidget");
+ web_view = em_format_html_get_web_view (EM_FORMAT_HTML (efhp));
/* gtk widgets don't like to be realized outside top level widget
so we put new html widget into gtk window */
efhp->window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
- gtk_container_add (GTK_CONTAINER (efhp->window), html);
- gtk_widget_realize (html);
+ gtk_container_add (GTK_CONTAINER (efhp->window), GTK_WIDGET (web_view));
+ gtk_widget_realize (GTK_WIDGET (web_view));
efhp->parent.show_icon = FALSE;
((EMFormat *)efhp)->print = TRUE;
}
@@ -190,12 +189,16 @@ static void
emfhp_complete (EMFormatHTMLPrint *efhp)
{
GtkPrintOperation *operation;
+ EWebView *web_view;
GError *error = NULL;
+ web_view = em_format_html_get_web_view (EM_FORMAT_HTML (efhp));
+
operation = e_print_operation_new ();
gtk_html_print_operation_run (
- efhp->parent.html, operation, efhp->action, NULL,
+ GTK_HTML (web_view),
+ operation, efhp->action, NULL,
(GtkHTMLPrintCalcHeight) NULL,
(GtkHTMLPrintCalcHeight) efhp_calc_footer_height,
(GtkHTMLPrintDrawFunc) NULL,