зеркало из https://github.com/mozilla/pjs.git
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:
Родитель
af090d4796
Коммит
c9244f6006
|
@ -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);
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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">
|
||||
|
|
|
@ -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) {
|
||||
|
@ -650,7 +669,6 @@
|
|||
}
|
||||
]]>
|
||||
</handler>
|
||||
#endif
|
||||
</handlers>
|
||||
|
||||
</binding>
|
||||
|
|
Загрузка…
Ссылка в новой задаче