diff options
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; |