aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/misc/e-web-view.c
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2011-03-28 03:16:39 +0800
committerMatthew Barnes <mbarnes@redhat.com>2011-03-28 06:38:39 +0800
commitba6a2343869f6be82f44261f183cd6925659d5ee (patch)
treef7356964d4780d8889c439f9c8271c7d71315ab3 /widgets/misc/e-web-view.c
parentf35931919049a645681207856c384d70a749020c (diff)
downloadgsoc2013-evolution-ba6a2343869f6be82f44261f183cd6925659d5ee.tar.gz
gsoc2013-evolution-ba6a2343869f6be82f44261f183cd6925659d5ee.tar.zst
gsoc2013-evolution-ba6a2343869f6be82f44261f183cd6925659d5ee.zip
Restore lockdown integration.
With lockdown settings available through GSettings, widgets can handle lockdown integration themselves without having to use EShellSettings. Also fixed a few places where printing or save-to-disk actions were either not properly wired up or not responding to lockdown settings, but much more work needs done. Attachments, for example, are not honoring the disable-save-to-disk setting at all. This too requires the recently-added gsettings-desktop-schemas dependency.
Diffstat (limited to 'widgets/misc/e-web-view.c')
-rw-r--r--widgets/misc/e-web-view.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/widgets/misc/e-web-view.c b/widgets/misc/e-web-view.c
index b4bb4b5019..ff507d8476 100644
--- a/widgets/misc/e-web-view.c
+++ b/widgets/misc/e-web-view.c
@@ -733,6 +733,31 @@ web_view_finalize (GObject *object)
G_OBJECT_CLASS (parent_class)->finalize (object);
}
+static void
+web_view_constructed (GObject *object)
+{
+#ifndef G_OS_WIN32
+ GSettings *settings;
+
+ settings = g_settings_new ("org.gnome.desktop.lockdown");
+
+ g_settings_bind (
+ settings, "disable-printing",
+ object, "disable-printing",
+ G_SETTINGS_BIND_GET);
+
+ g_settings_bind (
+ settings, "disable-save-to-disk",
+ object, "disable-save-to-disk",
+ G_SETTINGS_BIND_GET);
+
+ g_object_unref (settings);
+#endif
+
+ /* Chain up to parent's constructed() method. */
+ G_OBJECT_CLASS (parent_class)->constructed (object);
+}
+
static gboolean
web_view_button_press_event (GtkWidget *widget,
GdkEventButton *event)
@@ -1121,6 +1146,7 @@ e_web_view_class_init (EWebViewClass *class)
object_class->get_property = web_view_get_property;
object_class->dispose = web_view_dispose;
object_class->finalize = web_view_finalize;
+ object_class->constructed = web_view_constructed;
widget_class = GTK_WIDGET_CLASS (class);
widget_class->button_press_event = web_view_button_press_event;