bug 260335 toolkit port: support disabling colorpicker buttons

r=mconnor
This commit is contained in:
cbiesinger%web.de 2004-12-05 21:47:27 +00:00
Родитель 39faa97bba
Коммит e6cd639561
1 изменённых файлов: 11 добавлений и 3 удалений

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

@ -412,7 +412,7 @@
</resources>
<content>
<xul:hbox class="colorpicker-button-colorbox" anonid="colorbox" flex="1"/>
<xul:hbox class="colorpicker-button-colorbox" anonid="colorbox" flex="1" xbl:inherits="disabled"/>
<xul:popupset>
<xul:popup class="colorpicker-button-menupopup" anonid="colorpopup"
@ -420,14 +420,14 @@
onpopupshowing="this._colorPicker.onPopupShowing()"
onpopuphiding="this._colorPicker.onPopupHiding()">
<xul:colorpicker xbl:inherits="palettename" allowevents="true" anonid="colorpicker"
<xul:colorpicker xbl:inherits="palettename,disabled" allowevents="true" anonid="colorpicker"
onselect="this.parentNode.parentNode.parentNode.pickerChange()"/>
</xul:popup>
</xul:popupset>
</content>
<implementation implements="nsIAccessibleProvider" >
<implementation implements="nsIAccessibleProvider, nsIDOMXULControlElement">
<property name="accessible">
<getter>
<![CDATA[
@ -439,6 +439,11 @@
<property name="open" onget="return this.mOpen"/>
<property name="disabled" onset="if (val) this.setAttribute('disabled',true);
else this.removeAttribute('disabled');
return val;"
onget="return this.hasAttribute('disabled');"/>
<property name="color">
<getter><![CDATA[
return this.getAttribute("color");
@ -533,6 +538,9 @@
]]></handler>
<handler event="mousedown"><![CDATA[
if (this.disabled)
return;
// Though I would prefer the open the popup using the built-in
// popup="_child" mechanism, I can't use that because I can't seem to
// get it to recognize the popupalign and popupanchor attributes that way