[gnome-panel/features/port-gsettings: 2/9] panel: port panel-util.c to gsettings
- From: Philipp Kaluza <phk src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-panel/features/port-gsettings: 2/9] panel: port panel-util.c to gsettings
- Date: Sun, 24 Aug 2014 11:20:30 +0000 (UTC)
commit 77f5557bb6215976199770abe049ea8172f5fff0
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date: Mon Nov 18 14:21:05 2013 +0200
panel: port panel-util.c to gsettings
gnome-panel/panel-schemas.h | 3 +++
gnome-panel/panel-util.c | 15 ++++++---------
2 files changed, 9 insertions(+), 9 deletions(-)
---
diff --git a/gnome-panel/panel-schemas.h b/gnome-panel/panel-schemas.h
index a2543ac..d6a87d8 100644
--- a/gnome-panel/panel-schemas.h
+++ b/gnome-panel/panel-schemas.h
@@ -77,4 +77,7 @@
#define PANEL_MENU_BUTTON_CUSTOM_ICON_KEY "custom-icon"
#define PANEL_MENU_BUTTON_MENU_PATH_KEY "menu-path"
+#define GNOME_NAUTILUS_DESKTOP_SCHEMA "org.gnome.nautilus.desktop"
+#define GNOME_NAUTILUS_DESKTOP_HOME_ICON_NAME_KEY "home-icon-name"
+
#endif /* __PANEL_SCHEMAS_H__ */
diff --git a/gnome-panel/panel-util.c b/gnome-panel/panel-util.c
index eb591c1..2ba8eba 100644
--- a/gnome-panel/panel-util.c
+++ b/gnome-panel/panel-util.c
@@ -37,7 +37,6 @@
#include "applet.h"
#include "xstuff.h"
#include "panel-bindings.h"
-#include "panel-gconf.h"
#include "panel-globals.h"
#include "launcher.h"
#include "panel-icon-names.h"
@@ -714,7 +713,6 @@ panel_util_get_file_display_name_if_mount (GFile *file)
return ret;
}
-#define HOME_NAME_KEY "/apps/nautilus/desktop/home_icon_name"
static char *
panel_util_get_file_display_for_common_files (GFile *file)
{
@@ -722,18 +720,17 @@ panel_util_get_file_display_for_common_files (GFile *file)
compare = g_file_new_for_path (g_get_home_dir ());
if (g_file_equal (file, compare)) {
- char *gconf_name;
+ GSettings *settings = g_settings_new (GNOME_NAUTILUS_DESKTOP_SCHEMA);
+ char *home_foler_name = g_settings_get_string (settings,
GNOME_NAUTILUS_DESKTOP_HOME_ICON_NAME_KEY);
g_object_unref (compare);
+ g_object_unref (settings);
- gconf_name = gconf_client_get_string (panel_gconf_get_client (),
- HOME_NAME_KEY,
- NULL);
- if (PANEL_GLIB_STR_EMPTY (gconf_name)) {
- g_free (gconf_name);
+ if (PANEL_GLIB_STR_EMPTY (home_foler_name)) {
+ g_free (home_foler_name);
return g_strdup (_("Home Folder"));
} else {
- return gconf_name;
+ return home_foler_name;
}
}
g_object_unref (compare);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]