+2005-09-13 Nickolay V. Shmyrev <nshmyrev@yandex.ru>
+
+ * data/evince.schemas.in:
+ * shell/ev-window.c: (update_action_sensitivity):
+
+ Allow the user to override document restrictions. Fix for bug
+ 305818.
+
2005-09-13 Christian Persch <chpe@cvs.gnome.org>
* shell/ev-window.c: (ev_window_update_fullscreen_popup),
<long>Toolbar is the top bar that contains navigation and zoom controls. Two boolean options, true makes toolbar visible by default while false makes toolbar not visible by default.</long>
</locale>
</schema>
+ <schema>
+ <key>/schemas/apps/evince/override_restrictions</key>
+ <applyto>/apps/evince/override_restrictions</applyto>
+ <owner>evince</owner>
+ <type>bool</type>
+ <default>false</default>
+ <locale name="C">
+ <short>Override document restrictions</short>
+ <long>Override document restrictions, like restriction to copy or to print.</long>
+ </locale>
+ </schema>
</schemalist>
</gconfschemafile>
#define PAGE_SELECTOR_ACTION "PageSelector"
#define ZOOM_CONTROL_ACTION "ViewZoom"
-#define GCONF_CHROME_TOOLBAR "/apps/evince/show_toolbar"
-#define GCONF_LOCKDOWN_SAVE "/desktop/gnome/lockdown/disable_save_to_disk"
-#define GCONF_LOCKDOWN_PRINT "/desktop/gnome/lockdown/disable_printing"
+#define GCONF_CHROME_TOOLBAR "/apps/evince/show_toolbar"
+#define GCONF_OVERRIDE_RESTRICTIONS "/apps/evince/override_restrictions"
+#define GCONF_LOCKDOWN_SAVE "/desktop/gnome/lockdown/disable_save_to_disk"
+#define GCONF_LOCKDOWN_PRINT "/desktop/gnome/lockdown/disable_printing"
#define SIDEBAR_DEFAULT_SIZE 132
#define LINKS_SIDEBAR_ID "links"
gboolean ok_to_print = TRUE;
gboolean ok_to_copy = TRUE;
gboolean has_properties = TRUE;
+ gboolean override_restrictions = FALSE;
GConfClient *client;
view = EV_VIEW (ev_window->priv->view);
has_pages = has_document && n_pages > 0;
}
- if (info && info->fields_mask & EV_DOCUMENT_INFO_PERMISSIONS) {
+ client = gconf_client_get_default ();
+ override_restrictions = gconf_client_get_bool (client,
+ GCONF_OVERRIDE_RESTRICTIONS,
+ NULL);
+ 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);
}
has_properties = FALSE;
}
- client = gconf_client_get_default ();
-
if (gconf_client_get_bool (client, GCONF_LOCKDOWN_SAVE, NULL)) {
ok_to_copy = FALSE;
}
if (gconf_client_get_bool (client, GCONF_LOCKDOWN_PRINT, NULL)) {
ok_to_print = FALSE;
}
+
+ g_object_unref (client);
/* File menu */
/* "FileOpen": always sensitive */