aboutsummaryrefslogtreecommitdiffstats
path: root/shell
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2011-02-25 23:20:41 +0800
committerMilan Crha <mcrha@redhat.com>2011-02-25 23:20:41 +0800
commit1301cf02efdacd20fb5ce3e2554ae15b8f146e8a (patch)
tree8d5f3985a82ec7d330af27ee0a29a79a2f0ecfa3 /shell
parent1a4be6c521d674c4a60e54203521e2721b81b921 (diff)
downloadgsoc2013-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')
-rw-r--r--shell/e-shell-backend.c10
-rw-r--r--shell/e-shell-content.c20
-rw-r--r--shell/e-shell-searchbar.c8
-rw-r--r--shell/e-shell-settings.c12
-rw-r--r--shell/e-shell-sidebar.c16
-rw-r--r--shell/e-shell-switcher.c18
-rw-r--r--shell/e-shell-taskbar.c10
-rw-r--r--shell/e-shell-view.c10
-rw-r--r--shell/e-shell-window-private.h4
-rw-r--r--shell/e-shell-window.c2
-rw-r--r--shell/e-shell.c10
-rw-r--r--shell/test/e-test-shell-backend.c7
-rw-r--r--shell/test/e-test-shell-view.c11
13 files changed, 44 insertions, 94 deletions
diff --git a/shell/e-shell-backend.c b/shell/e-shell-backend.c
index c2abb470a2..cd672842f1 100644
--- a/shell/e-shell-backend.c
+++ b/shell/e-shell-backend.c
@@ -37,10 +37,6 @@
#include "e-shell.h"
#include "e-shell-view.h"
-#define E_SHELL_BACKEND_GET_PRIVATE(obj) \
- (G_TYPE_INSTANCE_GET_PRIVATE \
- ((obj), E_TYPE_SHELL_BACKEND, EShellBackendPrivate))
-
struct _EShellBackendPrivate {
/* We keep a reference to corresponding EShellView subclass
@@ -171,7 +167,7 @@ shell_backend_dispose (GObject *object)
{
EShellBackendPrivate *priv;
- priv = E_SHELL_BACKEND_GET_PRIVATE (object);
+ priv = E_SHELL_BACKEND (object)->priv;
if (priv->shell_view_class != NULL) {
g_type_class_unref (priv->shell_view_class);
@@ -187,7 +183,7 @@ shell_backend_finalize (GObject *object)
{
EShellBackendPrivate *priv;
- priv = E_SHELL_BACKEND_GET_PRIVATE (object);
+ priv = E_SHELL_BACKEND (object)->priv;
g_warn_if_fail (g_queue_is_empty (priv->activities));
g_queue_free (priv->activities);
@@ -294,7 +290,7 @@ e_shell_backend_class_init (EShellBackendClass *class)
static void
e_shell_backend_init (EShellBackend *shell_backend)
{
- shell_backend->priv = E_SHELL_BACKEND_GET_PRIVATE (shell_backend);
+ shell_backend->priv = G_TYPE_INSTANCE_GET_PRIVATE (shell_backend, E_TYPE_SHELL_BACKEND, EShellBackendPrivate);
shell_backend->priv->activities = g_queue_new ();
}
diff --git a/shell/e-shell-content.c b/shell/e-shell-content.c
index 5b53fb5334..96e56f75a9 100644
--- a/shell/e-shell-content.c
+++ b/shell/e-shell-content.c
@@ -44,10 +44,6 @@
#include "e-shell-view.h"
#include "e-shell-window-actions.h"
-#define E_SHELL_CONTENT_GET_PRIVATE(obj) \
- (G_TYPE_INSTANCE_GET_PRIVATE \
- ((obj), E_TYPE_SHELL_CONTENT, EShellContentPrivate))
-
struct _EShellContentPrivate {
gpointer shell_view; /* weak pointer */
@@ -150,7 +146,7 @@ shell_content_dispose (GObject *object)
{
EShellContentPrivate *priv;
- priv = E_SHELL_CONTENT_GET_PRIVATE (object);
+ priv = E_SHELL_CONTENT (object)->priv;
if (priv->shell_view != NULL) {
g_object_remove_weak_pointer (
@@ -172,7 +168,7 @@ shell_content_finalize (GObject *object)
{
EShellContentPrivate *priv;
- priv = E_SHELL_CONTENT_GET_PRIVATE (object);
+ priv = E_SHELL_CONTENT (object)->priv;
g_free (priv->user_filename);
@@ -222,7 +218,7 @@ shell_content_get_preferred_width (GtkWidget *widget,
gint child_min, child_nat;
GtkWidget *child;
- priv = E_SHELL_CONTENT_GET_PRIVATE (widget);
+ priv = E_SHELL_CONTENT (widget)->priv;
*minimum = *natural = 0;
@@ -250,7 +246,7 @@ shell_content_get_preferred_height (GtkWidget *widget,
gint min, nat;
GtkWidget *child;
- priv = E_SHELL_CONTENT_GET_PRIVATE (widget);
+ priv = E_SHELL_CONTENT (widget)->priv;
child = gtk_bin_get_child (GTK_BIN (widget));
gtk_widget_get_preferred_height (child, minimum, natural);
@@ -273,7 +269,7 @@ shell_content_size_allocate (GtkWidget *widget,
GtkWidget *child;
gint remaining_height;
- priv = E_SHELL_CONTENT_GET_PRIVATE (widget);
+ priv = E_SHELL_CONTENT (widget)->priv;
remaining_height = allocation->height;
gtk_widget_set_allocation (widget, allocation);
@@ -332,7 +328,7 @@ shell_content_remove (GtkContainer *container,
GtkContainerClass *container_class;
EShellContentPrivate *priv;
- priv = E_SHELL_CONTENT_GET_PRIVATE (container);
+ priv = E_SHELL_CONTENT (container)->priv;
if (widget == priv->alert_bar) {
gtk_widget_unparent (priv->alert_bar);
@@ -359,7 +355,7 @@ shell_content_forall (GtkContainer *container,
{
EShellContentPrivate *priv;
- priv = E_SHELL_CONTENT_GET_PRIVATE (container);
+ priv = E_SHELL_CONTENT (container)->priv;
if (priv->alert_bar != NULL)
callback (priv->alert_bar, callback_data);
@@ -470,7 +466,7 @@ e_shell_content_alert_sink_init (EAlertSinkInterface *interface)
static void
e_shell_content_init (EShellContent *shell_content)
{
- shell_content->priv = E_SHELL_CONTENT_GET_PRIVATE (shell_content);
+ shell_content->priv = G_TYPE_INSTANCE_GET_PRIVATE (shell_content, E_TYPE_SHELL_CONTENT, EShellContentPrivate);
gtk_widget_set_has_window (GTK_WIDGET (shell_content), FALSE);
}
diff --git a/shell/e-shell-searchbar.c b/shell/e-shell-searchbar.c
index 4b7dc88ae2..97349f9b89 100644
--- a/shell/e-shell-searchbar.c
+++ b/shell/e-shell-searchbar.c
@@ -37,10 +37,6 @@
#include "e-shell-window-actions.h"
-#define E_SHELL_SEARCHBAR_GET_PRIVATE(obj) \
- (G_TYPE_INSTANCE_GET_PRIVATE \
- ((obj), E_TYPE_SHELL_SEARCHBAR, EShellSearchbarPrivate))
-
#define SEARCH_OPTION_ADVANCED (-1)
/* Default "state key file" group: [Search Bar] */
@@ -631,7 +627,7 @@ shell_searchbar_dispose (GObject *object)
{
EShellSearchbarPrivate *priv;
- priv = E_SHELL_SEARCHBAR_GET_PRIVATE (object);
+ priv = E_SHELL_SEARCHBAR (object)->priv;
if (priv->shell_view != NULL) {
g_object_remove_weak_pointer (
@@ -913,7 +909,7 @@ e_shell_searchbar_init (EShellSearchbar *searchbar)
GtkLabel *label;
GtkWidget *widget;
- searchbar->priv = E_SHELL_SEARCHBAR_GET_PRIVATE (searchbar);
+ searchbar->priv = G_TYPE_INSTANCE_GET_PRIVATE (searchbar, E_TYPE_SHELL_SEARCHBAR, EShellSearchbarPrivate);
gtk_box_set_spacing (GTK_BOX (searchbar), 24);
diff --git a/shell/e-shell-settings.c b/shell/e-shell-settings.c
index 9503f967f7..c8a507e630 100644
--- a/shell/e-shell-settings.c
+++ b/shell/e-shell-settings.c
@@ -29,10 +29,6 @@
#include "e-util/gconf-bridge.h"
-#define E_SHELL_SETTINGS_GET_PRIVATE(obj) \
- (G_TYPE_INSTANCE_GET_PRIVATE \
- ((obj), E_TYPE_SHELL_SETTINGS, EShellSettingsPrivate))
-
struct _EShellSettingsPrivate {
GArray *value_array;
guint debug : 1;
@@ -180,7 +176,7 @@ shell_settings_set_property (GObject *object,
EShellSettingsPrivate *priv;
GValue *dest_value;
- priv = E_SHELL_SETTINGS_GET_PRIVATE (object);
+ priv = E_SHELL_SETTINGS (object)->priv;
dest_value = &g_array_index (
priv->value_array, GValue, property_id - 1);
@@ -208,7 +204,7 @@ shell_settings_get_property (GObject *object,
EShellSettingsPrivate *priv;
GValue *src_value;
- priv = E_SHELL_SETTINGS_GET_PRIVATE (object);
+ priv = E_SHELL_SETTINGS (object)->priv;
src_value = &g_array_index (
priv->value_array, GValue, property_id - 1);
@@ -222,7 +218,7 @@ shell_settings_finalize (GObject *object)
EShellSettingsPrivate *priv;
guint ii;
- priv = E_SHELL_SETTINGS_GET_PRIVATE (object);
+ priv = E_SHELL_SETTINGS (object)->priv;
for (ii = 0; ii < priv->value_array->len; ii++)
g_value_unset (&g_array_index (priv->value_array, GValue, ii));
@@ -260,7 +256,7 @@ shell_settings_init (EShellSettings *shell_settings,
value_array = g_array_new (FALSE, TRUE, sizeof (GValue));
g_array_set_size (value_array, property_count);
- shell_settings->priv = E_SHELL_SETTINGS_GET_PRIVATE (shell_settings);
+ shell_settings->priv = G_TYPE_INSTANCE_GET_PRIVATE (shell_settings, E_TYPE_SHELL_SETTINGS, EShellSettingsPrivate);
shell_settings->priv->value_array = value_array;
g_object_freeze_notify (G_OBJECT (shell_settings));
diff --git a/shell/e-shell-sidebar.c b/shell/e-shell-sidebar.c
index ed5567e406..1a9f7d7c22 100644
--- a/shell/e-shell-sidebar.c
+++ b/shell/e-shell-sidebar.c
@@ -31,10 +31,6 @@
#include <e-util/e-unicode.h>
#include <shell/e-shell-view.h>
-#define E_SHELL_SIDEBAR_GET_PRIVATE(obj) \
- (G_TYPE_INSTANCE_GET_PRIVATE \
- ((obj), E_TYPE_SHELL_SIDEBAR, EShellSidebarPrivate))
-
struct _EShellSidebarPrivate {
gpointer shell_view; /* weak pointer */
@@ -149,7 +145,7 @@ shell_sidebar_dispose (GObject *object)
{
EShellSidebarPrivate *priv;
- priv = E_SHELL_SIDEBAR_GET_PRIVATE (object);
+ priv = E_SHELL_SIDEBAR (object)->priv;
if (priv->shell_view != NULL) {
g_object_remove_weak_pointer (
@@ -176,7 +172,7 @@ shell_sidebar_finalize (GObject *object)
{
EShellSidebarPrivate *priv;
- priv = E_SHELL_SIDEBAR_GET_PRIVATE (object);
+ priv = E_SHELL_SIDEBAR (object)->priv;
g_free (priv->icon_name);
g_free (priv->primary_text);
@@ -241,7 +237,7 @@ shell_sidebar_get_preferred_height (GtkWidget *widget,
gint child_min, child_nat;
GtkWidget *child;
- priv = E_SHELL_SIDEBAR_GET_PRIVATE (widget);
+ priv = E_SHELL_SIDEBAR (widget)->priv;
child = gtk_bin_get_child (GTK_BIN (widget));
gtk_widget_get_preferred_height (child, minimum, natural);
@@ -262,7 +258,7 @@ shell_sidebar_size_allocate (GtkWidget *widget,
GtkRequisition child_requisition;
GtkWidget *child;
- priv = E_SHELL_SIDEBAR_GET_PRIVATE (widget);
+ priv = E_SHELL_SIDEBAR (widget)->priv;
gtk_widget_set_allocation (widget, allocation);
@@ -293,7 +289,7 @@ shell_sidebar_forall (GtkContainer *container,
{
EShellSidebarPrivate *priv;
- priv = E_SHELL_SIDEBAR_GET_PRIVATE (container);
+ priv = E_SHELL_SIDEBAR (container)->priv;
if (include_internals && callback && priv->event_box)
callback (priv->event_box, callback_data);
@@ -401,7 +397,7 @@ e_shell_sidebar_init (EShellSidebar *shell_sidebar)
const GdkColor *color;
const gchar *icon_name;
- shell_sidebar->priv = E_SHELL_SIDEBAR_GET_PRIVATE (shell_sidebar);
+ shell_sidebar->priv = G_TYPE_INSTANCE_GET_PRIVATE (shell_sidebar, E_TYPE_SHELL_SIDEBAR, EShellSidebarPrivate);
gtk_widget_set_has_window (GTK_WIDGET (shell_sidebar), FALSE);
diff --git a/shell/e-shell-switcher.c b/shell/e-shell-switcher.c
index f785054c08..b1d896dee0 100644
--- a/shell/e-shell-switcher.c
+++ b/shell/e-shell-switcher.c
@@ -30,10 +30,6 @@
#include <glib/gi18n.h>
#include <e-util/e-extensible.h>
-#define E_SHELL_SWITCHER_GET_PRIVATE(obj) \
- (G_TYPE_INSTANCE_GET_PRIVATE \
- ((obj), E_TYPE_SHELL_SWITCHER, EShellSwitcherPrivate))
-
#define H_PADDING 6
#define V_PADDING 6
@@ -235,7 +231,7 @@ shell_switcher_dispose (GObject *object)
{
EShellSwitcherPrivate *priv;
- priv = E_SHELL_SWITCHER_GET_PRIVATE (object);
+ priv = E_SHELL_SWITCHER (object)->priv;
while (priv->proxies != NULL) {
GtkWidget *widget = priv->proxies->data;
@@ -255,7 +251,7 @@ shell_switcher_get_preferred_width (GtkWidget *widget,
GtkWidget *child;
GList *iter;
- priv = E_SHELL_SWITCHER_GET_PRIVATE (widget);
+ priv = E_SHELL_SWITCHER (widget)->priv;
*minimum = *natural = 0;
@@ -290,7 +286,7 @@ shell_switcher_get_preferred_height (GtkWidget *widget,
GtkWidget *child;
GList *iter;
- priv = E_SHELL_SWITCHER_GET_PRIVATE (widget);
+ priv = E_SHELL_SWITCHER (widget)->priv;
*minimum = *natural = 0;
@@ -351,7 +347,7 @@ shell_switcher_screen_changed (GtkWidget *widget,
EShellSwitcherPrivate *priv;
GtkSettings *settings;
- priv = E_SHELL_SWITCHER_GET_PRIVATE (widget);
+ priv = E_SHELL_SWITCHER (widget)->priv;
if (gtk_widget_has_screen (widget))
settings = gtk_widget_get_settings (widget);
@@ -386,7 +382,7 @@ shell_switcher_remove (GtkContainer *container,
EShellSwitcherPrivate *priv;
GList *link;
- priv = E_SHELL_SWITCHER_GET_PRIVATE (container);
+ priv = E_SHELL_SWITCHER (container)->priv;
/* Look in the internal widgets first. */
@@ -413,7 +409,7 @@ shell_switcher_forall (GtkContainer *container,
{
EShellSwitcherPrivate *priv;
- priv = E_SHELL_SWITCHER_GET_PRIVATE (container);
+ priv = E_SHELL_SWITCHER (container)->priv;
if (include_internals)
g_list_foreach (
@@ -551,7 +547,7 @@ e_shell_switcher_class_init (EShellSwitcherClass *class)
static void
e_shell_switcher_init (EShellSwitcher *switcher)
{
- switcher->priv = E_SHELL_SWITCHER_GET_PRIVATE (switcher);
+ switcher->priv = G_TYPE_INSTANCE_GET_PRIVATE (switcher, E_TYPE_SHELL_SWITCHER, EShellSwitcherPrivate);
gtk_widget_set_has_window (GTK_WIDGET (switcher), FALSE);
diff --git a/shell/e-shell-taskbar.c b/shell/e-shell-taskbar.c
index 8b8cc1d4a7..f4621fc780 100644
--- a/shell/e-shell-taskbar.c
+++ b/shell/e-shell-taskbar.c
@@ -32,10 +32,6 @@
#include <e-util/e-extensible.h>
#include <misc/e-activity-proxy.h>
-#define E_SHELL_TASKBAR_GET_PRIVATE(obj) \
- (G_TYPE_INSTANCE_GET_PRIVATE \
- ((obj), E_TYPE_SHELL_TASKBAR, EShellTaskbarPrivate))
-
struct _EShellTaskbarPrivate {
gpointer shell_view; /* weak pointer */
@@ -202,7 +198,7 @@ shell_taskbar_dispose (GObject *object)
{
EShellTaskbarPrivate *priv;
- priv = E_SHELL_TASKBAR_GET_PRIVATE (object);
+ priv = E_SHELL_TASKBAR (object)->priv;
g_hash_table_foreach_remove (
priv->proxy_table, (GHRFunc)
@@ -241,7 +237,7 @@ shell_taskbar_finalize (GObject *object)
{
EShellTaskbarPrivate *priv;
- priv = E_SHELL_TASKBAR_GET_PRIVATE (object);
+ priv = E_SHELL_TASKBAR (object)->priv;
g_hash_table_destroy (priv->proxy_table);
@@ -330,7 +326,7 @@ e_shell_taskbar_init (EShellTaskbar *shell_taskbar)
GtkWidget *widget;
gint height;
- shell_taskbar->priv = E_SHELL_TASKBAR_GET_PRIVATE (shell_taskbar);
+ shell_taskbar->priv = G_TYPE_INSTANCE_GET_PRIVATE (shell_taskbar, E_TYPE_SHELL_TASKBAR, EShellTaskbarPrivate);
shell_taskbar->priv->proxy_table = g_hash_table_new (NULL, NULL);
gtk_box_set_spacing (GTK_BOX (shell_taskbar), 12);
diff --git a/shell/e-shell-view.c b/shell/e-shell-view.c
index 6911b54f59..379b5ab528 100644
--- a/shell/e-shell-view.c
+++ b/shell/e-shell-view.c
@@ -41,10 +41,6 @@
#include "e-shell-searchbar.h"
#include "e-shell-window-actions.h"
-#define E_SHELL_VIEW_GET_PRIVATE(obj) \
- (G_TYPE_INSTANCE_GET_PRIVATE \
- ((obj), E_TYPE_SHELL_VIEW, EShellViewPrivate))
-
#define SIMPLE_SEARCHBAR_WIDTH 300
#define STATE_SAVE_TIMEOUT_SECONDS 3
@@ -498,7 +494,7 @@ shell_view_dispose (GObject *object)
{
EShellViewPrivate *priv;
- priv = E_SHELL_VIEW_GET_PRIVATE (object);
+ priv = E_SHELL_VIEW (object)->priv;
/* Expedite any pending state saves. */
if (priv->state_save_timeout_id > 0) {
@@ -555,7 +551,7 @@ shell_view_finalize (GObject *object)
{
EShellViewPrivate *priv;
- priv = E_SHELL_VIEW_GET_PRIVATE (object);
+ priv = E_SHELL_VIEW (object)->priv;
g_key_file_free (priv->state_key_file);
@@ -1082,7 +1078,7 @@ e_shell_view_init (EShellView *shell_view,
size_group = gtk_size_group_new (GTK_SIZE_GROUP_VERTICAL);
- shell_view->priv = E_SHELL_VIEW_GET_PRIVATE (shell_view);
+ shell_view->priv = G_TYPE_INSTANCE_GET_PRIVATE (shell_view, E_TYPE_SHELL_VIEW, EShellViewPrivate);
shell_view->priv->state_key_file = g_key_file_new ();
shell_view->priv->size_group = size_group;
}
diff --git a/shell/e-shell-window-private.h b/shell/e-shell-window-private.h
index 3faf3be50c..6a9744d971 100644
--- a/shell/e-shell-window-private.h
+++ b/shell/e-shell-window-private.h
@@ -49,10 +49,6 @@
#include <e-shell-window-actions.h>
#include <e-shell-utils.h>
-#define E_SHELL_WINDOW_GET_PRIVATE(obj) \
- (G_TYPE_INSTANCE_GET_PRIVATE \
- ((obj), E_TYPE_SHELL_WINDOW, EShellWindowPrivate))
-
/* Shorthand, requires a variable named "shell_window". */
#define ACTION(name) \
(E_SHELL_WINDOW_ACTION_##name (shell_window))
diff --git a/shell/e-shell-window.c b/shell/e-shell-window.c
index 25986f07a7..c62bd6411a 100644
--- a/shell/e-shell-window.c
+++ b/shell/e-shell-window.c
@@ -947,7 +947,7 @@ e_shell_window_alert_sink_init (EAlertSinkInterface *interface)
static void
e_shell_window_init (EShellWindow *shell_window)
{
- shell_window->priv = E_SHELL_WINDOW_GET_PRIVATE (shell_window);
+ shell_window->priv = G_TYPE_INSTANCE_GET_PRIVATE (shell_window, E_TYPE_SHELL_WINDOW, EShellWindowPrivate);
e_shell_window_private_init (shell_window);
}
diff --git a/shell/e-shell.c b/shell/e-shell.c
index 6e37e7e533..79ca26cb1c 100644
--- a/shell/e-shell.c
+++ b/shell/e-shell.c
@@ -42,10 +42,6 @@
#include "e-shell-window.h"
#include "e-shell-utils.h"
-#define E_SHELL_GET_PRIVATE(obj) \
- (G_TYPE_INSTANCE_GET_PRIVATE \
- ((obj), E_TYPE_SHELL, EShellPrivate))
-
struct _EShellPrivate {
GQueue alerts;
GList *watched_windows;
@@ -639,7 +635,7 @@ shell_dispose (GObject *object)
EShellPrivate *priv;
EAlert *alert;
- priv = E_SHELL_GET_PRIVATE (object);
+ priv = E_SHELL (object)->priv;
while ((alert = g_queue_pop_head (&priv->alerts)) != NULL) {
g_signal_handlers_disconnect_by_func (
@@ -682,7 +678,7 @@ shell_finalize (GObject *object)
{
EShellPrivate *priv;
- priv = E_SHELL_GET_PRIVATE (object);
+ priv = E_SHELL (object)->priv;
g_hash_table_destroy (priv->backends_by_name);
g_hash_table_destroy (priv->backends_by_scheme);
@@ -1173,7 +1169,7 @@ e_shell_init (EShell *shell)
GtkIconTheme *icon_theme;
EggSMClient *sm_client;
- shell->priv = E_SHELL_GET_PRIVATE (shell);
+ shell->priv = G_TYPE_INSTANCE_GET_PRIVATE (shell, E_TYPE_SHELL, EShellPrivate);
backends_by_name = g_hash_table_new (g_str_hash, g_str_equal);
backends_by_scheme = g_hash_table_new (g_str_hash, g_str_equal);
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