summaryrefslogtreecommitdiff
path: root/mate-panel/panel-util.c
diff options
context:
space:
mode:
authorStefano Karapetsas <[email protected]>2012-10-11 00:01:30 +0200
committerStefano Karapetsas <[email protected]>2012-10-11 00:01:30 +0200
commit876f39364e2106c8cb96fa4a9067359e5a350583 (patch)
tree2936001f23a62397065495e3fd065cb260eff4d7 /mate-panel/panel-util.c
parent66916b20f16f9f0aad4c527519b70ac3a72bbec7 (diff)
downloadmate-panel-876f39364e2106c8cb96fa4a9067359e5a350583.tar.bz2
mate-panel-876f39364e2106c8cb96fa4a9067359e5a350583.tar.xz
migrate mate-panel to gsettings
Diffstat (limited to 'mate-panel/panel-util.c')
-rw-r--r--mate-panel/panel-util.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/mate-panel/panel-util.c b/mate-panel/panel-util.c
index f8713611..4f081a4b 100644
--- a/mate-panel/panel-util.c
+++ b/mate-panel/panel-util.c
@@ -38,7 +38,7 @@
#include "nothing.h"
#include "xstuff.h"
#include "panel-config-global.h"
-#include "panel-mateconf.h"
+#include "panel-schemas.h"
#include "panel-globals.h"
#include "launcher.h"
#include "panel-icon-names.h"
@@ -822,7 +822,6 @@ panel_util_get_file_display_name_if_mount (GFile *file)
return ret;
}
-#define HOME_NAME_KEY "/apps/caja/desktop/home_icon_name"
static char *
panel_util_get_file_display_for_common_files (GFile *file)
{
@@ -830,18 +829,20 @@ 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 *mateconf_name;
+ GSettings *caja_desktop_settings;
+ char *caja_home_icon_name;
g_object_unref (compare);
- mateconf_name = mateconf_client_get_string (panel_mateconf_get_client (),
- HOME_NAME_KEY,
- NULL);
- if (PANEL_GLIB_STR_EMPTY (mateconf_name)) {
- g_free (mateconf_name);
+ caja_desktop_settings = g_settings_new (CAJA_DESKTOP_SCHEMA);
+ caja_home_icon_name = g_settings_get_string (caja_desktop_settings,
+ CAJA_DESKTOP_HOME_ICON_NAME_KEY);
+ g_object_unref (caja_desktop_settings);
+ if (PANEL_GLIB_STR_EMPTY (caja_home_icon_name)) {
+ g_free (caja_home_icon_name);
return g_strdup (_("Home Folder"));
} else {
- return mateconf_name;
+ return caja_home_icon_name;
}
}
g_object_unref (compare);