[evolution/wip/gsettings: 13/17] Migrate all EABConfig* code to use GSettings
- From: Rodrigo Moya <rodrigo src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution/wip/gsettings: 13/17] Migrate all EABConfig* code to use GSettings
- Date: Fri, 18 Nov 2011 09:04:45 +0000 (UTC)
commit 4efe4a85d96b9f0c330beb5489c8924f67cdca9f
Author: Rodrigo Moya <rodrigo gnome-db org>
Date: Thu Nov 17 16:04:11 2011 +0100
Migrate all EABConfig* code to use GSettings
addressbook/gui/widgets/eab-config.c | 12 ++++++------
addressbook/gui/widgets/eab-config.h | 5 ++---
modules/addressbook/autocompletion-config.c | 8 ++++----
3 files changed, 12 insertions(+), 13 deletions(-)
---
diff --git a/addressbook/gui/widgets/eab-config.c b/addressbook/gui/widgets/eab-config.c
index e1a0501..6974df2 100644
--- a/addressbook/gui/widgets/eab-config.c
+++ b/addressbook/gui/widgets/eab-config.c
@@ -70,8 +70,8 @@ ecp_target_free (EConfig *ec,
case EAB_CONFIG_TARGET_PREFS: {
EABConfigTargetPrefs *s = (EABConfigTargetPrefs *) t;
- if (s->gconf)
- g_object_unref (s->gconf);
+ if (s->settings)
+ g_object_unref (s->settings);
break; }
}
@@ -163,15 +163,15 @@ eab_config_target_new_source (EABConfig *ecp,
EABConfigTargetPrefs *
eab_config_target_new_prefs (EABConfig *ecp,
- GConfClient *gconf)
+ GSettings *settings)
{
EABConfigTargetPrefs *t = e_config_target_new (
&ecp->config, EAB_CONFIG_TARGET_PREFS, sizeof (*t));
- if (gconf)
- t->gconf = g_object_ref (gconf);
+ if (settings)
+ t->settings = g_object_ref (settings);
else
- t->gconf = NULL;
+ t->settings = NULL;
return t;
}
diff --git a/addressbook/gui/widgets/eab-config.h b/addressbook/gui/widgets/eab-config.h
index 7002336..ee99f64 100644
--- a/addressbook/gui/widgets/eab-config.h
+++ b/addressbook/gui/widgets/eab-config.h
@@ -24,7 +24,6 @@
#ifndef __EAB_CONFIG_H__
#define __EAB_CONFIG_H__
-#include <gconf/gconf-client.h>
#include <libedataserver/e-source.h>
#include "e-util/e-config.h"
@@ -65,8 +64,8 @@ typedef struct _EABConfigTargetPrefs EABConfigTargetPrefs;
struct _EABConfigTargetPrefs {
EConfigTarget target;
- /* preferences are global from gconf */
- GConfClient *gconf;
+ /* preferences are global from GSettings */
+ GSettings *settings;
};
typedef struct _EConfigItem EABConfigItem;
diff --git a/modules/addressbook/autocompletion-config.c b/modules/addressbook/autocompletion-config.c
index 52a9195..985eafa 100644
--- a/modules/addressbook/autocompletion-config.c
+++ b/modules/addressbook/autocompletion-config.c
@@ -266,7 +266,7 @@ autocompletion_config_new (EPreferencesWindow *window)
EShell *shell;
EABConfig *eab;
EABConfigTargetPrefs *target;
- GConfClient *gconf;
+ GSettings *settings;
shell = e_preferences_window_get_shell (window);
@@ -291,14 +291,14 @@ autocompletion_config_new (EPreferencesWindow *window)
l = g_slist_prepend (l, &acc_items[ii]);
e_config_add_items ((EConfig *) eab, l, acc_free, shell);
- gconf = gconf_client_get_default ();
+ settings = g_settings_new ("org.gnome.evolution.addressbook");
- target = eab_config_target_new_prefs (eab, gconf);
+ target = eab_config_target_new_prefs (eab, settings);
e_config_set_target ((EConfig *) eab, (EConfigTarget *) target);
toplevel = e_config_create_widget ((EConfig *) eab);
gtk_box_pack_start (GTK_BOX (vbox), toplevel, TRUE, TRUE, 0);
- g_object_unref (gconf);
+ g_object_unref (settings);
return vbox;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]