mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 10:04:49 +00:00
[RAPPS] Ensure the download dialog is always destroyed
Ideally, this entire download thing should be rewritten, but that is something for another day.
This commit is contained in:
parent
1437433039
commit
946ee611a3
1 changed files with 12 additions and 3 deletions
|
@ -349,6 +349,7 @@ class CDownloadManager
|
|||
static CDowloadingAppsListView DownloadsListView;
|
||||
static CDownloaderProgress ProgressBar;
|
||||
static BOOL bCancelled;
|
||||
static BOOL bModal;
|
||||
static VOID UpdateProgress(HWND hDlg, ULONG ulProgress, ULONG ulProgressMax, ULONG ulStatusCode, LPCWSTR szStatusText);
|
||||
public:
|
||||
static VOID Add(DownloadInfo info);
|
||||
|
@ -363,7 +364,8 @@ public:
|
|||
ATL::CSimpleArray<DownloadInfo> CDownloadManager::AppsToInstallList;
|
||||
CDowloadingAppsListView CDownloadManager::DownloadsListView;
|
||||
CDownloaderProgress CDownloadManager::ProgressBar;
|
||||
BOOL CDownloadManager::bCancelled;
|
||||
BOOL CDownloadManager::bCancelled = FALSE;
|
||||
BOOL CDownloadManager::bModal = FALSE;
|
||||
|
||||
VOID CDownloadManager::Add(DownloadInfo info)
|
||||
{
|
||||
|
@ -452,8 +454,14 @@ INT_PTR CALLBACK CDownloadManager::DownloadDlgProc(HWND Dlg, UINT uMsg, WPARAM w
|
|||
return FALSE;
|
||||
|
||||
case WM_CLOSE:
|
||||
EndDialog(Dlg, 0);
|
||||
//DestroyWindow(Dlg);
|
||||
if (CDownloadManager::bModal)
|
||||
{
|
||||
::EndDialog(Dlg, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
::DestroyWindow(Dlg);
|
||||
}
|
||||
return TRUE;
|
||||
|
||||
default:
|
||||
|
@ -858,6 +866,7 @@ end:
|
|||
//TODO: Reuse the dialog
|
||||
VOID CDownloadManager::LaunchDownloadDialog(BOOL bIsModal)
|
||||
{
|
||||
CDownloadManager::bModal = bIsModal;
|
||||
if (bIsModal)
|
||||
{
|
||||
DialogBoxW(hInst,
|
||||
|
|
Loading…
Reference in a new issue