+
+ runscript(frame);
+
+ settings = webkit_web_view_get_settings(c->view);
+ if(!(ua = getenv("SURF_USERAGENT")))
+ ua = useragent;
+ g_object_set(G_OBJECT(settings), "user-agent", ua, NULL);
+ uri = g_strconcat("file://", stylefile, NULL);
+ g_object_set(G_OBJECT(settings), "user-stylesheet-uri", uri, NULL);
+ g_object_set(G_OBJECT(settings), "auto-load-images", loadimages,
+ NULL);
+ g_object_set(G_OBJECT(settings), "enable-plugins", enableplugins,
+ NULL);
+ g_object_set(G_OBJECT(settings), "enable-scripts", enablescripts,
+ NULL);
+ g_object_set(G_OBJECT(settings), "enable-spatial-navigation",
+ enablespatialbrowsing, NULL);
+ g_object_set(G_OBJECT(settings), "enable-developer-extras",
+ enableinspector, NULL);
+
+ if(enableinspector) {
+ c->inspector = WEBKIT_WEB_INSPECTOR(
+ webkit_web_view_get_inspector(c->view));
+ g_signal_connect(G_OBJECT(c->inspector), "inspect-web-view",
+ G_CALLBACK(inspector_new), c);
+ g_signal_connect(G_OBJECT(c->inspector), "show-window",
+ G_CALLBACK(inspector_show), c);
+ g_signal_connect(G_OBJECT(c->inspector), "close-window",
+ G_CALLBACK(inspector_close), c);
+ g_signal_connect(G_OBJECT(c->inspector), "finished",
+ G_CALLBACK(inspector_finished), c);
+ c->isinspecting = false;
+ }
+
+ g_free(uri);
+
+ setatom(c, AtomFind, "");
+ setatom(c, AtomUri, "about:blank");
+ if(hidebackground)
+ webkit_web_view_set_transparent(c->view, TRUE);
+