From 751fcc4ab0cc0c4fc82e38251ade8239ecae6e2d Mon Sep 17 00:00:00 2001 From: Vadim Dashevskiy Date: Mon, 21 Jul 2014 09:15:11 +0000 Subject: "@White-Tiger, thanks for explanation" and now closing of updater window when pressing 'NO' on restart dialog is broken, reverting. git-svn-id: http://svn.miranda-ng.org/main/trunk@9898 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/PluginUpdater/src/DlgUpdate.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/plugins/PluginUpdater/src/DlgUpdate.cpp b/plugins/PluginUpdater/src/DlgUpdate.cpp index 9d97a09dd6..c7f02157ce 100644 --- a/plugins/PluginUpdater/src/DlgUpdate.cpp +++ b/plugins/PluginUpdater/src/DlgUpdate.cpp @@ -51,7 +51,7 @@ static void ApplyUpdates(void *param) // 1) If we need to escalate priviledges, launch a stub if (!PrepareEscalation()) { - DestroyWindow(hDlg); + EndDialog(hDlg, 0); return; } @@ -137,7 +137,8 @@ static void ApplyUpdates(void *param) // 5) Prepare Restart int rc = MessageBox(hDlg, TranslateT("Update complete. Press Yes to restart Miranda now or No to postpone a restart until the exit."), TranslateT("Plugin Updater"), MB_YESNO | MB_ICONQUESTION); - DestroyWindow(hDlg); + EndDialog(hDlg, 0); + PostMessage(hDlg, WM_DESTROY, 0, 0); // why do we have to call this manually? if (rc == IDYES) CallFunctionAsync(RestartMe, 0); } -- cgit v1.2.3