]> www.fi.muni.cz Git - evince.git/commitdiff
Disable save and print respect to lockdown gconf keys
authorNickolay V. Shmyrev <nshmyrev@src.gnome.org>
Wed, 3 Aug 2005 06:02:35 +0000 (06:02 +0000)
committerNickolay V. Shmyrev <nshmyrev@src.gnome.org>
Wed, 3 Aug 2005 06:02:35 +0000 (06:02 +0000)
ChangeLog
shell/ev-window.c

index b80222121176596ebfd9ab7fd3705c82c4e4d06f..6feae0dcd2386888ad97f465e62e838c6f285187 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2005-08-03  Nickolay V. Shmyrev  <nshmyrev@yandex.ru>
+
+       * shell/ev-window.c: (update_action_sensitivity):
+       
+       Disable print and save respect to lockdown gconf keys. Fix
+       for 312342.
+
 2005-08-03  Nickolay V. Shmyrev  <nshmyrev@yandex.ru>
 
        * configure.ac:
index e03978172fb2e7e8c39826588ac60f14463ea46f..fac6047d77ac868369087cbf0c4818979df05085 100644 (file)
@@ -153,7 +153,8 @@ static const GtkTargetEntry ev_drop_types[] = {
 #define GCONF_CHROME_TOOLBAR   "/apps/evince/show_toolbar"
 #define GCONF_CHROME_SIDEBAR   "/apps/evince/show_sidebar"
 #define GCONF_CHROME_STATUSBAR "/apps/evince/show_statusbar"
-
+#define GCONF_LOCKDOWN_SAVE     "/desktop/gnome/lockdown/disable_save_to_disk"
+#define GCONF_LOCKDOWN_PRINT    "/desktop/gnome/lockdown/disable_printing"
 #define GCONF_SIDEBAR_SIZE      "/apps/evince/sidebar_size"
 
 #define SIDEBAR_DEFAULT_SIZE    132
@@ -213,6 +214,7 @@ update_action_sensitivity (EvWindow *ev_window)
        gboolean ok_to_print = TRUE;
        gboolean ok_to_copy = TRUE;
        gboolean has_properties = TRUE;
+       GConfClient *client;
 
        view = EV_VIEW (ev_window->priv->view);
 
@@ -241,6 +243,16 @@ update_action_sensitivity (EvWindow *ev_window)
        if (!info || info->fields_mask == 0) {
                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;
+       }
 
        /* File menu */
        /* "FileOpen": always sensitive */