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]

git-svn-id: svn://10.0.0.236/trunk@238891 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
reed%reedloden.com 2007-11-07 09:11:05 +00:00
parent b10b2f07d7
commit 5b9729e75f

View File

@ -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>