Bug 349603 - Show the same installation UI for extensions and themes. rs=deviditz, ui-r=mconnor.

This commit is contained in:
mozilla.mano%sent.com 2006-08-27 17:01:01 +00:00
parent af66a4d87a
commit e39fdc0329
2 changed files with 11 additions and 1 deletions

View File

@ -283,21 +283,28 @@ nsXPInstallManager::InitManagerInternal()
// Get permission to install
//-----------------------------------------------------
#ifdef ENABLE_SKIN_SIMPLE_INSTALLATION_UI
if ( mChromeType == CHROME_SKIN )
{
// We may want to enable the simple installation UI once
// bug 343037 is fixed
// skins get a simpler/friendlier dialog
// XXX currently not embeddable
OKtoInstall = ConfirmChromeInstall( mParentWindow, packageList );
}
else
{
#endif
rv = dlgSvc->ConfirmInstall( mParentWindow,
packageList,
numStrings,
&OKtoInstall );
if (NS_FAILED(rv))
OKtoInstall = PR_FALSE;
#ifdef ENABLE_SKIN_SIMPLE_INSTALLATION_UI
}
#endif
if (OKtoInstall)
{
@ -388,6 +395,7 @@ nsXPInstallManager::ConfirmInstall(nsIDOMWindow *aParent, const PRUnichar **aPac
return rv;
}
#ifdef ENABLE_SKIN_SIMPLE_INSTALLATION_UI
PRBool nsXPInstallManager::ConfirmChromeInstall(nsIDOMWindowInternal* aParentWindow, const PRUnichar **aPackage)
{
// get the dialog strings
@ -445,7 +453,7 @@ PRBool nsXPInstallManager::ConfirmChromeInstall(nsIDOMWindowInternal* aParentWin
return bInstall;
}
#endif
NS_IMETHODIMP
nsXPInstallManager::OpenProgressDialog(const PRUnichar **aPackageList, PRUint32 aCount, nsIObserver *aObserver)

View File

@ -108,7 +108,9 @@ class nsXPInstallManager : public nsIXPIListener,
void Shutdown();
NS_IMETHOD GetDestinationFile(nsString& url, nsILocalFile* *file);
NS_IMETHOD LoadParams(PRUint32 aCount, const PRUnichar** aPackageList, nsIDialogParamBlock** aParams);
#ifdef ENABLE_SKIN_SIMPLE_INSTALLATION_UI
PRBool ConfirmChromeInstall(nsIDOMWindowInternal* aParentWindow, const PRUnichar** aPackage);
#endif
PRBool TimeToUpdate(PRTime now);
PRBool VerifyHash(nsXPITriggerItem* aItem);
PRInt32 GetIndexFromURL(const PRUnichar* aUrl);