diff options
Diffstat (limited to 'addressbook')
-rw-r--r-- | addressbook/gui/contact-editor/Makefile.am | 1 | ||||
-rw-r--r-- | addressbook/gui/contact-editor/e-contact-editor.c | 18 | ||||
-rw-r--r-- | addressbook/gui/widgets/eab-config.c | 12 | ||||
-rw-r--r-- | addressbook/gui/widgets/eab-config.h | 7 |
4 files changed, 14 insertions, 24 deletions
diff --git a/addressbook/gui/contact-editor/Makefile.am b/addressbook/gui/contact-editor/Makefile.am index 254af85207..9c1e553400 100644 --- a/addressbook/gui/contact-editor/Makefile.am +++ b/addressbook/gui/contact-editor/Makefile.am @@ -34,6 +34,7 @@ libecontacteditor_la_LIBADD = \ $(top_builddir)/addressbook/gui/merging/libeabbookmerging.la \ $(top_builddir)/addressbook/printing/libecontactprint.la \ $(top_builddir)/widgets/menus/libmenus.la \ + $(EVOLUTION_ADDRESSBOOK_LIBS) \ $(EVOLUTION_DATA_SERVER_LIBS) \ $(GNOME_PLATFORM_LIBS) diff --git a/addressbook/gui/contact-editor/e-contact-editor.c b/addressbook/gui/contact-editor/e-contact-editor.c index 28b5b636fe..9ad6fc0612 100644 --- a/addressbook/gui/contact-editor/e-contact-editor.c +++ b/addressbook/gui/contact-editor/e-contact-editor.c @@ -2302,26 +2302,16 @@ set_address_label (EContact *contact, { gchar *address_label = NULL; gboolean format_address; - GConfClient *client; - GConfValue *value; + GSettings *settings; if (!address) { e_contact_set (contact, field, NULL); return; } - - client = gconf_client_get_default (); - value = gconf_client_get (client, - "/apps/evolution/addressbook/display/address_formatting", NULL); - g_object_unref (client); - - if (value) { - format_address = gconf_value_get_bool (value); - gconf_value_free (value); - } else { - format_address = TRUE; - } + settings = g_settings_new ("org.gnome.evolution.addressbook"); + format_address = g_settings_get_boolean (settings, "address-formatting"); + g_object_unref (settings); if (format_address) { address_label = eab_format_address (contact, diff --git a/addressbook/gui/widgets/eab-config.c b/addressbook/gui/widgets/eab-config.c index e1a0501203..6974df22d1 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 70023360e0..36134c08e7 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; @@ -75,7 +74,7 @@ GType eab_config_get_type (void); EABConfig *eab_config_new (gint type, const gchar *menuid); EABConfigTargetSource *eab_config_target_new_source (EABConfig *ecp, ESource *source); -EABConfigTargetPrefs *eab_config_target_new_prefs (EABConfig *ecp, GConfClient *gconf); +EABConfigTargetPrefs *eab_config_target_new_prefs (EABConfig *ecp, GSettings *settings); G_END_DECLS |