From 18dae414fa94b6e7f03407641f9e7bb1a6ca59c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ball=C3=B3=20Gy=C3=B6rgy?= Date: Thu, 2 Oct 2014 19:37:40 +0200 Subject: Use Caja GSettings schema optionally This was the last place where it was used unconditionally. --- mate-panel/menu.c | 13 +++++++++---- 1 file 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 #endif +#include #include @@ -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; } -- cgit v1.2.1