From c5e04ca04066ae2d92d3999626ef91d5d0606cab Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Thu, 12 Nov 2009 21:27:40 -0500 Subject: EWebView popup menu enhancements. Bumps the GtkHtml dependency to 3.29.2 for gtk_html_unselect_all(). --- shell/e-shell-utils.c | 29 +++++++++++++++++++++++++++++ shell/e-shell-utils.h | 4 ++++ 2 files changed, 33 insertions(+) (limited to 'shell') 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,8 +23,37 @@ #include +#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 diff --git a/shell/e-shell-utils.h b/shell/e-shell-utils.h index 24b44a9622..6e26256155 100644 --- a/shell/e-shell-utils.h +++ b/shell/e-shell-utils.h @@ -29,9 +29,13 @@ #define E_SHELL_UTILS_H #include +#include G_BEGIN_DECLS +void e_shell_configure_web_view (EShell *shell, + EWebView *web_view); + GFile * e_shell_run_open_dialog (EShell *shell, const gchar *title, GtkCallback customize_func, -- cgit