diff options
author | Milan Crha <mcrha@redhat.com> | 2011-02-25 23:20:41 +0800 |
---|---|---|
committer | Rodrigo Moya <rodrigo@gnome-db.org> | 2011-06-30 00:41:39 +0800 |
commit | c003c99a75587ba39a45d164272760c33f9666b5 (patch) | |
tree | ad6d0583fa9e8f078fb1c118f994371d2f1f79d8 /widgets/misc/e-web-view-preview.c | |
parent | f55aaa5e00a40a137f403a8d5c68dd508059b0b4 (diff) | |
download | gsoc2013-evolution-c003c99a75587ba39a45d164272760c33f9666b5.tar gsoc2013-evolution-c003c99a75587ba39a45d164272760c33f9666b5.tar.gz gsoc2013-evolution-c003c99a75587ba39a45d164272760c33f9666b5.tar.bz2 gsoc2013-evolution-c003c99a75587ba39a45d164272760c33f9666b5.tar.lz gsoc2013-evolution-c003c99a75587ba39a45d164272760c33f9666b5.tar.xz gsoc2013-evolution-c003c99a75587ba39a45d164272760c33f9666b5.tar.zst gsoc2013-evolution-c003c99a75587ba39a45d164272760c33f9666b5.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 ()); |