[eog] Respect lockdown setting for page setup again



commit 1bff58f772de4aad8cbf0886e46e1c26e075b54b
Author: Felix Riemann <friemann gnome org>
Date:   Sat Nov 20 14:18:16 2010 +0100

    Respect lockdown setting for page setup again
    
    This apparently got broken when the page setup dialog was merged into
    the general print dialog.

 src/eog-window.c |   13 +++++++++----
 1 files changed, 9 insertions(+), 4 deletions(-)
---
diff --git a/src/eog-window.c b/src/eog-window.c
index 2bae553..dc46954 100644
--- a/src/eog-window.c
+++ b/src/eog-window.c
@@ -575,7 +575,6 @@ update_action_groups_state (EogWindow *window)
 	GtkAction *action_sshow;
 	GtkAction *action_print;
 	gboolean print_disabled = FALSE;
-	gboolean page_setup_disabled = FALSE;
 	gboolean show_image_gallery = FALSE;
 	gint n_images = 0;
 
@@ -684,9 +683,6 @@ update_action_groups_state (EogWindow *window)
 		gtk_action_set_sensitive (action_print, FALSE);
 	}
 
-	page_setup_disabled = g_settings_get_boolean (priv->lockdown_settings,
-						      EOG_CONF_DESKTOP_CAN_SETUP_PAGE);
-
 	if (eog_sidebar_is_empty (EOG_SIDEBAR (priv->sidebar))) {
 		gtk_action_set_sensitive (action_sidebar, FALSE);
 		gtk_widget_hide (priv->sidebar);
@@ -2166,6 +2162,7 @@ eog_window_print (EogWindow *window)
 	GtkPrintOperationResult res;
 	GtkPageSetup *page_setup;
 	GtkPrintSettings *print_settings;
+	gboolean page_setup_disabled = FALSE;
 
 	eog_debug (DEBUG_PRINTING);
 
@@ -2179,6 +2176,14 @@ eog_window_print (EogWindow *window)
 					 print_settings,
 					 page_setup);
 
+
+	// Disable page setup options if they are locked down
+	page_setup_disabled = g_settings_get_boolean (window->priv->lockdown_settings,
+						      EOG_CONF_DESKTOP_CAN_SETUP_PAGE);
+	if (page_setup_disabled)
+		gtk_print_operation_set_embed_page_setup (print, FALSE);
+
+
 	res = gtk_print_operation_run (print,
 				       GTK_PRINT_OPERATION_ACTION_PRINT_DIALOG,
 				       GTK_WINDOW (window), &error);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]