[Commits] fancy_viewer.c 1.1.2.2 1.1.2.3

colin at claws-mail.org colin at claws-mail.org
Wed Mar 6 12:22:57 CET 2013


Update of /home/claws-mail/claws/src/plugins/fancy
In directory srv:/tmp/cvs-serv31910/src/plugins/fancy

Modified Files:
      Tag: gtk2
	fancy_viewer.c 
Log Message:
2013-03-06 [colin]	3.9.0cvs106

	* src/plugins/fancy/fancy_viewer.c
		Make options setting clearer

Index: fancy_viewer.c
===================================================================
RCS file: /home/claws-mail/claws/src/plugins/fancy/Attic/fancy_viewer.c,v
retrieving revision 1.1.2.2
retrieving revision 1.1.2.3
diff -u -d -r1.1.2.2 -r1.1.2.3
--- fancy_viewer.c	20 Feb 2013 11:25:35 -0000	1.1.2.2
+++ fancy_viewer.c	6 Mar 2013 11:22:54 -0000	1.1.2.3
@@ -381,39 +381,21 @@
 navigation_requested_cb(WebKitWebView *view, WebKitWebFrame *frame, 
 						WebKitNetworkRequest *netreq, FancyViewer *viewer)
 {
-	if (!fancy_prefs.auto_load_images && !viewer->override_prefs_images) {
-		g_object_set(viewer->settings, "auto-load-images", FALSE, NULL);
-		webkit_web_view_set_settings(viewer->view, viewer->settings);
-	}
-	else {
-		g_object_set(viewer->settings, "auto-load-images", TRUE, NULL);
-		webkit_web_view_set_settings(viewer->view, viewer->settings);
-	}
+	g_object_set(viewer->settings, "auto-load-images",
+		fancy_prefs.auto_load_images || viewer->override_prefs_images,
+		NULL);
+	g_object_set(viewer->settings, "enable-scripts",
+		fancy_prefs.enable_scripts || viewer->override_prefs_scripts,
+		NULL);
+	g_object_set(viewer->settings, "enable-plugins",
+		fancy_prefs.enable_plugins || viewer->override_prefs_plugins,
+		NULL);
+	g_object_set(viewer->settings, "enable-java-applet",
+		fancy_prefs.enable_java || viewer->override_prefs_java,
+		NULL);
+
+	webkit_web_view_set_settings(viewer->view, viewer->settings);
 
-	if (!fancy_prefs.enable_scripts && !viewer->override_prefs_scripts) {
-		g_object_set(viewer->settings, "enable-scripts", FALSE, NULL);
-		webkit_web_view_set_settings(viewer->view, viewer->settings);
-	}
-	else {
-		g_object_set(viewer->settings, "enable-scripts", TRUE, NULL);
-		webkit_web_view_set_settings(viewer->view, viewer->settings);
-	}
-	if (!fancy_prefs.enable_plugins && !viewer->override_prefs_plugins) {
-		g_object_set(viewer->settings, "enable-plugins", FALSE, NULL);
-		webkit_web_view_set_settings(viewer->view, viewer->settings);
-	}
-	else {
-		g_object_set(viewer->settings, "enable-plugins", TRUE, NULL);
-		webkit_web_view_set_settings(viewer->view, viewer->settings);
-	}
-	if (!fancy_prefs.enable_java && !viewer->override_prefs_java) {
-		g_object_set(viewer->settings, "enable-java-applet", FALSE, NULL);
-		webkit_web_view_set_settings(viewer->view, viewer->settings);
-	}
-	else {
-		g_object_set(viewer->settings, "enable-java-applet", TRUE, NULL);
-		webkit_web_view_set_settings(viewer->view, viewer->settings);
-	}
 	if (fancy_prefs.block_extern_content && !viewer->override_prefs_block_extern_content) {
 		if (viewer->load_page) {
 			gchar *message = g_strdup_printf(_("Navigation to %s blocked"), viewer->cur_link);



More information about the Commits mailing list