Add autoscroll pref to advanced. For now, autoscroll is on by default on linux because we haven't forked the linux prefs override file, unix.js.

This commit is contained in:
blakeross%telocity.com 2003-08-08 08:01:24 +00:00
parent 265c58430d
commit bd32ca4753
5 changed files with 30 additions and 7 deletions

View File

@ -51,6 +51,7 @@ pref("general.useragent.vendor", "Mozilla Firebird");
pref("general.useragent.vendorSub", "0.6.1+");
pref("general.smoothScroll", false);
pref("general.autoScroll", true);
pref("backups.number_of_prefs_copies", 1);

View File

@ -51,6 +51,7 @@ pref("general.useragent.vendor", "Mozilla Firebird");
pref("general.useragent.vendorSub", "0.6.1+");
pref("general.smoothScroll", false);
pref("general.autoScroll", true);
pref("backups.number_of_prefs_copies", 1);

View File

@ -12,9 +12,9 @@
<script type="application/x-javascript">
<![CDATA[
var _elementIDs = ["moveSystemCaret", "hideTabBar",
"loadInBackground", "useSmoothScrolling",
"enableAutoImageResizing", "useSSL2",
"useSSL3", "useTLS1"];
"loadInBackground", "useAutoScrolling",
"useSmoothScrolling", "enableAutoImageResizing",
"useSSL2", "useSSL3", "useTLS1"];
]]>
</script>
@ -28,6 +28,8 @@
prefstring="browser.tabs.autoHide"/>
<checkbox id="loadInBackground" label="&loadInBackground.label;"
prefstring="browser.tabs.loadInBackground"/>
<checkbox id="useAutoScrolling" label="&useAutoScrolling.label;"
prefstring="general.autoScroll"/>
<checkbox id="useSmoothScrolling" label="&useSmoothScrolling.label;"
prefstring="general.smoothScroll"/>
</expander>

View File

@ -7,6 +7,7 @@
<!ENTITY browsing.label "Browsing">
<!ENTITY hideTabBar.label "Hide the tab bar when only one website is open">
<!ENTITY loadInBackground.label "Open links in the background">
<!ENTITY useAutoScrolling.label "Use autoscrolling">
<!ENTITY useSmoothScrolling.label "Use smooth scrolling">
<!ENTITY multimedia.label "Multimedia">
<!ENTITY enableAutoImageResizing.label "Enable Automatic Image Resizing">

View File

@ -49,6 +49,24 @@
</getter>
</property>
<property name="autoscrollEnabled">
<getter>
<![CDATA[
if (this.getAttribute("autoscroll") == "false")
return false;
var enabled = true;
try {
enabled = this.mPrefs.getBoolPref("general.autoScroll");
}
catch(ex) {
}
return enabled;
]]>
</getter>
</property>
<property name="canGoBack"
onget="return this.webNavigation.canGoBack;"
readonly="true"/>
@ -607,16 +625,17 @@
}
]]>
</handler>
#ifdef XP_WIN
<handler event="mouseup">
<![CDATA[
if (!this.autoscrollEnabled)
return;
if (!this._snapOn)
this.stopScroll();
]]>
</handler>
<handler event="mousedown">
<![CDATA[
if (this.getAttribute("autoscroll") == "false" || this.isLink(event.originalTarget))
if (!this.autoscrollEnabled || this.isLink(event.originalTarget))
return;
if (!this._isScrolling) {
@ -637,7 +656,7 @@
]]>
</handler>
<handler event="mousemove">
<![CDATA[
<![CDATA[
this._clientX = event.clientX;
this._clientY = event.clientY;
@ -650,7 +669,6 @@
}
]]>
</handler>
#endif
</handlers>
</binding>