summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBalló György <[email protected]>2014-10-02 19:37:40 +0200
committerBalló György <[email protected]>2014-10-02 19:37:40 +0200
commit18dae414fa94b6e7f03407641f9e7bb1a6ca59c0 (patch)
tree3f6ca71a1bdd412e7b5221966eec4adfa0ab8ada
parentaf283015b69c24fecd32cdddb53dded6325783cf (diff)
downloadmate-panel-18dae414fa94b6e7f03407641f9e7bb1a6ca59c0.tar.bz2
mate-panel-18dae414fa94b6e7f03407641f9e7bb1a6ca59c0.tar.xz
Use Caja GSettings schema optionally
This was the last place where it was used unconditionally.
-rw-r--r--mate-panel/menu.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/mate-panel/menu.c b/mate-panel/menu.c
index e709ec29..fa655668 100644
--- a/mate-panel/menu.c
+++ b/mate-panel/menu.c
@@ -33,6 +33,7 @@
#if GTK_CHECK_VERSION (3, 0, 0)
#include <gdk/gdkkeysyms-compat.h>
#endif
+#include <libmate-desktop/mate-gsettings.h>
#include <libpanel-util/panel-keyfile.h>
@@ -94,11 +95,15 @@ static gboolean panel_menu_key_press_handler (GtkWidget *widget,
static inline gboolean desktop_is_home_dir(void)
{
- gboolean retval;
+ gboolean retval = FALSE;
GSettings *settings;
- settings = g_settings_new (CAJA_PREFS_SCHEMA);
- retval = g_settings_get_boolean (settings, CAJA_PREFS_DESKTOP_IS_HOME_DIR_KEY);
- g_object_unref (settings);
+
+ if (mate_gsettings_schema_exists (CAJA_PREFS_SCHEMA)) {
+ settings = g_settings_new (CAJA_PREFS_SCHEMA);
+ retval = g_settings_get_boolean (settings, CAJA_PREFS_DESKTOP_IS_HOME_DIR_KEY);
+ g_object_unref (settings);
+ }
+
return retval;
}