aboutsummaryrefslogtreecommitdiffstats
path: root/shell/e-shell-settings.c
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2011-02-25 23:20:41 +0800
committerRodrigo Moya <rodrigo@gnome-db.org>2011-06-30 00:41:39 +0800
commitc003c99a75587ba39a45d164272760c33f9666b5 (patch)
treead6d0583fa9e8f078fb1c118f994371d2f1f79d8 /shell/e-shell-settings.c
parentf55aaa5e00a40a137f403a8d5c68dd508059b0b4 (diff)
downloadgsoc2013-evolution-c003c99a75587ba39a45d164272760c33f9666b5.tar.gz
gsoc2013-evolution-c003c99a75587ba39a45d164272760c33f9666b5.tar.zst
gsoc2013-evolution-c003c99a75587ba39a45d164272760c33f9666b5.zip
Bug #614480 - Avoid using G_TYPE_INSTANCE_GET_PRIVATE repeatedly
Diffstat (limited to 'shell/e-shell-settings.c')
-rw-r--r--shell/e-shell-settings.c12
1 files changed, 4 insertions, 8 deletions
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));