diff options
author | Milan Crha <mcrha@redhat.com> | 2011-02-25 23:20:41 +0800 |
---|---|---|
committer | Milan Crha <mcrha@redhat.com> | 2011-02-25 23:20:41 +0800 |
commit | 1301cf02efdacd20fb5ce3e2554ae15b8f146e8a (patch) | |
tree | 8d5f3985a82ec7d330af27ee0a29a79a2f0ecfa3 /widgets/misc/e-web-view-preview.c | |
parent | 1a4be6c521d674c4a60e54203521e2721b81b921 (diff) | |
download | gsoc2013-evolution-1301cf02efdacd20fb5ce3e2554ae15b8f146e8a.tar.gz gsoc2013-evolution-1301cf02efdacd20fb5ce3e2554ae15b8f146e8a.tar.zst gsoc2013-evolution-1301cf02efdacd20fb5ce3e2554ae15b8f146e8a.zip |
Bug #614480 - Avoid using G_TYPE_INSTANCE_GET_PRIVATE repeatedly
Diffstat (limited to 'widgets/misc/e-web-view-preview.c')
-rw-r--r-- | widgets/misc/e-web-view-preview.c | 12 |
1 files changed, 3 insertions, 9 deletions
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 <string.h> #include <glib/gi18n-lib.h> -#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 ()); |