aboutsummaryrefslogtreecommitdiffstats
path: root/shell/test/e-test-shell-view.c
diff options
context:
space:
mode:
Diffstat (limited to 'shell/test/e-test-shell-view.c')
-rw-r--r--shell/test/e-test-shell-view.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/shell/test/e-test-shell-view.c b/shell/test/e-test-shell-view.c
index 825e27fa37..68d4ff9a7b 100644
--- a/shell/test/e-test-shell-view.c
+++ b/shell/test/e-test-shell-view.c
@@ -24,6 +24,10 @@
#include "shell/e-shell-content.h"
#include "shell/e-shell-sidebar.h"
+#define E_TEST_SHELL_VIEW_GET_PRIVATE(obj) \
+ (G_TYPE_INSTANCE_GET_PRIVATE \
+ ((obj), E_TYPE_TEST_SHELL_VIEW, ETestShellViewPrivate))
+
struct _ETestShellViewPrivate {
EActivity *activity;
};
@@ -49,7 +53,7 @@ test_shell_view_dispose (GObject *object)
{
ETestShellViewPrivate *priv;
- priv = E_TEST_SHELL_VIEW (object)->priv;
+ priv = E_TEST_SHELL_VIEW_GET_PRIVATE (object);
if (priv->activity != NULL) {
e_activity_set_state (priv->activity, E_ACTIVITY_COMPLETED);
@@ -76,7 +80,7 @@ test_shell_view_constructed (GObject *object)
/* Chain up to parent's constructed() method. */
G_OBJECT_CLASS (parent_class)->constructed (object);
- priv = E_TEST_SHELL_VIEW (object)->priv;
+ priv = E_TEST_SHELL_VIEW_GET_PRIVATE (object);
shell_view = E_SHELL_VIEW (object);
shell_backend = e_shell_view_get_shell_backend (shell_view);
@@ -123,9 +127,8 @@ test_shell_view_class_init (ETestShellViewClass *class,
static void
test_shell_view_init (ETestShellView *test_shell_view)
{
- test_shell_view->priv = G_TYPE_INSTANCE_GET_PRIVATE (
- test_shell_view, E_TYPE_TEST_SHELL_VIEW,
- ETestShellViewPrivate);
+ test_shell_view->priv =
+ E_TEST_SHELL_VIEW_GET_PRIVATE (test_shell_view);
}
GType