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 /shell/test | |
parent | 1a4be6c521d674c4a60e54203521e2721b81b921 (diff) | |
download | gsoc2013-evolution-1301cf02efdacd20fb5ce3e2554ae15b8f146e8a.tar gsoc2013-evolution-1301cf02efdacd20fb5ce3e2554ae15b8f146e8a.tar.gz gsoc2013-evolution-1301cf02efdacd20fb5ce3e2554ae15b8f146e8a.tar.bz2 gsoc2013-evolution-1301cf02efdacd20fb5ce3e2554ae15b8f146e8a.tar.lz gsoc2013-evolution-1301cf02efdacd20fb5ce3e2554ae15b8f146e8a.tar.xz gsoc2013-evolution-1301cf02efdacd20fb5ce3e2554ae15b8f146e8a.tar.zst gsoc2013-evolution-1301cf02efdacd20fb5ce3e2554ae15b8f146e8a.zip |
Bug #614480 - Avoid using G_TYPE_INSTANCE_GET_PRIVATE repeatedly
Diffstat (limited to 'shell/test')
-rw-r--r-- | shell/test/e-test-shell-backend.c | 7 | ||||
-rw-r--r-- | shell/test/e-test-shell-view.c | 11 |
2 files changed, 4 insertions, 14 deletions
diff --git a/shell/test/e-test-shell-backend.c b/shell/test/e-test-shell-backend.c index 983b40e8d9..9e5f757490 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" -#define E_TEST_SHELL_BACKEND_GET_PRIVATE(obj) \ - (G_TYPE_INSTANCE_GET_PRIVATE \ - ((obj), E_TYPE_TEST_SHELL_BACKEND, ETestShellBackendPrivate)) - struct _ETestShellBackendPrivate { gint placeholder; }; @@ -182,8 +178,7 @@ test_shell_backend_class_init (ETestShellBackendClass *class) static void test_shell_backend_init (ETestShellBackend *test_shell_backend) { - test_shell_backend->priv = - E_TEST_SHELL_BACKEND_GET_PRIVATE (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 68d4ff9a7b..7080009dd4 100644 --- a/shell/test/e-test-shell-view.c +++ b/shell/test/e-test-shell-view.c @@ -24,10 +24,6 @@ #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; }; @@ -53,7 +49,7 @@ test_shell_view_dispose (GObject *object) { ETestShellViewPrivate *priv; - priv = E_TEST_SHELL_VIEW_GET_PRIVATE (object); + priv = E_TEST_SHELL_VIEW (object)->priv; if (priv->activity != NULL) { e_activity_set_state (priv->activity, E_ACTIVITY_COMPLETED); @@ -80,7 +76,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_GET_PRIVATE (object); + priv = E_TEST_SHELL_VIEW (object)->priv; shell_view = E_SHELL_VIEW (object); shell_backend = e_shell_view_get_shell_backend (shell_view); @@ -127,8 +123,7 @@ test_shell_view_class_init (ETestShellViewClass *class, static void test_shell_view_init (ETestShellView *test_shell_view) { - test_shell_view->priv = - E_TEST_SHELL_VIEW_GET_PRIVATE (test_shell_view); + test_shell_view->priv = G_TYPE_INSTANCE_GET_PRIVATE (test_shell_view, E_TYPE_TEST_SHELL_VIEW, ETestShellViewPrivate); } GType |