From c003c99a75587ba39a45d164272760c33f9666b5 Mon Sep 17 00:00:00 2001 From: Milan Crha Date: Fri, 25 Feb 2011 16:20:41 +0100 Subject: Bug #614480 - Avoid using G_TYPE_INSTANCE_GET_PRIVATE repeatedly --- mail/em-format-html-display.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'mail/em-format-html-display.c') diff --git a/mail/em-format-html-display.c b/mail/em-format-html-display.c index 24f8aa5638..fc1281cfc8 100644 --- a/mail/em-format-html-display.c +++ b/mail/em-format-html-display.c @@ -64,10 +64,6 @@ #define d(x) -#define EM_FORMAT_HTML_DISPLAY_GET_PRIVATE(obj) \ - (G_TYPE_INSTANCE_GET_PRIVATE \ - ((obj), EM_TYPE_FORMAT_HTML_DISPLAY, EMFormatHTMLDisplayPrivate)) - struct _EMFormatHTMLDisplayPrivate { GtkWidget *attachment_view; /* weak reference */ }; @@ -626,7 +622,7 @@ efhd_init (EMFormatHTMLDisplay *efhd) web_view = em_format_html_get_web_view (EM_FORMAT_HTML (efhd)); - efhd->priv = EM_FORMAT_HTML_DISPLAY_GET_PRIVATE (efhd); + efhd->priv = G_TYPE_INSTANCE_GET_PRIVATE (efhd, EM_TYPE_FORMAT_HTML_DISPLAY, EMFormatHTMLDisplayPrivate); e_mail_display_set_formatter ( E_MAIL_DISPLAY (web_view), EM_FORMAT_HTML (efhd)); @@ -907,7 +903,7 @@ efhd_bar_resize (EMFormatHTML *efh, GtkWidget *widget; gint width; - priv = EM_FORMAT_HTML_DISPLAY_GET_PRIVATE (efh); + priv = EM_FORMAT_HTML_DISPLAY (efh)->priv; web_view = em_format_html_get_web_view (efh); @@ -933,7 +929,7 @@ efhd_add_bar (EMFormatHTML *efh, if (!EM_IS_FORMAT_HTML_DISPLAY (efh)) return FALSE; - priv = EM_FORMAT_HTML_DISPLAY_GET_PRIVATE (efh); + priv = EM_FORMAT_HTML_DISPLAY (efh)->priv; widget = e_mail_attachment_bar_new (); gtk_container_add (GTK_CONTAINER (eb), widget); -- cgit v1.2.3