summaryrefslogtreecommitdiff
path: root/plugins
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
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')
-rw-r--r--plugins/PluginUpdater/PluginUpdater_12.vcxproj.filters17
-rw-r--r--plugins/PluginUpdater/src/Common.h1
-rw-r--r--plugins/PluginUpdater/src/DlgListNew.cpp10
-rw-r--r--plugins/PluginUpdater/src/DlgUpdate.cpp10
-rw-r--r--plugins/PluginUpdater/src/Services.cpp2
5 files changed, 24 insertions, 16 deletions
diff --git a/plugins/PluginUpdater/PluginUpdater_12.vcxproj.filters b/plugins/PluginUpdater/PluginUpdater_12.vcxproj.filters
index aff5025a43..97de51ad38 100644
--- a/plugins/PluginUpdater/PluginUpdater_12.vcxproj.filters
+++ b/plugins/PluginUpdater/PluginUpdater_12.vcxproj.filters
@@ -13,6 +13,9 @@
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav</Extensions>
</Filter>
+ <Filter Include="Resource Files\Icons">
+ <UniqueIdentifier>{794a226d-3db3-4b7e-aa4c-4d1b4d1aa76d}</UniqueIdentifier>
+ </Filter>
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="res\Resource.rc">
@@ -72,17 +75,17 @@
</ClCompile>
</ItemGroup>
<ItemGroup>
- <Image Include="res\menu.ico">
- <Filter>Resource Files</Filter>
+ <Image Include="res\btnClose.ico">
+ <Filter>Resource Files\Icons</Filter>
</Image>
<Image Include="res\btnOk.ico">
- <Filter>Resource Files</Filter>
- </Image>
- <Image Include="res\btnClose.ico">
- <Filter>Resource Files</Filter>
+ <Filter>Resource Files\Icons</Filter>
</Image>
<Image Include="res\info.ico">
- <Filter>Resource Files</Filter>
+ <Filter>Resource Files\Icons</Filter>
+ </Image>
+ <Image Include="res\menu.ico">
+ <Filter>Resource Files\Icons</Filter>
</Image>
</ItemGroup>
</Project> \ No newline at end of file
diff --git a/plugins/PluginUpdater/src/Common.h b/plugins/PluginUpdater/src/Common.h
index 3785594d4a..2f916f3673 100644
--- a/plugins/PluginUpdater/src/Common.h
+++ b/plugins/PluginUpdater/src/Common.h
@@ -40,6 +40,7 @@ Boston, MA 02111-1307, USA.
#include <m_netlib.h>
#include <m_icolib.h>
#include <win2k.h>
+#include "m_pluginupdater.h"
#include <m_folders.h>
#include <m_popup2.h>
diff --git a/plugins/PluginUpdater/src/DlgListNew.cpp b/plugins/PluginUpdater/src/DlgListNew.cpp
index eded09dc1e..255066ea01 100644
--- a/plugins/PluginUpdater/src/DlgListNew.cpp
+++ b/plugins/PluginUpdater/src/DlgListNew.cpp
@@ -40,7 +40,7 @@ static void ApplyDownloads(void *param)
// if we need to escalate priviledges, launch a atub
if (!PrepareEscalation()) {
- DestroyWindow(hDlg);
+ EndDialog(hDlg, 0);
return;
}
@@ -118,9 +118,7 @@ static void ApplyDownloads(void *param)
if (rc == IDYES)
CallFunctionAsync(OpenPluginOptions, 0);
- CloseWindow(hDlg);
- DestroyWindow(hDlg);
- hwndDialog = NULL;
+ EndDialog(hDlg, 0);
return;
}
@@ -363,6 +361,10 @@ INT_PTR CALLBACK DlgList(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
}
break;
+ case WM_CLOSE:
+ DestroyWindow(hDlg);
+ break;
+
case WM_DESTROY:
Utils_SaveWindowPosition(hDlg, NULL, MODNAME, "ListWindow");
Skin_ReleaseIcon((HICON)SendMessage(hDlg, WM_SETICON, ICON_BIG, 0));
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");
diff --git a/plugins/PluginUpdater/src/Services.cpp b/plugins/PluginUpdater/src/Services.cpp
index 0fb3bf4c1b..282163c88d 100644
--- a/plugins/PluginUpdater/src/Services.cpp
+++ b/plugins/PluginUpdater/src/Services.cpp
@@ -19,8 +19,6 @@ Boston, MA 02111-1307, USA.
#include "common.h"
-#include "m_pluginupdater.h"
-
static INT_PTR srvParseHashes(WPARAM wParam, LPARAM lParam)
{
LPCTSTR ptszUrl = (LPCTSTR)wParam;