aboutsummaryrefslogtreecommitdiffstats
path: root/modules/addressbook
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2011-11-23 09:48:44 +0800
committerMatthew Barnes <mbarnes@redhat.com>2011-11-23 09:48:44 +0800
commit9918361aef9ad1360a0ed3a240cc58d6cd9e30f8 (patch)
tree50bf24934b5ab3fefcc27913d1855a27c75e6d40 /modules/addressbook
parentfa1bb9a17e11cf12ce02d9b49bba2753f6020ea0 (diff)
parente64d6fe05c30c2cc1d7625a202afba3ba2da07cd (diff)
downloadgsoc2013-evolution-9918361aef9ad1360a0ed3a240cc58d6cd9e30f8.tar
gsoc2013-evolution-9918361aef9ad1360a0ed3a240cc58d6cd9e30f8.tar.gz
gsoc2013-evolution-9918361aef9ad1360a0ed3a240cc58d6cd9e30f8.tar.bz2
gsoc2013-evolution-9918361aef9ad1360a0ed3a240cc58d6cd9e30f8.tar.lz
gsoc2013-evolution-9918361aef9ad1360a0ed3a240cc58d6cd9e30f8.tar.xz
gsoc2013-evolution-9918361aef9ad1360a0ed3a240cc58d6cd9e30f8.tar.zst
gsoc2013-evolution-9918361aef9ad1360a0ed3a240cc58d6cd9e30f8.zip
Merge branch 'wip/gsettings'
Diffstat (limited to 'modules/addressbook')
-rw-r--r--modules/addressbook/autocompletion-config.c8
-rw-r--r--modules/addressbook/e-book-shell-backend.c9
-rw-r--r--modules/addressbook/e-book-shell-content.c18
-rw-r--r--modules/addressbook/e-book-shell-settings.c11
-rw-r--r--modules/addressbook/e-book-shell-view-actions.c18
-rw-r--r--modules/addressbook/e-book-shell-view-private.c4
6 files changed, 32 insertions, 36 deletions
diff --git a/modules/addressbook/autocompletion-config.c b/modules/addressbook/autocompletion-config.c
index 52a9195b44..985eafaff5 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;
}
diff --git a/modules/addressbook/e-book-shell-backend.c b/modules/addressbook/e-book-shell-backend.c
index 92341e4a3f..ab21d689fa 100644
--- a/modules/addressbook/e-book-shell-backend.c
+++ b/modules/addressbook/e-book-shell-backend.c
@@ -245,11 +245,10 @@ action_contact_new_cb (GtkAction *action,
{
EShell *shell;
EShellBackend *shell_backend;
- GConfClient *client;
+ GSettings *settings;
ESourceList *source_list;
ESource *source = NULL;
const gchar *action_name;
- const gchar *key;
gchar *uid;
/* This callback is used for both contacts and contact lists. */
@@ -260,9 +259,9 @@ action_contact_new_cb (GtkAction *action,
g_object_get (shell_backend, "source-list", &source_list, NULL);
g_return_if_fail (E_IS_SOURCE_LIST (source_list));
- client = e_shell_get_gconf_client (shell);
- key = "/apps/evolution/addressbook/display/primary_addressbook";
- uid = gconf_client_get_string (client, key, NULL);
+ settings = g_settings_new ("org.gnome.evolution.addressbook");
+ uid = g_settings_get_string (settings, "primary-addressbook");
+ g_object_unref (settings);
if (uid != NULL) {
source = e_source_list_peek_source_by_uid (source_list, uid);
diff --git a/modules/addressbook/e-book-shell-content.c b/modules/addressbook/e-book-shell-content.c
index e8f2afd83b..f4c3d74784 100644
--- a/modules/addressbook/e-book-shell-content.c
+++ b/modules/addressbook/e-book-shell-content.c
@@ -28,7 +28,6 @@
#include <glib/gi18n.h>
#include "e-util/e-selection.h"
-#include "e-util/gconf-bridge.h"
#include "shell/e-shell-utils.h"
#include "widgets/misc/e-paned.h"
#include "widgets/misc/e-preview-pane.h"
@@ -82,23 +81,18 @@ book_shell_content_restore_state_cb (EShellWindow *shell_window,
EShellContent *shell_content)
{
EBookShellContentPrivate *priv;
- GConfBridge *bridge;
- GObject *object;
- const gchar *key;
+ GSettings *settings;
priv = E_BOOK_SHELL_CONTENT (shell_content)->priv;
- /* Bind GObject properties to GConf keys. */
+ /* Bind GObject properties to GSettings keys. */
- bridge = gconf_bridge_get ();
+ settings = g_settings_new ("org.gnome.evolution.addressbook");
- object = G_OBJECT (priv->paned);
- key = "/apps/evolution/addressbook/display/hpane_position";
- gconf_bridge_bind_property_delayed (bridge, key, object, "hposition");
+ g_settings_bind (settings, "hpane-position", priv->paned, "hposition", G_SETTINGS_BIND_DEFAULT);
+ g_settings_bind (settings, "vpane-position", priv->paned, "vposition", G_SETTINGS_BIND_DEFAULT);
- object = G_OBJECT (priv->paned);
- key = "/apps/evolution/addressbook/display/vpane_position";
- gconf_bridge_bind_property_delayed (bridge, key, object, "vposition");
+ g_object_unref (settings);
}
static GtkOrientation
diff --git a/modules/addressbook/e-book-shell-settings.c b/modules/addressbook/e-book-shell-settings.c
index ae2e4f0adf..22e40a6485 100644
--- a/modules/addressbook/e-book-shell-settings.c
+++ b/modules/addressbook/e-book-shell-settings.c
@@ -25,18 +25,23 @@
#include "e-book-shell-settings.h"
+#define ADDRESSBOOK_SCHEMA "org.gnome.evolution.addressbook"
+
void
e_book_shell_backend_init_settings (EShell *shell)
{
e_shell_settings_install_property_for_key (
"book-completion-show-address",
- "/apps/evolution/addressbook/completion/show_address");
+ ADDRESSBOOK_SCHEMA,
+ "completion-show-address");
e_shell_settings_install_property_for_key (
"book-primary-selection",
- "/apps/evolution/addressbook/display/primary_addressbook");
+ ADDRESSBOOK_SCHEMA,
+ "primary-addressbook");
e_shell_settings_install_property_for_key (
"enable-address-formatting",
- "/apps/evolution/addressbook/display/address_formatting");
+ ADDRESSBOOK_SCHEMA,
+ "address-formatting");
}
diff --git a/modules/addressbook/e-book-shell-view-actions.c b/modules/addressbook/e-book-shell-view-actions.c
index a6aebe08a2..73736052ff 100644
--- a/modules/addressbook/e-book-shell-view-actions.c
+++ b/modules/addressbook/e-book-shell-view-actions.c
@@ -1147,10 +1147,9 @@ e_book_shell_view_actions_init (EBookShellView *book_shell_view)
EPreviewPane *preview_pane;
EWebView *web_view;
GtkActionGroup *action_group;
- GConfBridge *bridge;
+ GSettings *settings;
GtkAction *action;
GObject *object;
- const gchar *key;
shell_view = E_SHELL_VIEW (book_shell_view);
shell_window = e_shell_view_get_shell_window (shell_view);
@@ -1206,21 +1205,20 @@ e_book_shell_view_actions_init (EBookShellView *book_shell_view)
action_group, lockdown_save_to_disk_popup_entries,
G_N_ELEMENTS (lockdown_save_to_disk_popup_entries));
- /* Bind GObject properties to GConf keys. */
+ /* Bind GObject properties to GSettings keys. */
- bridge = gconf_bridge_get ();
+ settings = g_settings_new ("org.gnome.evolution.addressbook");
object = G_OBJECT (ACTION (CONTACT_PREVIEW));
- key = "/apps/evolution/addressbook/display/show_preview";
- gconf_bridge_bind_property (bridge, key, object, "active");
+ g_settings_bind (settings, "show-preview", object, "active", G_SETTINGS_BIND_DEFAULT);
object = G_OBJECT (ACTION (CONTACT_VIEW_VERTICAL));
- key = "/apps/evolution/addressbook/display/layout";
- gconf_bridge_bind_property (bridge, key, object, "current-value");
+ g_settings_bind (settings, "layout", object, "current-value", G_SETTINGS_BIND_DEFAULT);
object = G_OBJECT (ACTION (CONTACT_PREVIEW_SHOW_MAPS));
- key = "/apps/evolution/addressbook/display/preview_show_maps";
- gconf_bridge_bind_property (bridge, key, object, "active");
+ g_settings_bind (settings, "preview-show-maps", object, "active", G_SETTINGS_BIND_DEFAULT);
+
+ g_object_unref (settings);
/* Fine tuning. */
diff --git a/modules/addressbook/e-book-shell-view-private.c b/modules/addressbook/e-book-shell-view-private.c
index b1895c4fb8..cb0cf60ab2 100644
--- a/modules/addressbook/e-book-shell-view-private.c
+++ b/modules/addressbook/e-book-shell-view-private.c
@@ -185,8 +185,8 @@ contacts_removed (EBookShellView *book_shell_view,
static void
model_query_changed_cb (EBookShellView *book_shell_view,
- GParamSpec *param,
- EAddressbookModel *model)
+ GParamSpec *param,
+ EAddressbookModel *model)
{
EBookShellContent *book_shell_content;
EAddressbookView *current_view;