aboutsummaryrefslogtreecommitdiffstats
path: root/shell
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2009-11-13 10:27:40 +0800
committerMatthew Barnes <mbarnes@redhat.com>2009-11-14 00:26:43 +0800
commitc5e04ca04066ae2d92d3999626ef91d5d0606cab (patch)
tree4c4cc28faa947d29d9f6e575680549daf95ae753 /shell
parentba89f0b2c4993c562a1bdb0f5ce90b654c3b68b5 (diff)
downloadgsoc2013-evolution-c5e04ca04066ae2d92d3999626ef91d5d0606cab.tar.gz
gsoc2013-evolution-c5e04ca04066ae2d92d3999626ef91d5d0606cab.tar.zst
gsoc2013-evolution-c5e04ca04066ae2d92d3999626ef91d5d0606cab.zip
EWebView popup menu enhancements.
Bumps the GtkHtml dependency to 3.29.2 for gtk_html_unselect_all().
Diffstat (limited to 'shell')
-rw-r--r--shell/e-shell-utils.c29
-rw-r--r--shell/e-shell-utils.h4
2 files changed, 33 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
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 <shell/e-shell.h>
+#include <misc/e-web-view.h>
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,