From f215a4a4890ff9e6bcaa664d591b3be21de1222f Mon Sep 17 00:00:00 2001 From: "ssu%netscape.com" Date: Tue, 29 Apr 2003 08:38:12 +0000 Subject: [PATCH] fixing bug 203377 - Alert dialogs to close browser/kill process have hard coded 'Mozilla' strings. r=sgehani, sr=jag, a=asa git-svn-id: svn://10.0.0.236/trunk@141929 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/xpinstall/packager/win_gre/install.it | 4 ++-- .../xpinstall/packager/win_mfcembed/install.it | 4 ++-- mozilla/xpinstall/packager/windows/install.it | 4 ++-- mozilla/xpinstall/wizard/windows/setup/dialogs.c | 9 +++------ mozilla/xpinstall/wizard/windows/setup/extra.c | 15 ++++++++------- 5 files changed, 17 insertions(+), 19 deletions(-) diff --git a/mozilla/xpinstall/packager/win_gre/install.it b/mozilla/xpinstall/packager/win_gre/install.it index 15e7ce6018b..e93b033ed83 100644 --- a/mozilla/xpinstall/packager/win_gre/install.it +++ b/mozilla/xpinstall/packager/win_gre/install.it @@ -120,6 +120,6 @@ ERROR_DLL_LOAD=Could not load %s ERROR_STRING_LOAD=Could not load string resource ID %d ERROR_STRING_NULL=Null pointer encountered. ERROR_GLOBALALLOC=Memory allocation error. -MSG_FORCE_QUIT_PROCESS=Setup has detected that %s (%s) is still running. Click OK to quit Mozilla and proceed with installation. Alternatively, use the Windows Task Manager to quit Mozilla, and then click OK to continue with installation. -MSG_FORCE_QUIT_PROCESS_FAILED=Setup will now exit. Setup could not continue because %s (%s) is still running. Try manually quitting Mozilla using Windows Task Manager, and then run Setup again. +MSG_FORCE_QUIT_PROCESS=Setup has detected that %s (%s) is still running. Click OK to quit %s and proceed with installation. Alternatively, use the Windows Task Manager to quit %s, and then click OK to continue with installation. +MSG_FORCE_QUIT_PROCESS_FAILED=Setup will now exit. Setup could not continue because %s (%s) is still running. Try manually quitting %s using Windows Task Manager, and then run Setup again. diff --git a/mozilla/xpinstall/packager/win_mfcembed/install.it b/mozilla/xpinstall/packager/win_mfcembed/install.it index 15e7ce6018b..e93b033ed83 100644 --- a/mozilla/xpinstall/packager/win_mfcembed/install.it +++ b/mozilla/xpinstall/packager/win_mfcembed/install.it @@ -120,6 +120,6 @@ ERROR_DLL_LOAD=Could not load %s ERROR_STRING_LOAD=Could not load string resource ID %d ERROR_STRING_NULL=Null pointer encountered. ERROR_GLOBALALLOC=Memory allocation error. -MSG_FORCE_QUIT_PROCESS=Setup has detected that %s (%s) is still running. Click OK to quit Mozilla and proceed with installation. Alternatively, use the Windows Task Manager to quit Mozilla, and then click OK to continue with installation. -MSG_FORCE_QUIT_PROCESS_FAILED=Setup will now exit. Setup could not continue because %s (%s) is still running. Try manually quitting Mozilla using Windows Task Manager, and then run Setup again. +MSG_FORCE_QUIT_PROCESS=Setup has detected that %s (%s) is still running. Click OK to quit %s and proceed with installation. Alternatively, use the Windows Task Manager to quit %s, and then click OK to continue with installation. +MSG_FORCE_QUIT_PROCESS_FAILED=Setup will now exit. Setup could not continue because %s (%s) is still running. Try manually quitting %s using Windows Task Manager, and then run Setup again. diff --git a/mozilla/xpinstall/packager/windows/install.it b/mozilla/xpinstall/packager/windows/install.it index 15e7ce6018b..e93b033ed83 100644 --- a/mozilla/xpinstall/packager/windows/install.it +++ b/mozilla/xpinstall/packager/windows/install.it @@ -120,6 +120,6 @@ ERROR_DLL_LOAD=Could not load %s ERROR_STRING_LOAD=Could not load string resource ID %d ERROR_STRING_NULL=Null pointer encountered. ERROR_GLOBALALLOC=Memory allocation error. -MSG_FORCE_QUIT_PROCESS=Setup has detected that %s (%s) is still running. Click OK to quit Mozilla and proceed with installation. Alternatively, use the Windows Task Manager to quit Mozilla, and then click OK to continue with installation. -MSG_FORCE_QUIT_PROCESS_FAILED=Setup will now exit. Setup could not continue because %s (%s) is still running. Try manually quitting Mozilla using Windows Task Manager, and then run Setup again. +MSG_FORCE_QUIT_PROCESS=Setup has detected that %s (%s) is still running. Click OK to quit %s and proceed with installation. Alternatively, use the Windows Task Manager to quit %s, and then click OK to continue with installation. +MSG_FORCE_QUIT_PROCESS_FAILED=Setup will now exit. Setup could not continue because %s (%s) is still running. Try manually quitting %s using Windows Task Manager, and then run Setup again. diff --git a/mozilla/xpinstall/wizard/windows/setup/dialogs.c b/mozilla/xpinstall/wizard/windows/setup/dialogs.c index 881ee8d1d04..55b94a8a3ee 100644 --- a/mozilla/xpinstall/wizard/windows/setup/dialogs.c +++ b/mozilla/xpinstall/wizard/windows/setup/dialogs.c @@ -2574,15 +2574,12 @@ void ProcessWindowsMessages() void ShowMessage(LPSTR szMessage, BOOL bShow) { - char szBuf[MAX_BUF]; - - if(!hDlgMessage ||!szMessage) - return; - if(sgProduct.mode != SILENT) { - if(bShow) + if(bShow && szMessage) { + char szBuf[MAX_BUF]; + ZeroMemory(szBuf, sizeof(szBuf)); GetPrivateProfileString("Messages", "MB_MESSAGE_STR", "", szBuf, sizeof(szBuf), szFileIniInstall); hDlgMessage = InstantiateDialog(hWndMain, DLG_MESSAGE, szBuf, DlgProcMessage); diff --git a/mozilla/xpinstall/wizard/windows/setup/extra.c b/mozilla/xpinstall/wizard/windows/setup/extra.c index 952f77d709a..5575b6bacad 100644 --- a/mozilla/xpinstall/wizard/windows/setup/extra.c +++ b/mozilla/xpinstall/wizard/windows/setup/extra.c @@ -2452,9 +2452,6 @@ HRESULT ProcessXpinstallEngine() { HRESULT rv = WIZ_OK; - if(*siCFXpcomFile.szMessage != '\0') - ShowMessage(siCFXpcomFile.szMessage, TRUE); - /* If product to be installed is _not_ GRE, then call ProcessGRE. * ProcessGre() will either install GRE or simply run the existing * GRE's installer that's already on the system. This will setup @@ -2463,6 +2460,9 @@ HRESULT ProcessXpinstallEngine() if(lstrcmpi(sgProduct.szProductNameInternal, "GRE") != 0) rv = ProcessGre(&gGre); + if(*siCFXpcomFile.szMessage != '\0') + ShowMessage(siCFXpcomFile.szMessage, TRUE); + if((WIZ_OK == rv) && (siCFXpcomFile.bStatus == STATUS_ENABLED)) rv = ProcessXpcomFile(); @@ -5811,7 +5811,7 @@ HRESULT ShowMessageAndQuitProcess(HWND aHwndFW, char *aMsgQuitProcess, char *aMs { char msgTitleStr[MAX_BUF]; GetPrivateProfileString("Messages", "MB_ATTENTION_STR", "", msgTitleStr, sizeof(msgTitleStr), szFileIniInstall); - MessageBox(hWndMain, aMsgQuitProcess, msgTitleStr, MB_ICONEXCLAMATION); + MessageBox(hWndMain, aMsgQuitProcess, msgTitleStr, MB_ICONEXCLAMATION | MB_SETFOREGROUND); break; } @@ -5846,6 +5846,7 @@ HRESULT ShowMessageAndQuitProcess(HWND aHwndFW, char *aMsgQuitProcess, char *aMs if(aCloseAllWindows) CloseAllWindowsOfWindowHandle(aHwndFW, aMsgWait); } + Delay(2); return(WIZ_OK); } @@ -5905,7 +5906,7 @@ HRESULT CheckInstances() GetPrivateProfileString("Messages", "MSG_FORCE_QUIT_PROCESS", "", message, sizeof(message), szFileIniInstall); if(*message != '\0') { - wsprintf(buf, message, prettyName, processName); + wsprintf(buf, message, prettyName, processName, prettyName, prettyName); ShowMessageAndQuitProcess(NULL, buf, msgWait, bCloseAllWindows, processName, CI_FORCE_QUIT_PROCESS); ++killProcessTries; instanceOfFoundProcess = index--; @@ -5918,11 +5919,11 @@ HRESULT CheckInstances() GetPrivateProfileString("Messages", "MSG_FORCE_QUIT_PROCESS_FAILED", "", message, sizeof(message), szFileIniInstall); if(*message != '\0') { - wsprintf(buf, message, prettyName, processName); + wsprintf(buf, message, prettyName, processName, prettyName); switch(sgProduct.mode) { case NORMAL: - MessageBox(hWndMain, buf, msgTitleStr, MB_ICONEXCLAMATION); + MessageBox(hWndMain, buf, msgTitleStr, MB_ICONEXCLAMATION | MB_SETFOREGROUND); break; case AUTO: