summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefano Karapetsas <[email protected]>2014-10-02 20:49:03 +0200
committerStefano Karapetsas <[email protected]>2014-10-02 20:49:03 +0200
commit1c1d618ce88d9b3a7f3f0643633af39be2acdef0 (patch)
tree3f6ca71a1bdd412e7b5221966eec4adfa0ab8ada
parentaf283015b69c24fecd32cdddb53dded6325783cf (diff)
parent18dae414fa94b6e7f03407641f9e7bb1a6ca59c0 (diff)
downloadmate-panel-1c1d618ce88d9b3a7f3f0643633af39be2acdef0.tar.bz2
mate-panel-1c1d618ce88d9b3a7f3f0643633af39be2acdef0.tar.xz
Merge pull request #239 from City-busz/make-caja-optional
Use Caja GSettings schema optionally
-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;
}