summaryrefslogtreecommitdiff
path: root/src/eom-window.c
diff options
context:
space:
mode:
authorinfirit <[email protected]>2014-07-29 22:21:28 +0200
committerinfirit <[email protected]>2014-07-29 23:15:21 +0200
commitf8e85177acadfa4d1cfea8ff0987efb12927f97e (patch)
treee6e619f19ac9a73380433936f13eeafe73f9b9d6 /src/eom-window.c
parent987b255e752f5f83a4b932a3b59a2338878f3ed8 (diff)
downloadeom-f8e85177acadfa4d1cfea8ff0987efb12927f97e.tar.bz2
eom-f8e85177acadfa4d1cfea8ff0987efb12927f97e.tar.xz
Respect lockdown setting for page setup again
This apparently got broken when the page setup dialog was merged into the general print dialog. Based on eog commit 1bff58f772de4aad8cbf0886e46e1c26e075b54b From Felix Riemann <[email protected]>
Diffstat (limited to 'src/eom-window.c')
-rw-r--r--src/eom-window.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/eom-window.c b/src/eom-window.c
index 7ac77f5..3967ad9 100644
--- a/src/eom-window.c
+++ b/src/eom-window.c
@@ -564,7 +564,6 @@ update_action_groups_state (EomWindow *window)
GtkAction *action_sshow;
GtkAction *action_print;
gboolean print_disabled = FALSE;
- gboolean page_setup_disabled = FALSE;
gboolean show_image_collection = FALSE;
gint n_images = 0;
@@ -668,9 +667,6 @@ update_action_groups_state (EomWindow *window)
gtk_action_set_sensitive (action_print, FALSE);
}
- page_setup_disabled = g_settings_get_boolean (priv->lockdown_settings,
- EOM_CONF_LOCKDOWN_CAN_SETUP_PAGE);
-
if (eom_sidebar_is_empty (EOM_SIDEBAR (priv->sidebar))) {
gtk_action_set_sensitive (action_sidebar, FALSE);
gtk_widget_hide (priv->sidebar);
@@ -2159,6 +2155,7 @@ eom_window_print (EomWindow *window)
GtkPrintOperationResult res;
GtkPageSetup *page_setup;
GtkPrintSettings *print_settings;
+ gboolean page_setup_disabled = FALSE;
eom_debug (DEBUG_PRINTING);
@@ -2176,6 +2173,12 @@ eom_window_print (EomWindow *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,
+ EOM_CONF_LOCKDOWN_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);