summaryrefslogtreecommitdiff
path: root/plugins/PluginUpdater/src/DlgUpdate.cpp
diff options
context:
space:
mode:
authorKirill Volinsky <mataes2007@gmail.com>2014-05-10 09:47:53 +0000
committerKirill Volinsky <mataes2007@gmail.com>2014-05-10 09:47:53 +0000
commit4ff152f48ca945be4a0065a5f57246449c741f8a (patch)
tree0fd33b2fd154d5ece3e6df4df271685a91dd88b3 /plugins/PluginUpdater/src/DlgUpdate.cpp
parent2d5679d79f16628fdc2f4b9f420817b6c3c1c6b1 (diff)
fixed windows closing after operations
code sync git-svn-id: http://svn.miranda-ng.org/main/trunk@9155 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/PluginUpdater/src/DlgUpdate.cpp')
-rw-r--r--plugins/PluginUpdater/src/DlgUpdate.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/plugins/PluginUpdater/src/DlgUpdate.cpp b/plugins/PluginUpdater/src/DlgUpdate.cpp
index ebef698ea5..7979403af1 100644
--- a/plugins/PluginUpdater/src/DlgUpdate.cpp
+++ b/plugins/PluginUpdater/src/DlgUpdate.cpp
@@ -48,7 +48,7 @@ static void ApplyUpdates(void *param)
// if we need to escalate priviledges, launch a atub
if (!PrepareEscalation()) {
- DestroyWindow(hDlg);
+ EndDialog(hDlg, 0);
return;
}
@@ -147,7 +147,8 @@ static void ApplyUpdates(void *param)
if (rc == IDYES)
CallFunctionAsync(RestartMe, 0);
}
- DestroyWindow(hDlg);
+ EndDialog(hDlg, 0);
+ return;
}
static void ResizeVert(HWND hDlg, int yy)
@@ -305,7 +306,6 @@ static INT_PTR CALLBACK DlgUpdate(HWND hDlg, UINT message, WPARAM wParam, LPARAM
break;
case IDCANCEL:
- Utils_SaveWindowPosition(hDlg, NULL, MODNAME, "ConfirmWindow");
DestroyWindow(hDlg);
return TRUE;
}
@@ -317,6 +317,10 @@ static INT_PTR CALLBACK DlgUpdate(HWND hDlg, UINT message, WPARAM wParam, LPARAM
DestroyWindow(hDlg);
break;
+ case WM_CLOSE:
+ DestroyWindow(hDlg);
+ break;
+
case WM_DESTROY:
Skin_ReleaseIcon((HICON)SendMessage(hDlg, WM_SETICON, ICON_SMALL, 0));
Utils_SaveWindowPosition(hDlg, NULL, MODNAME, "ConfirmWindow");