]> git.decadent.org.uk Git - videolink.git/blobdiff - videolink.cpp
Changed set_browser_preferences to use the "user" branch rather than the "default...
[videolink.git] / videolink.cpp
index f26bd5d2809a7a1dbf7d050a792f6c1d71efb1b4..59956c744eb673a36ce7234669f9fc51798a543c 100644 (file)
@@ -864,17 +864,22 @@ namespace
        check(CallGetService<nsIPrefService>(pref_service_cid,
                                             getter_AddRefs(pref_service)));
        nsCOMPtr<nsIPrefBranch> pref_branch;
+       check(pref_service->GetBranch("", getter_AddRefs(pref_branch)));
 
-       // Disable IE-compatibility kluge that causes backgrounds to
-       // sometimes/usually be missing from snapshots.  This is only
-       // effective from Mozilla 1.8 onward.
 #      if MOZ_VERSION_MAJOR > 1                                 \
            || (MOZ_VERSION_MAJOR == 1 && MOZ_VERSION_MINOR >= 8)
-       check(pref_service->GetDefaultBranch("layout",
-                                            getter_AddRefs(pref_branch)));
-       check(pref_branch->SetBoolPref(
-                 "fire_onload_after_image_background_loads",
-                 true));
+           // Disable IE-compatibility kluge that causes backgrounds to
+           // sometimes/usually be missing from snapshots.  This is only
+           // effective from Mozilla 1.8 onward.
+           check(pref_branch->SetBoolPref(
+                     "layout.fire_onload_after_image_background_loads",
+                     true));
+
+           // Turn off link underlining.  This is also set in the agent
+           // stylesheet, but seems to be overridden by preferences in
+           // Mozilla 1.8.
+           check(pref_branch->SetBoolPref("browser.underline_anchors",
+                                          false));
 #      endif
 
        // Set display resolution.  With standard-definition video we
@@ -885,9 +890,8 @@ namespace
        // slightly different but unfortunately Mozilla doesn't
        // support non-square pixels (and neither do fontconfig or Xft
        // anyway).
-       check(pref_service->GetDefaultBranch("browser.display",
-                                            getter_AddRefs(pref_branch)));
-       check(pref_branch->SetIntPref("screen_resolution", 40));
+       check(pref_branch->SetIntPref("browser.display.screen_resolution",
+                                     40));
     }
 
 } // namespace