summaryrefslogtreecommitdiff
path: root/plugins/PluginUpdater
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/PluginUpdater')
-rw-r--r--plugins/PluginUpdater/src/Common.h4
-rw-r--r--plugins/PluginUpdater/src/DlgListNew.cpp8
-rw-r--r--plugins/PluginUpdater/src/DlgUpdate.cpp7
-rw-r--r--plugins/PluginUpdater/src/Events.cpp4
-rw-r--r--plugins/PluginUpdater/src/Notifications.cpp1
-rw-r--r--plugins/PluginUpdater/src/Version.h2
6 files changed, 21 insertions, 5 deletions
diff --git a/plugins/PluginUpdater/src/Common.h b/plugins/PluginUpdater/src/Common.h
index 0025df82d2..3785594d4a 100644
--- a/plugins/PluginUpdater/src/Common.h
+++ b/plugins/PluginUpdater/src/Common.h
@@ -127,11 +127,13 @@ extern PlugOptions opts;
extern POPUP_OPTIONS PopupOptions;
extern aPopups PopupsList[POPUPS];
extern HANDLE Timer, hPipe;
-extern HWND hwndDialog;
void DoCheck(int iFlag);
void DoGetList(int iFlag);
+void UninitCheck(void);
+void UninitListNew(void);
+
struct AutoHandle
{
HANDLE &m_handle;
diff --git a/plugins/PluginUpdater/src/DlgListNew.cpp b/plugins/PluginUpdater/src/DlgListNew.cpp
index 1f3696c392..eded09dc1e 100644
--- a/plugins/PluginUpdater/src/DlgListNew.cpp
+++ b/plugins/PluginUpdater/src/DlgListNew.cpp
@@ -19,6 +19,8 @@ Boston, MA 02111-1307, USA.
#include "common.h"
+static HWND hwndDialog;
+
static void SelectAll(HWND hDlg, bool bEnable)
{
OBJLIST<FILEINFO> &todo = *(OBJLIST<FILEINFO> *)GetWindowLongPtr(hDlg, GWLP_USERDATA);
@@ -458,3 +460,9 @@ void DoGetList(int iFlag)
else if (iFlag)
hListThread = mir_forkthread(GetList, 0);
}
+
+void UninitListNew()
+{
+ if (hwndDialog != NULL)
+ DestroyWindow(hwndDialog);
+}
diff --git a/plugins/PluginUpdater/src/DlgUpdate.cpp b/plugins/PluginUpdater/src/DlgUpdate.cpp
index a0909607df..ebef698ea5 100644
--- a/plugins/PluginUpdater/src/DlgUpdate.cpp
+++ b/plugins/PluginUpdater/src/DlgUpdate.cpp
@@ -22,6 +22,7 @@ Boston, MA 02111-1307, USA.
#define UM_ERROR (WM_USER+1)
static bool bShowDetails;
+static HWND hwndDialog;
static void SelectAll(HWND hDlg, bool bEnable)
{
@@ -572,3 +573,9 @@ void DoCheck(int iFlag)
hCheckThread = mir_forkthread(CheckUpdates, 0);
}
}
+
+void UninitCheck()
+{
+ if (hwndDialog != NULL)
+ DestroyWindow(hwndDialog);
+}
diff --git a/plugins/PluginUpdater/src/Events.cpp b/plugins/PluginUpdater/src/Events.cpp
index 470390ad4f..cf1e72f868 100644
--- a/plugins/PluginUpdater/src/Events.cpp
+++ b/plugins/PluginUpdater/src/Events.cpp
@@ -90,7 +90,7 @@ int OnPreShutdown(WPARAM wParam, LPARAM lParam)
CancelWaitableTimer(Timer);
CloseHandle(Timer);
- if (hwndDialog != NULL)
- DestroyWindow(hwndDialog);
+ UninitCheck();
+ UninitListNew();
return 0;
}
diff --git a/plugins/PluginUpdater/src/Notifications.cpp b/plugins/PluginUpdater/src/Notifications.cpp
index 0076c923f1..2bbde5976e 100644
--- a/plugins/PluginUpdater/src/Notifications.cpp
+++ b/plugins/PluginUpdater/src/Notifications.cpp
@@ -20,7 +20,6 @@ Boston, MA 02111-1307, USA.
#include "common.h"
HANDLE hPipe = NULL;
-HWND hwndDialog = NULL;
void PopupAction(HWND hWnd, BYTE action)
{
diff --git a/plugins/PluginUpdater/src/Version.h b/plugins/PluginUpdater/src/Version.h
index 891e33d56f..9e347c0ead 100644
--- a/plugins/PluginUpdater/src/Version.h
+++ b/plugins/PluginUpdater/src/Version.h
@@ -1,7 +1,7 @@
#define __MAJOR_VERSION 0
#define __MINOR_VERSION 1
#define __RELEASE_NUM 1
-#define __BUILD_NUM 8
+#define __BUILD_NUM 9
#include <stdver.h>