2013-03-06 [colin] 3.9.0cvs106
authorColin Leroy <colin@colino.net>
Wed, 6 Mar 2013 11:22:54 +0000 (11:22 +0000)
committerColin Leroy <colin@colino.net>
Wed, 6 Mar 2013 11:22:54 +0000 (11:22 +0000)
* src/plugins/fancy/fancy_viewer.c
Make options setting clearer

ChangeLog
PATCHSETS
configure.ac
src/plugins/fancy/fancy_viewer.c

index a722c4b6b2e5a2c54a9ade60746757b3a82616c3..771db9603c86fc1b66a7b6673adc328819303ecd 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2013-03-06 [colin]     3.9.0cvs106
+
+       * src/plugins/fancy/fancy_viewer.c
+               Make options setting clearer
+
 2013-02-28 [mones]     3.9.0cvs105
 
        * configure.ac
 2013-02-28 [mones]     3.9.0cvs105
 
        * configure.ac
index cbf049c387240143698f117416317b18a9129323..e5b8079c0e275a18ac7a9c76c0db36c46ccd869c 100644 (file)
--- a/PATCHSETS
+++ b/PATCHSETS
 ( cvs diff -u -r 1.94.2.242 -r 1.94.2.243 src/messageview.c;  ) > 3.9.0cvs103.patchset
 ( cvs diff -u -r 1.8.2.67 -r 1.8.2.68 README;  ) > 3.9.0cvs104.patchset
 ( cvs diff -u -r 1.654.2.4681 -r 1.654.2.4682 configure.ac;  cvs diff -u -r 1.1.2.4 -r 1.1.2.5 src/plugins/perl/Makefile.am;  diff -u /dev/null src/plugins/perl/cm_perl.pod;  diff -u /dev/null src/plugins/perl/tools/.cvsignore;  diff -u /dev/null src/plugins/perl/tools/Makefile.am;  diff -u /dev/null src/plugins/perl/tools/insert_perl.pl;  diff -u /dev/null src/plugins/perl/tools/matcherrc2perlfilter.pl;  ) > 3.9.0cvs105.patchset
 ( cvs diff -u -r 1.94.2.242 -r 1.94.2.243 src/messageview.c;  ) > 3.9.0cvs103.patchset
 ( cvs diff -u -r 1.8.2.67 -r 1.8.2.68 README;  ) > 3.9.0cvs104.patchset
 ( cvs diff -u -r 1.654.2.4681 -r 1.654.2.4682 configure.ac;  cvs diff -u -r 1.1.2.4 -r 1.1.2.5 src/plugins/perl/Makefile.am;  diff -u /dev/null src/plugins/perl/cm_perl.pod;  diff -u /dev/null src/plugins/perl/tools/.cvsignore;  diff -u /dev/null src/plugins/perl/tools/Makefile.am;  diff -u /dev/null src/plugins/perl/tools/insert_perl.pl;  diff -u /dev/null src/plugins/perl/tools/matcherrc2perlfilter.pl;  ) > 3.9.0cvs105.patchset
+( cvs diff -u -r 1.1.2.2 -r 1.1.2.3 src/plugins/fancy/fancy_viewer.c;  ) > 3.9.0cvs106.patchset
index 0c1e934479c1b254834811c628eb91652553070e..74aee4a2a6f969bc3cc96a1529e802b4ebc1e17e 100644 (file)
@@ -12,7 +12,7 @@ MINOR_VERSION=9
 MICRO_VERSION=0
 INTERFACE_AGE=0
 BINARY_AGE=0
 MICRO_VERSION=0
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=105
+EXTRA_VERSION=106
 EXTRA_RELEASE=
 EXTRA_GTK2_VERSION=
 
 EXTRA_RELEASE=
 EXTRA_GTK2_VERSION=
 
index ddf90b4e1af42ea1586014d2eed79fb4bf4a8be0..f9ef4381dcbe2ecf75f20cc21eb69dc94b17688f 100644 (file)
@@ -381,39 +381,21 @@ static WebKitNavigationResponse
 navigation_requested_cb(WebKitWebView *view, WebKitWebFrame *frame, 
                                                WebKitNetworkRequest *netreq, FancyViewer *viewer)
 {
 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);
        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);