[gnome-builder/wip/plugins: 29/36] webkit: apply settings after web view creation



commit 9c2829f9f7c1c404eabc716350c10501eded843d
Author: Christian Hergert <christian hergert me>
Date:   Sun Jun 7 22:25:47 2015 -0700

    webkit: apply settings after web view creation

 plugins/devhelp/gb-devhelp-view.c |    2 +-
 src/util/gb-webkit.c              |    2 ++
 2 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/plugins/devhelp/gb-devhelp-view.c b/plugins/devhelp/gb-devhelp-view.c
index 3f396ac..e936f8a 100644
--- a/plugins/devhelp/gb-devhelp-view.c
+++ b/plugins/devhelp/gb-devhelp-view.c
@@ -152,6 +152,7 @@ gb_devhelp_view_set_split_view (GbView   *view,
       self->web_view2 = g_object_new (WEBKIT_TYPE_WEB_VIEW,
                                       "visible", TRUE,
                                       NULL);
+      gb_webkit_web_view_apply_settings (self->web_view2);
       gtk_container_add_with_properties (GTK_CONTAINER (self->paned), GTK_WIDGET (self->web_view2),
                                          "shrink", FALSE,
                                          "resize", TRUE,
@@ -257,5 +258,4 @@ gb_devhelp_view_init (GbDevhelpView *self)
   gtk_widget_init_template (GTK_WIDGET (self));
 
   gb_webkit_web_view_apply_settings (self->web_view1);
-  gb_webkit_web_view_apply_settings (self->web_view2);
 }
diff --git a/src/util/gb-webkit.c b/src/util/gb-webkit.c
index 050a521..310d8e4 100644
--- a/src/util/gb-webkit.c
+++ b/src/util/gb-webkit.c
@@ -21,6 +21,8 @@
 void
 gb_webkit_web_view_apply_settings (WebKitWebView *view)
 {
+  g_return_if_fail (WEBKIT_IS_WEB_VIEW (view));
+
   /*
    * TODO: Consider whether HTML5 local storage should be enabled. It could only
    * possibly be useful for complex web sites, but if you're building a web site


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]