From 1301cf02efdacd20fb5ce3e2554ae15b8f146e8a 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 --- widgets/misc/e-web-view-preview.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) (limited to 'widgets/misc/e-web-view-preview.c') diff --git a/widgets/misc/e-web-view-preview.c b/widgets/misc/e-web-view-preview.c index c21fee95db..8e44db729f 100644 --- a/widgets/misc/e-web-view-preview.c +++ b/widgets/misc/e-web-view-preview.c @@ -25,10 +25,6 @@ #include #include -#define E_WEB_VIEW_PREVIEW_GET_PRIVATE(obj) \ - (G_TYPE_INSTANCE_GET_PRIVATE \ - ((obj), E_TYPE_WEB_VIEW_PREVIEW, EWebViewPreviewPrivate)) - struct _EWebViewPreviewPrivate { gboolean escape_values; GString *updating_content; /* is NULL when not between begin_update/end_update */ @@ -97,7 +93,7 @@ web_view_preview_dispose (GObject *object) { EWebViewPreviewPrivate *priv; - priv = E_WEB_VIEW_PREVIEW_GET_PRIVATE (object); + priv = E_WEB_VIEW_PREVIEW (object)->priv; if (priv->updating_content != NULL) { g_string_free (priv->updating_content, TRUE); @@ -172,11 +168,9 @@ static void e_web_view_preview_init (EWebViewPreview *preview) { GtkWidget *tree_view_sw, *web_view_sw; - EWebViewPreviewPrivate *priv; - priv = E_WEB_VIEW_PREVIEW_GET_PRIVATE (preview); - preview->priv = priv; - priv->escape_values = TRUE; + preview->priv = G_TYPE_INSTANCE_GET_PRIVATE (preview, E_TYPE_WEB_VIEW_PREVIEW, EWebViewPreviewPrivate); + preview->priv->escape_values = TRUE; tree_view_sw = in_scrolled_window (gtk_tree_view_new ()); web_view_sw = in_scrolled_window (e_web_view_new ()); -- cgit v1.2.3