зеркало из https://github.com/mozilla/pjs.git
Don't underline XUL access keys on Mac. Bug 277463, patch by Asaf Romano <bugs.mano@mail-central.com>, r=neil.parkwaycc.co.uk@myrealbox.com, sr=bzbarsky
This commit is contained in:
Родитель
0cd70d64f3
Коммит
807268de05
|
@ -63,6 +63,12 @@
|
||||||
<implementation implements="nsIDOMXULLabelElement">
|
<implementation implements="nsIDOMXULLabelElement">
|
||||||
<constructor>
|
<constructor>
|
||||||
<![CDATA[
|
<![CDATA[
|
||||||
|
try {
|
||||||
|
var prefs = Components.classes["@mozilla.org/preferences-service;1"].
|
||||||
|
getService(Components.interfaces.nsIPrefBranch);
|
||||||
|
this.mUnderlineAccesskey = (prefs.getIntPref("ui.key.menuAccessKey") != 0);
|
||||||
|
}
|
||||||
|
catch (e) { }
|
||||||
this.formatAccessKey();
|
this.formatAccessKey();
|
||||||
]]>
|
]]>
|
||||||
</constructor>
|
</constructor>
|
||||||
|
@ -70,6 +76,9 @@
|
||||||
<method name="formatAccessKey">
|
<method name="formatAccessKey">
|
||||||
<body>
|
<body>
|
||||||
<![CDATA[
|
<![CDATA[
|
||||||
|
if (!this.mUnderlineAccesskey)
|
||||||
|
return;
|
||||||
|
|
||||||
var control = this.labeledControlElement;
|
var control = this.labeledControlElement;
|
||||||
if (!control) {
|
if (!control) {
|
||||||
var bindingParent = document.getBindingParent(this);
|
var bindingParent = document.getBindingParent(this);
|
||||||
|
@ -135,6 +144,10 @@
|
||||||
</body>
|
</body>
|
||||||
</method>
|
</method>
|
||||||
|
|
||||||
|
<field name="mUnderlineAccesskey">
|
||||||
|
!/Mac/.test(navigator.platform)
|
||||||
|
</field>
|
||||||
|
|
||||||
<property name="accessKey">
|
<property name="accessKey">
|
||||||
<getter>
|
<getter>
|
||||||
<![CDATA[
|
<![CDATA[
|
||||||
|
|
Загрузка…
Ссылка в новой задаче