Bug 282180 - "sync xpfe button.xml with toolkit button.xml" ((Bv1a-TK) <button.xml>) [p=sgautherie.bz@free.fr (Serge Gautherie) r=Mano a1.9=beltzner]

This commit is contained in:
reed@reedloden.com 2007-11-07 01:11:05 -08:00
Родитель cbef8231d2
Коммит 739949cd30
1 изменённых файлов: 27 добавлений и 13 удалений

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

@ -114,20 +114,31 @@
]]>
</body>
</method>
<method name="_handleClick">
<body>
<![CDATA[
if (!this.disabled &&
(this.autoCheck || !this.hasAttribute("autoCheck"))) {
if (this.type == "checkbox") {
this.checked = !this.checked;
} else if (this.type == "radio") {
this.checked = true;
}
}
]]>
</body>
</method>
</implementation>
<handlers>
<handler event="command">
<![CDATA[
if (this.autoCheck || !this.hasAttribute("autoCheck")) {
if (this.type == "checkbox") {
this.checked = !this.checked;
} else if (this.type == "radio") {
this.checked = true;
}
}
]]>
</handler>
<!-- While it would seem we could do this by handling oncommand, we can't
because any external oncommand handlers might get called before ours,
and then they would see the incorrect value of checked. Additionally
a command attribute would redirect the command events anyway.-->
<handler event="click" button="0" action="this._handleClick();"/>
<handler event="keypress" key=" " action="this._handleClick();"/>
<handler event="keypress">
<![CDATA[
@ -211,8 +222,11 @@
<xul:hbox class="box-inherit button-box" xbl:inherits="align,dir,pack,orient"
align="center" pack="center" flex="1">
<children>
<xul:image class="button-icon" xbl:inherits="src=image"/>
<xul:label class="button-text" xbl:inherits="value=label,accesskey,crop" flex="1"/>
<xul:hbox class="box-inherit" xbl:inherits="align,dir,pack,orient"
align="center" pack="center" flex="1">
<xul:image class="button-icon" xbl:inherits="src=image"/>
<xul:label class="button-text" xbl:inherits="value=label,accesskey,crop"/>
</xul:hbox>
<xul:dropmarker class="button-menu-dropmarker" xbl:inherits="open,disabled,label"/>
</children>
</xul:hbox>