From a29c7b6e5ac6f1f693028bf8aa34c221aedc6c9b Mon Sep 17 00:00:00 2001 From: Carlos Garcia Campos Date: Thu, 05 Feb 2009 09:01:14 +0000 Subject: Make use of GConf optional. Based on patch by Hib Eris. See bug #339172. 2009-02-05 Carlos Garcia Campos * configure.ac: * shell/ev-window.c: (ev_window_setup_action_sensitivity): Make use of GConf optional. Based on patch by Hib Eris. See bug #339172. svn path=/trunk/; revision=3414 --- (limited to 'shell') diff --git a/shell/ev-window.c b/shell/ev-window.c index 523a8c6..77455c6 100644 --- a/shell/ev-window.c +++ b/shell/ev-window.c @@ -43,7 +43,9 @@ #else #include #endif +#ifdef WITH_GCONF #include +#endif #include "egg-editable-toolbar.h" #include "egg-toolbar-editor.h" @@ -340,8 +342,9 @@ ev_window_setup_action_sensitivity (EvWindow *ev_window) gboolean can_get_text = FALSE; gboolean has_pages = FALSE; gboolean can_find = FALSE; - +#ifdef WITH_GCONF GConfClient *client; +#endif if (document) { has_document = TRUE; @@ -364,10 +367,12 @@ ev_window_setup_action_sensitivity (EvWindow *ev_window) can_find = TRUE; } +#ifdef WITH_GCONF client = gconf_client_get_default (); override_restrictions = gconf_client_get_bool (client, GCONF_OVERRIDE_RESTRICTIONS, NULL); +#endif if (!override_restrictions && info && info->fields_mask & EV_DOCUMENT_INFO_PERMISSIONS) { ok_to_print = (info->permissions & EV_DOCUMENT_PERMISSIONS_OK_TO_PRINT); ok_to_copy = (info->permissions & EV_DOCUMENT_PERMISSIONS_OK_TO_COPY); @@ -376,7 +381,7 @@ ev_window_setup_action_sensitivity (EvWindow *ev_window) if (has_document && !EV_IS_FILE_EXPORTER(document)) ok_to_print = FALSE; - +#ifdef WITH_GCONF if (gconf_client_get_bool (client, GCONF_LOCKDOWN_SAVE, NULL)) { ok_to_copy = FALSE; } @@ -386,6 +391,7 @@ ev_window_setup_action_sensitivity (EvWindow *ev_window) } g_object_unref (client); +#endif /* File menu */ ev_window_set_action_sensitive (ev_window, "FileOpenCopy", has_document); -- cgit v0.9.1