Part of 302269 - Make "Updates Available" page use standard wizard buttons.

Add an "extra1" button to the wizard button deck: it is guaranteed left-aligned on all platforms.
r=darin


git-svn-id: svn://10.0.0.236/trunk@177069 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
ben%bengoodger.com
2005-08-03 20:17:23 +00:00
parent 8295ccdc8c
commit 57efcb398b

View File

@@ -147,6 +147,7 @@
<field name="_nextFunc">(function() { document.documentElement.advance(); })</field>
<field name="_finishFunc">(function() { document.documentElement.advance(); })</field>
<field name="_cancelFunc">(function() { document.documentElement.cancel(); })</field>
<field name="_extra1Func">(function() { document.documentElement.extra1(); })</field>
<field name="_closeHandler">(function(event) {
if (document.documentElement.cancel())
@@ -177,6 +178,7 @@
this._initWizardButton("next");
this._initWizardButton("finish");
this._initWizardButton("cancel");
this._initWizardButton("extra1");
this._initPages();
@@ -197,6 +199,13 @@
return els.item(0);
]]></body>
</method>
<method name="extra1">
<body><![CDATA[
if (this.currentPage)
this._fireEvent(this.currentPage, "extra1");
]]></body>
</method>
<method name="rewind">
<body><![CDATA[
@@ -338,15 +347,19 @@
var btn = document.getAnonymousElementByAttribute(this._wizardButtons, "dlgtype", aName);
if (btn) {
btn.addEventListener("command", this["_"+aName+"Func"], false);
try {
#ifdef XP_UNIX
#ifdef XP_MACOSX
btn.setAttribute("label", this._bundle.GetStringFromName("button-"+aName+"-mac"));
btn.setAttribute("label", this._bundle.GetStringFromName("button-"+aName+"-mac"));
#else
btn.setAttribute("label", this._bundle.GetStringFromName("button-"+aName+"-unix"));
btn.setAttribute("label", this._bundle.GetStringFromName("button-"+aName+"-unix"));
#endif
#else
btn.setAttribute("label", this._bundle.GetStringFromName("button-"+aName));
btn.setAttribute("label", this._bundle.GetStringFromName("button-"+aName));
#endif
}
catch (e) {
}
this["_"+aName+"Button"] = btn;
}
return btn;
@@ -498,7 +511,10 @@
<xul:vbox class="wizard-buttons-box-1" flex="1">
<xul:separator class="wizard-buttons-separator groove"/>
<xul:hbox class="wizard-buttons-box-2">
<xul:spacer flex="1"/>
<xul:button class="wizard-button" dlgtype="extra1" hidden="true"/>
#ifndef XP_MACOSX
<xul:spacer flex="1" anonid="spacer"/>
#endif
#ifdef XP_UNIX
<xul:button class="wizard-button" dlgtype="cancel" icon="cancel"/>
<xul:spacer style="width: 24px"/>