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
Родитель af090d4796
Коммит c9244f6006
5 изменённых файлов: 30 добавлений и 7 удалений

Просмотреть файл

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

Просмотреть файл

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

Просмотреть файл

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

Просмотреть файл

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

Просмотреть файл

@ -49,6 +49,24 @@
</getter> </getter>
</property> </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" <property name="canGoBack"
onget="return this.webNavigation.canGoBack;" onget="return this.webNavigation.canGoBack;"
readonly="true"/> readonly="true"/>
@ -607,16 +625,17 @@
} }
]]> ]]>
</handler> </handler>
#ifdef XP_WIN
<handler event="mouseup"> <handler event="mouseup">
<![CDATA[ <![CDATA[
if (!this.autoscrollEnabled)
return;
if (!this._snapOn) if (!this._snapOn)
this.stopScroll(); this.stopScroll();
]]> ]]>
</handler> </handler>
<handler event="mousedown"> <handler event="mousedown">
<![CDATA[ <![CDATA[
if (this.getAttribute("autoscroll") == "false" || this.isLink(event.originalTarget)) if (!this.autoscrollEnabled || this.isLink(event.originalTarget))
return; return;
if (!this._isScrolling) { if (!this._isScrolling) {
@ -650,7 +669,6 @@
} }
]]> ]]>
</handler> </handler>
#endif
</handlers> </handlers>
</binding> </binding>