aboutsummaryrefslogtreecommitdiffstats
path: root/modules
diff options
context:
space:
mode:
authorRodrigo Moya <rodrigo@gnome-db.org>2011-11-02 00:40:16 +0800
committerRodrigo Moya <rodrigo@gnome-db.org>2011-11-02 00:40:16 +0800
commit80937eb544e24b51244f3ade02e69fb7a3157920 (patch)
tree5864d85a6133fd5434dc8245ac5bfb7292681765 /modules
parentfa4a42d741fade66d51857fb2653e27e347aef80 (diff)
downloadgsoc2013-evolution-80937eb544e24b51244f3ade02e69fb7a3157920.tar
gsoc2013-evolution-80937eb544e24b51244f3ade02e69fb7a3157920.tar.gz
gsoc2013-evolution-80937eb544e24b51244f3ade02e69fb7a3157920.tar.bz2
gsoc2013-evolution-80937eb544e24b51244f3ade02e69fb7a3157920.tar.lz
gsoc2013-evolution-80937eb544e24b51244f3ade02e69fb7a3157920.tar.xz
gsoc2013-evolution-80937eb544e24b51244f3ade02e69fb7a3157920.tar.zst
gsoc2013-evolution-80937eb544e24b51244f3ade02e69fb7a3157920.zip
Addressbook module GSettings migration
Diffstat (limited to 'modules')
-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-view-actions.c17
3 files changed, 18 insertions, 26 deletions
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-view-actions.c b/modules/addressbook/e-book-shell-view-actions.c
index a6aebe08a2..e967b1141b 100644
--- a/modules/addressbook/e-book-shell-view-actions.c
+++ b/modules/addressbook/e-book-shell-view-actions.c
@@ -1147,7 +1147,7 @@ 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;
@@ -1206,21 +1206,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. */