[gnome-desktop] gnome-desktop-utils: Port to gsettings
- From: Carlos Garcia Campos <carlosgc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-desktop] gnome-desktop-utils: Port to gsettings
- Date: Wed, 29 Dec 2010 13:51:15 +0000 (UTC)
commit 29e52a1ac67e2abd5d314f4d5c35841277e27103
Author: Carlos Garcia Campos <carlosgc gnome org>
Date: Tue Dec 28 11:16:21 2010 +0100
gnome-desktop-utils: Port to gsettings
Bug #638169
libgnome-desktop/gnome-desktop-utils.c | 15 ++++++++-------
1 files changed, 8 insertions(+), 7 deletions(-)
---
diff --git a/libgnome-desktop/gnome-desktop-utils.c b/libgnome-desktop/gnome-desktop-utils.c
index e0ec3ab..d9496d2 100644
--- a/libgnome-desktop/gnome-desktop-utils.c
+++ b/libgnome-desktop/gnome-desktop-utils.c
@@ -26,7 +26,6 @@
#include <config.h>
#include <glib.h>
-#include <gconf/gconf-client.h>
#include <glib/gi18n-lib.h>
#define GNOME_DESKTOP_USE_UNSTABLE_API
@@ -57,7 +56,7 @@ gnome_desktop_prepend_terminal_to_vector (int *argc, char ***argv)
int i, j;
char **term_argv = NULL;
int term_argc = 0;
- GConfClient *client;
+ GSettings *settings;
gchar *terminal = NULL;
@@ -81,14 +80,14 @@ gnome_desktop_prepend_terminal_to_vector (int *argc, char ***argv)
*argc = i;
}
- client = gconf_client_get_default ();
- terminal = gconf_client_get_string (client, "/desktop/gnome/applications/terminal/exec", NULL);
- g_object_unref (client);
-
+ settings = g_settings_new ("org.gnome.desktop.default-applications.terminal");
+ terminal = g_settings_get_string (settings, "exec");
+
if (terminal) {
gchar *command_line;
gchar *exec_flag;
- exec_flag = gconf_client_get_string (client, "/desktop/gnome/applications/terminal/exec_arg", NULL);
+
+ exec_flag = g_settings_get_string (settings, "exec-arg");
if (exec_flag == NULL)
command_line = g_strdup (terminal);
@@ -106,6 +105,8 @@ gnome_desktop_prepend_terminal_to_vector (int *argc, char ***argv)
g_free (terminal);
}
+ g_object_unref (settings);
+
if (term_argv == NULL) {
char *check;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]