home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip 2011 November
/
CHIP_2011_11.iso
/
Programy
/
Narzedzia
/
AIMP2
/
aimp_2.61.583.exe
/
$TEMP
/
YandexPackSetup.msi
/
filB79581AD31CD0A3BE291F74387CC1B12
< prev
next >
Wrap
Extensible Markup Language
|
2010-07-12
|
5KB
|
110 lines
<?xml version="1.0"?>
<!DOCTYPE bindings [
<!ENTITY % locale SYSTEM "chrome://yasearch/locale/package-management/package-management.dtd">
%locale;
]>
<bindings xmlns="http://www.mozilla.org/xbl"
xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
xmlns:xbl="http://www.mozilla.org/xbl"
xmlns:html="http://www.w3.org/1999/xhtml">
<binding id="notification-update"
inheritstyle="false">
<resources>
<stylesheet src="notification-update.css"/>
</resources>
<content>
<xul:image/>
<xul:vbox class="content">
<xul:label class="title" value="¬ification.update.title;"/>
<xul:label class="message" flex="1"/>
<xul:hbox class="buttons">
<xul:button class="button-custom" label="¬ification.update.custom;" oncommand="_install(false);" link="true"/>
<xul:vbox flex="1"/>
<xul:button label="¬ification.update.install;" oncommand="_install(true);"/>
</xul:hbox>
</xul:vbox>
</content>
<implementation>
<field name="dialog">document.documentElement</field>
<field name="parameters">window.parameters</field>
<field name="_application">this.parameters.application</field>
<field name="_widgetLibrary">this._application.widgetLibrary</field>
<field name="_packageManager">this._application.packageManager</field>
<field name="_overlayProvider">this._application.overlayProvider</field>
<field name="_XB">this._application.core.Lib.XB</field>
<field name="_misc">this._application.core.Lib.misc</field>
<field name="_sysutils">this._application.core.Lib.sysutils</field>
<field name="_logger">this._application.core.Log4Moz.repository.getLogger(this._application.name + ".PackageManagementDialog")</field>
<field name="_bundle">new this._misc.StringBundle("package-management/package-management.properties")</field>
<field name="_nodeMessage">document.getAnonymousElementByAttribute(this, "class", "message")</field>
<constructor><![CDATA[
var text = null,
presets = this.parameters.presets,
manifests = this.parameters.manifests;
if (!text && presets.length == 0 && manifests.length > 0) {
let widgets = [];
for each (let manifest in manifests)
for each (let prototype in this._widgetLibrary.getWidgetProtos(manifest.packageID))
widgets.push(this._normalize(prototype.name));
if (widgets.length > 0)
if (widgets.length == 1)
text = this._bundle.get("notification.update.message.widget", [widgets[0]]);
}
if (!text && presets.length == 1) {
let preset = presets[0];
let widgetsInfo = preset.widgetsInfo;
let united = true;
for each (let manifest in manifests) {
let used = false;
for each (let widgetInfo in widgetsInfo)
if (widgetInfo.packageID == manifest.packageID) {
used = true;
break;
}
if (used)
continue;
united = false;
break;
}
if (united)
text = this._bundle.get("notification.update.message.preset", [this._normalize(preset.name)]);
}
if (!text)
text = this._bundle.get("notification.update.message.combo");
this._nodeMessage.textContent = text;
]]></constructor>
<method name="_normalize">
<parameter name="text"/>
<body><![CDATA[
return this._sysutils.insertBreaksInString(text);
]]></body>
</method>
<method name="_install">
<parameter name="simple"/>
<body><![CDATA[
this.parameters.install(simple);
this.dialog.close();
]]></body>
</method>
</implementation>
<handlers>
<handler event="click"><![CDATA[
//this._install(false);
]]></handler>
</handlers>
</binding>
</bindings>