about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--settings.c5
-rw-r--r--xombrero.c4
2 files changed, 6 insertions, 3 deletions
diff --git a/settings.c b/settings.c
index dcf6705..0f91807 100644
--- a/settings.c
+++ b/settings.c
@@ -2610,6 +2610,7 @@ set_js_auto_open_windows(char *value)
 {
 	int		tmp;
 	const char	*errstr;
+	struct tab	*t;
 
 	if (value == NULL || strlen(value) == 0)
 		js_auto_open_windows = XT_DS_JS_AUTO_OPEN_WINDOWS;
@@ -2619,6 +2620,10 @@ set_js_auto_open_windows(char *value)
 			return (-1);
 		js_auto_open_windows = tmp;
 	}
+	TAILQ_FOREACH(t, &tabs, entry)
+		g_object_set(G_OBJECT(t->settings),
+		    "javascript-can-open-windows-automatically",
+		    js_auto_open_windows, NULL);
 	return (0);
 }
 
diff --git a/xombrero.c b/xombrero.c
index 924220c..b989cad 100644
--- a/xombrero.c
+++ b/xombrero.c
@@ -3629,8 +3629,6 @@ check_and_set_js(const gchar *uri, struct tab *t)
 
 	g_object_set(G_OBJECT(t->settings),
 	    "enable-scripts", es, (char *)NULL);
-	g_object_set(G_OBJECT(t->settings),
-	    "javascript-can-open-windows-automatically", js_auto_open_windows ? es : 0, (char *)NULL);
 	webkit_web_view_set_settings(t->wv, t->settings);
 
 	button_set_stockid(t->js_toggle,
@@ -6869,7 +6867,7 @@ setup_webkit(struct tab *t)
 	    "enable-plugins", enable_plugins, (char *)NULL);
 	g_object_set(G_OBJECT(t->settings),
 	    "javascript-can-open-windows-automatically",
-	    js_auto_open_windows ? enable_scripts : 0, (char *)NULL);
+	    js_auto_open_windows, (char *)NULL);
 	g_object_set(G_OBJECT(t->settings),
 	    "enable-html5-database", FALSE, (char *)NULL);
 	g_object_set(G_OBJECT(t->settings),