[gnome-settings-daemon] a11y-keyboard: Port to GSettings
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-settings-daemon] a11y-keyboard: Port to GSettings
- Date: Mon, 14 Nov 2011 10:26:20 +0000 (UTC)
commit 70681e04525d4770c8868e0419e0e6c65d5d16b4
Author: Bastien Nocera <hadess hadess net>
Date: Mon Nov 14 10:19:28 2011 +0000
a11y-keyboard: Port to GSettings
Metacity was ported to GSettings, so we can port this piece of
code to it as well.
https://bugzilla.gnome.org/show_bug.cgi?id=631502
.../a11y-keyboard/gsd-a11y-preferences-dialog.c | 12 +++++-------
1 files changed, 5 insertions(+), 7 deletions(-)
---
diff --git a/plugins/a11y-keyboard/gsd-a11y-preferences-dialog.c b/plugins/a11y-keyboard/gsd-a11y-preferences-dialog.c
index adb7ffa..a757022 100644
--- a/plugins/a11y-keyboard/gsd-a11y-preferences-dialog.c
+++ b/plugins/a11y-keyboard/gsd-a11y-preferences-dialog.c
@@ -31,8 +31,6 @@
#include <gio/gio.h>
#include <gtk/gtk.h>
-#include <gconf/gconf-client.h>
-
#include "gsd-a11y-preferences-dialog.h"
#define SM_DBUS_NAME "org.gnome.SessionManager"
@@ -62,8 +60,8 @@
#define DPI_FACTOR_LARGEST 2.0
#define KEY_GTK_THEME "gtk-theme"
-#define KEY_METACITY_THEME "/apps/metacity/general/theme"
#define KEY_ICON_THEME "icon-theme"
+#define KEY_METACITY_THEME "theme"
#define HIGH_CONTRAST_THEME "HighContrast"
@@ -204,11 +202,11 @@ config_get_high_contrast (GsdA11yPreferencesDialog *dialog)
static void
config_set_high_contrast (gboolean enabled)
{
- GConfClient *client;
GSettings *settings;
+ GSettings *wm_settings;
- client = gconf_client_get_default ();
settings = g_settings_new ("org.gnome.desktop.interface");
+ wm_settings = g_settings_new ("org.gnome.desktop.wm.preferences");
if (enabled) {
g_settings_set_string (settings, KEY_GTK_THEME, HIGH_CONTRAST_THEME);
@@ -217,11 +215,11 @@ config_set_high_contrast (gboolean enabled)
} else {
g_settings_reset (settings, KEY_GTK_THEME);
g_settings_reset (settings, KEY_ICON_THEME);
- gconf_client_unset (client, KEY_METACITY_THEME, NULL);
+ g_settings_reset (wm_settings, KEY_METACITY_THEME);
}
- g_object_unref (client);
g_object_unref (settings);
+ g_object_unref (wm_settings);
}
static gboolean
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]