diff options
author | Carlos Garcia Campos <carlosgc@gnome.org> | 2009-02-05 09:01:14 (GMT) |
---|---|---|
committer | Carlos Garcia Campos <carlosgc@src.gnome.org> | 2009-02-05 09:01:14 (GMT) |
commit | a29c7b6e5ac6f1f693028bf8aa34c221aedc6c9b (patch) | |
tree | 921c58a849994b9422e24e973fcc218be27eacad /shell/ev-window.c | |
parent | eaf72960239c45082ac4d8d46f1bfdae0e41a833 (diff) |
Make use of GConf optional. Based on patch by Hib Eris. See bug #339172.
2009-02-05 Carlos Garcia Campos <carlosgc@gnome.org>
* 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
Diffstat (limited to 'shell/ev-window.c')
-rw-r--r-- | shell/ev-window.c | 10 |
1 files changed, 8 insertions, 2 deletions
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 <gtk/gtkprintunixdialog.h> #endif +#ifdef WITH_GCONF #include <gconf/gconf-client.h> +#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); |