summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVadim Dashevskiy <watcherhd@gmail.com>2014-07-21 09:15:11 +0000
committerVadim Dashevskiy <watcherhd@gmail.com>2014-07-21 09:15:11 +0000
commit751fcc4ab0cc0c4fc82e38251ade8239ecae6e2d (patch)
treecf6492ac0c5c52f3c96aeccddcaafcb42b1cc02f
parent6a894315ed986fe11ccbaf97fb15bbbe172c085d (diff)
"@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
-rw-r--r--plugins/PluginUpdater/src/DlgUpdate.cpp5
1 files 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);
}