aboutsummaryrefslogtreecommitdiffstats
path: root/modules/addressbook/autocompletion-config.c
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2013-03-03 23:03:50 +0800
committerMatthew Barnes <mbarnes@redhat.com>2013-03-17 20:49:12 +0800
commit23b89997658a8eb8bd2e1d9d20234a6978880aae (patch)
tree752c37bbf0b9d7c3bbf36d6a155533525c307f4a /modules/addressbook/autocompletion-config.c
parent09b7686c4a2a359aa8f747719932ccbf12c3103b (diff)
downloadgsoc2013-evolution-23b89997658a8eb8bd2e1d9d20234a6978880aae.tar
gsoc2013-evolution-23b89997658a8eb8bd2e1d9d20234a6978880aae.tar.gz
gsoc2013-evolution-23b89997658a8eb8bd2e1d9d20234a6978880aae.tar.bz2
gsoc2013-evolution-23b89997658a8eb8bd2e1d9d20234a6978880aae.tar.lz
gsoc2013-evolution-23b89997658a8eb8bd2e1d9d20234a6978880aae.tar.xz
gsoc2013-evolution-23b89997658a8eb8bd2e1d9d20234a6978880aae.tar.zst
gsoc2013-evolution-23b89997658a8eb8bd2e1d9d20234a6978880aae.zip
Remove EBookShellSettings.
EShellSettings predates GSettings and is no longer necessary. GSettings allows binding GObject properties to GSettings keys, with optional mapping functions. That fulfills the purpose of EShellSettings.
Diffstat (limited to 'modules/addressbook/autocompletion-config.c')
-rw-r--r--modules/addressbook/autocompletion-config.c24
1 files changed, 11 insertions, 13 deletions
diff --git a/modules/addressbook/autocompletion-config.c b/modules/addressbook/autocompletion-config.c
index 49aca305df..ebccce1ee2 100644
--- a/modules/addressbook/autocompletion-config.c
+++ b/modules/addressbook/autocompletion-config.c
@@ -65,7 +65,7 @@ add_section (GtkWidget *container,
GtkWidget *
autocompletion_config_new (EPreferencesWindow *window)
{
- EShellSettings *shell_settings;
+ GSettings *settings;
ESourceRegistry *registry;
GtkWidget *container;
GtkWidget *itembox;
@@ -74,11 +74,9 @@ autocompletion_config_new (EPreferencesWindow *window)
EShell *shell;
shell = e_preferences_window_get_shell (window);
-
- g_return_val_if_fail (E_IS_SHELL (shell), NULL);
-
registry = e_shell_get_registry (shell);
- shell_settings = e_shell_get_shell_settings (shell);
+
+ settings = g_settings_new ("org.gnome.evolution.addressbook");
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 12);
gtk_widget_show (vbox);
@@ -96,11 +94,10 @@ autocompletion_config_new (EPreferencesWindow *window)
widget = gtk_check_button_new_with_mnemonic (
_("_Format address according to standard of its destination country"));
- g_object_bind_property (
- shell_settings, "enable-address-formatting",
+ g_settings_bind (
+ settings, "address-formatting",
widget, "active",
- G_BINDING_BIDIRECTIONAL |
- G_BINDING_SYNC_CREATE);
+ G_SETTINGS_BIND_DEFAULT);
gtk_box_pack_start (GTK_BOX (itembox), widget, FALSE, FALSE, 0);
gtk_widget_show (widget);
@@ -108,11 +105,10 @@ autocompletion_config_new (EPreferencesWindow *window)
widget = gtk_check_button_new_with_mnemonic (
_("Always _show address of the autocompleted contact"));
- g_object_bind_property (
- shell_settings, "book-completion-show-address",
+ g_settings_bind (
+ settings, "completion-show-address",
widget, "active",
- G_BINDING_BIDIRECTIONAL |
- G_BINDING_SYNC_CREATE);
+ G_SETTINGS_BIND_DEFAULT);
gtk_box_pack_start (GTK_BOX (itembox), widget, FALSE, FALSE, 0);
gtk_widget_show (widget);
@@ -131,5 +127,7 @@ autocompletion_config_new (EPreferencesWindow *window)
gtk_container_add (GTK_CONTAINER (container), widget);
gtk_widget_show (widget);
+ g_object_unref (settings);
+
return vbox;
}