aboutsummaryrefslogtreecommitdiffstats
path: root/shell/test
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2011-12-08 04:25:02 +0800
committerMatthew Barnes <mbarnes@redhat.com>2011-12-08 11:11:21 +0800
commita01525c9316b13153cb00fa99cdc587e3ce7c350 (patch)
tree8053b4a68ca33a68cb8123f0a703c003184fa8d0 /shell/test
parent8927e9d2e0d2bfc0f0a2cc7821d2ef8658e8670f (diff)
downloadgsoc2013-evolution-a01525c9316b13153cb00fa99cdc587e3ce7c350.tar
gsoc2013-evolution-a01525c9316b13153cb00fa99cdc587e3ce7c350.tar.gz
gsoc2013-evolution-a01525c9316b13153cb00fa99cdc587e3ce7c350.tar.bz2
gsoc2013-evolution-a01525c9316b13153cb00fa99cdc587e3ce7c350.tar.lz
gsoc2013-evolution-a01525c9316b13153cb00fa99cdc587e3ce7c350.tar.xz
gsoc2013-evolution-a01525c9316b13153cb00fa99cdc587e3ce7c350.tar.zst
gsoc2013-evolution-a01525c9316b13153cb00fa99cdc587e3ce7c350.zip
Miscellaneous EShellView-related cleanups.
Diffstat (limited to 'shell/test')
-rw-r--r--shell/test/e-test-shell-backend.c8
-rw-r--r--shell/test/e-test-shell-view.c13
2 files changed, 8 insertions, 13 deletions
diff --git a/shell/test/e-test-shell-backend.c b/shell/test/e-test-shell-backend.c
index 79f4aa876f..0d97308c48 100644
--- a/shell/test/e-test-shell-backend.c
+++ b/shell/test/e-test-shell-backend.c
@@ -28,10 +28,6 @@
#include "e-test-shell-view.h"
-struct _ETestShellBackendPrivate {
- gint placeholder;
-};
-
static gpointer parent_class;
static GType test_shell_backend_type;
@@ -159,7 +155,6 @@ test_shell_backend_class_init (ETestShellBackendClass *class)
EShellBackendClass *shell_backend_class;
parent_class = g_type_class_peek_parent (class);
- g_type_class_add_private (class, sizeof (ETestShellBackendPrivate));
object_class = G_OBJECT_CLASS (class);
object_class->constructed = test_shell_backend_constructed;
@@ -178,9 +173,6 @@ test_shell_backend_class_init (ETestShellBackendClass *class)
static void
test_shell_backend_init (ETestShellBackend *test_shell_backend)
{
- test_shell_backend->priv = G_TYPE_INSTANCE_GET_PRIVATE (
- test_shell_backend, E_TYPE_TEST_SHELL_BACKEND,
- ETestShellBackendPrivate);
}
GType
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