aboutsummaryrefslogtreecommitdiffstats
path: root/shell/e-shell-utils.c
diff options
context:
space:
mode:
Diffstat (limited to 'shell/e-shell-utils.c')
-rw-r--r--shell/e-shell-utils.c29
1 files changed, 29 insertions, 0 deletions
diff --git a/shell/e-shell-utils.c b/shell/e-shell-utils.c
index 570f15bddd..c9c887c97a 100644
--- a/shell/e-shell-utils.c
+++ b/shell/e-shell-utils.c
@@ -23,9 +23,38 @@
#include <glib/gi18n-lib.h>
+#include "e-util/e-binding.h"
#include "widgets/misc/e-import-assistant.h"
/**
+ * e_shell_configure_web_view:
+ * @shell: an #EShell
+ * @web_view: an #EWebView
+ *
+ * Adds shell integration to @web_view. In particular, it configures
+ * @web_view to honor the printing and save-to-disk lockdown options.
+ **/
+void
+e_shell_configure_web_view (EShell *shell,
+ EWebView *web_view)
+{
+ EShellSettings *shell_settings;
+
+ g_return_if_fail (E_IS_SHELL (shell));
+ g_return_if_fail (E_IS_WEB_VIEW (web_view));
+
+ shell_settings = e_shell_get_shell_settings (shell);
+
+ e_binding_new (
+ shell_settings, "disable-printing",
+ web_view, "disable-printing");
+
+ e_binding_new (
+ shell_settings, "disable-save-to-disk",
+ web_view, "disable-save-to-disk");
+}
+
+/**
* e_shell_run_open_dialog:
* @shell: an #EShell
* @title: file chooser dialog title