Bug 264282 - PFS never tells what type of plugin is needed if no plugin is found. r/a=mconnor

git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_8_BRANCH@187686 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
doronr%us.ibm.com
2006-01-16 16:11:34 +00:00
parent bc62db4ac3
commit 04666c2c63
3 changed files with 25 additions and 10 deletions

View File

@@ -18,7 +18,7 @@ pluginInstallationSummary.manualInstall.tooltip=Manually install the plugin.
pluginInstallation.noPluginsFound=No suitable plugins were found.
pluginInstallation.noPluginsInstalled=No plugins were installed.
pluginInstallation.unknownPlugin=Unknown Plugin
pluginInstallation.unknownPlugin=Unknown Plugin (%S)
missingPlugin.label=Click here to download plugin.

View File

@@ -55,6 +55,9 @@ function nsPluginInstallerWizard(){
// array holding pids of plugins that require a license
this.mPluginLicenseArray = new Array();
// how many plugins are to be installed
this.pluginsToInstallNum = 0;
this.mTab = null;
this.mSuccessfullPluginInstallation = 0;
@@ -163,14 +166,14 @@ nsPluginInstallerWizard.prototype.showPluginList = function (){
nsPluginInstallerWizard.prototype.toggleInstallPlugin = function (aPid, aCheckbox) {
this.mPluginInfoArray[aPid].toBeInstalled = aCheckbox.checked;
// if no plugins are checked, don't allow to advance
var pluginsToInstallNum = 0;
// if no plugins are checked, don't allow to advance
this.pluginsToInstallNum = 0;
for (pluginInfoItem in this.mPluginInfoArray){
if (this.mPluginInfoArray[pluginInfoItem].toBeInstalled)
pluginsToInstallNum++;
this.pluginsToInstallNum++;
}
if (pluginsToInstallNum > 0)
if (this.pluginsToInstallNum > 0)
this.canAdvance(true);
else
this.canAdvance(false);
@@ -218,7 +221,11 @@ nsPluginInstallerWizard.prototype.showLicenses = function (){
}
nsPluginInstallerWizard.prototype.enableNext = function (){
gPluginInstaller.canAdvance(true);
// if only one plugin exists, don't enable the next button until
// the license is accepted
if (gPluginInstaller.pluginsToInstallNum > 1)
gPluginInstaller.canAdvance(true);
document.getElementById("licenseRadioGroup1").disabled = false;
document.getElementById("licenseRadioGroup2").disabled = false;
}
@@ -306,6 +313,12 @@ nsPluginInstallerWizard.prototype.storeLicenseRadioGroup = function (){
pluginInfo.licenseAccepted = !document.getElementById("licenseRadioGroup").selectedIndex;
}
nsPluginInstallerWizard.prototype.licenseRadioGroupChange = function(aAccepted) {
// only if one plugin is to be installed should selection change the next button
if (this.pluginsToInstallNum == 1)
this.canAdvance(aAccepted);
}
nsPluginInstallerWizard.prototype.advancePage = function (aPageId, aCanAdvance, aCanRewind, aCanCancel){
this.canAdvance(true);
document.getElementById("plugin-installer-wizard").advance(aPageId);
@@ -503,14 +516,14 @@ nsPluginInstallerWizard.prototype.showPluginResults = function (){
var pluginRequest = this.mPluginRequestArray[pluginInfoItem];
// if there is a pluginspage, show UI
if (pluginRequest && pluginRequest.pluginsPage) {
if (pluginRequest) {
this.addPluginResultRow(
"",
this.getString("pluginInstallation.unknownPlugin"),
pluginInfoItem,
this.getFormattedString("pluginInstallation.unknownPlugin", [pluginInfoItem]),
null,
null,
this.mPluginRequestArray[pluginInfoItem].pluginsPage);
null,
pluginRequest.pluginsPage);
}
notInstalledList += "&mimetype=" + pluginInfoItem;

View File

@@ -98,8 +98,10 @@
<radiogroup id="licenseRadioGroup">
<radio id="licenseRadioGroup1" disabled="true"
oncommand="gPluginInstaller.licenseRadioGroupChange(true)"
label="&pluginWizard.licensePage.accept.label;"/>
<radio id="licenseRadioGroup2" disabled="true" selected="true"
oncommand="gPluginInstaller.licenseRadioGroupChange(false)"
label="&pluginWizard.licensePage.deny.label;"/>
</radiogroup>
</wizardpage>