diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2011-11-23 07:22:14 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2011-11-23 09:43:04 +0800 |
commit | e64d6fe05c30c2cc1d7625a202afba3ba2da07cd (patch) | |
tree | f99df204ecdd5629acdc9f7e7b00d1c0d7903d6d /shell/e-shell-settings.c | |
parent | 2e60b6a4a21105bb4a1e2badd1be51b3e684d165 (diff) | |
download | gsoc2013-evolution-e64d6fe05c30c2cc1d7625a202afba3ba2da07cd.tar.gz gsoc2013-evolution-e64d6fe05c30c2cc1d7625a202afba3ba2da07cd.tar.zst gsoc2013-evolution-e64d6fe05c30c2cc1d7625a202afba3ba2da07cd.zip |
Miscellaneous cleanups.
Diffstat (limited to 'shell/e-shell-settings.c')
-rw-r--r-- | shell/e-shell-settings.c | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/shell/e-shell-settings.c b/shell/e-shell-settings.c index 11d8eca3ad..a46123f325 100644 --- a/shell/e-shell-settings.c +++ b/shell/e-shell-settings.c @@ -31,6 +31,10 @@ #include "e-shell-settings.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; @@ -42,7 +46,7 @@ static gpointer parent_class; static GParamSpec * shell_settings_pspec_for_key (const gchar *property_name, - const gchar *schema, + const gchar *schema, const gchar *key) { GSettings *settings; @@ -138,7 +142,7 @@ shell_settings_set_property (GObject *object, EShellSettingsPrivate *priv; GValue *dest_value; - priv = E_SHELL_SETTINGS (object)->priv; + priv = E_SHELL_SETTINGS_GET_PRIVATE (object); dest_value = &g_array_index ( priv->value_array, GValue, property_id - 1); @@ -166,7 +170,7 @@ shell_settings_get_property (GObject *object, EShellSettingsPrivate *priv; GValue *src_value; - priv = E_SHELL_SETTINGS (object)->priv; + priv = E_SHELL_SETTINGS_GET_PRIVATE (object); src_value = &g_array_index ( priv->value_array, GValue, property_id - 1); @@ -180,7 +184,7 @@ shell_settings_finalize (GObject *object) EShellSettingsPrivate *priv; guint ii; - priv = E_SHELL_SETTINGS (object)->priv; + priv = E_SHELL_SETTINGS_GET_PRIVATE (object); for (ii = 0; ii < priv->value_array->len; ii++) g_value_unset (&g_array_index (priv->value_array, GValue, ii)); @@ -218,8 +222,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 = G_TYPE_INSTANCE_GET_PRIVATE ( - shell_settings, E_TYPE_SHELL_SETTINGS, EShellSettingsPrivate); + shell_settings->priv = E_SHELL_SETTINGS_GET_PRIVATE (shell_settings); shell_settings->priv->value_array = value_array; g_object_freeze_notify (G_OBJECT (shell_settings)); @@ -338,7 +341,7 @@ e_shell_settings_install_property (GParamSpec *pspec) **/ void e_shell_settings_install_property_for_key (const gchar *property_name, - const gchar *schema, + const gchar *schema, const gchar *key) { GParamSpec *pspec; |