diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2010-03-26 23:05:06 +0800 |
---|---|---|
committer | Michael Meeks <michael.meeks@novell.com> | 2010-04-07 19:23:31 +0800 |
commit | 8f42c1dd8fd57e6cb1275e3322e10005466e9d15 (patch) | |
tree | a06307eb92e21b53b7ce4bcab7a7ca730c8478f9 /mail/e-mail-display.c | |
parent | 52e458fcfc493c4058ee1ab988da550a53ef4137 (diff) | |
download | gsoc2013-evolution-8f42c1dd8fd57e6cb1275e3322e10005466e9d15.tar gsoc2013-evolution-8f42c1dd8fd57e6cb1275e3322e10005466e9d15.tar.gz gsoc2013-evolution-8f42c1dd8fd57e6cb1275e3322e10005466e9d15.tar.bz2 gsoc2013-evolution-8f42c1dd8fd57e6cb1275e3322e10005466e9d15.tar.lz gsoc2013-evolution-8f42c1dd8fd57e6cb1275e3322e10005466e9d15.tar.xz gsoc2013-evolution-8f42c1dd8fd57e6cb1275e3322e10005466e9d15.tar.zst gsoc2013-evolution-8f42c1dd8fd57e6cb1275e3322e10005466e9d15.zip |
Minor EMailReader cleanup.
Add a load_string() method to EWebView. Have EMailDisplay override
load_string() and check that the formatter is not busy before loading
the string. Have EMailReader call e_web_view_load_string() directly
on the EMailDisplay instance, and eliminate update_webview_content().
Diffstat (limited to 'mail/e-mail-display.c')
-rw-r--r-- | mail/e-mail-display.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/mail/e-mail-display.c b/mail/e-mail-display.c index 70789c0d47..9f9569dd8a 100644 --- a/mail/e-mail-display.c +++ b/mail/e-mail-display.c @@ -208,6 +208,22 @@ mail_display_style_set (GtkWidget *widget, } static void +mail_display_load_string (EWebView *web_view, + const gchar *string) +{ + EMailDisplayPrivate *priv; + + priv = E_MAIL_DISPLAY_GET_PRIVATE (web_view); + g_return_if_fail (priv->formatter != NULL); + + if (em_format_busy (EM_FORMAT (priv->formatter))) + return; + + /* Chain up to parent's load_string() method. */ + E_WEB_VIEW_CLASS (parent_class)->load_string (web_view, string); +} + +static void mail_display_url_requested (GtkHTML *html, const gchar *uri, GtkHTMLStream *stream) @@ -270,6 +286,7 @@ mail_display_class_init (EMailDisplayClass *class) { GObjectClass *object_class; GtkWidgetClass *widget_class; + EWebViewClass *web_view_class; GtkHTMLClass *html_class; parent_class = g_type_class_peek_parent (class); @@ -284,6 +301,9 @@ mail_display_class_init (EMailDisplayClass *class) widget_class->realize = mail_display_realize; widget_class->style_set = mail_display_style_set; + web_view_class = E_WEB_VIEW_CLASS (class); + web_view_class->load_string = mail_display_load_string; + html_class = GTK_HTML_CLASS (class); html_class->url_requested = mail_display_url_requested; html_class->link_clicked = mail_display_link_clicked; |