summaryrefslogtreecommitdiff
path: root/plugins/PluginUpdater
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/PluginUpdater')
-rw-r--r--plugins/PluginUpdater/src/Options.cpp7
-rw-r--r--plugins/PluginUpdater/src/PluginUpdater.cpp3
-rw-r--r--plugins/PluginUpdater/src/stdafx.h13
3 files changed, 10 insertions, 13 deletions
diff --git a/plugins/PluginUpdater/src/Options.cpp b/plugins/PluginUpdater/src/Options.cpp
index f26cde701f..df0961e6de 100644
--- a/plugins/PluginUpdater/src/Options.cpp
+++ b/plugins/PluginUpdater/src/Options.cpp
@@ -529,7 +529,7 @@ static INT_PTR CALLBACK DlgPopupOpts(HWND hdlg, UINT msg, WPARAM wParam, LPARAM
return FALSE;
}
-static int OptInit(WPARAM wParam, LPARAM)
+int OptInit(WPARAM wParam, LPARAM)
{
OPTIONSDIALOGPAGE odp = {};
odp.position = 100000000;
@@ -549,8 +549,3 @@ static int OptInit(WPARAM wParam, LPARAM)
}
return 0;
}
-
-void InitOptions()
-{
- HookEvent(ME_OPT_INITIALISE, OptInit);
-} \ No newline at end of file
diff --git a/plugins/PluginUpdater/src/PluginUpdater.cpp b/plugins/PluginUpdater/src/PluginUpdater.cpp
index 424d99cf80..21f680eec1 100644
--- a/plugins/PluginUpdater/src/PluginUpdater.cpp
+++ b/plugins/PluginUpdater/src/PluginUpdater.cpp
@@ -80,7 +80,8 @@ int CMPlugin::Load()
mi.pszService = MS_PU_SHOWLIST;
Menu_AddMainMenuItem(&mi);
- InitOptions();
+ // initialize options
+ HookEvent(ME_OPT_INITIALISE, OptInit);
// Add hotkey
HOTKEYDESC hkd = {};
diff --git a/plugins/PluginUpdater/src/stdafx.h b/plugins/PluginUpdater/src/stdafx.h
index b0b79345e8..6d04baf458 100644
--- a/plugins/PluginUpdater/src/stdafx.h
+++ b/plugins/PluginUpdater/src/stdafx.h
@@ -143,11 +143,11 @@ extern struct PlugOptions
#define DB_MODULE_FILES MODULENAME "Files"
#define DB_MODULE_NEW_FILES MODULENAME "NewFiles"
-#define MAX_RETRIES 3
+#define MAX_RETRIES 3
-#define IDINFO 3
-#define IDDOWNLOAD 4
-#define IDDOWNLOADALL 5
+#define IDINFO 3
+#define IDDOWNLOAD 4
+#define IDDOWNLOADALL 5
using namespace std;
@@ -170,6 +170,8 @@ struct CMPlugin : public PLUGIN<CMPlugin>
void UninitCheck(void);
void UninitListNew(void);
+int OptInit(WPARAM, LPARAM);
+
class AutoHandle : private MNonCopyable
{
HANDLE &m_handle;
@@ -216,7 +218,6 @@ void InitNetlib();
void InitIcoLib();
void InitServices();
void InitEvents();
-void InitOptions();
void InitListNew();
void InitCheck();
void CreateTimer();
@@ -253,4 +254,4 @@ int SafeMoveFile(const wchar_t *ptszSrc, const wchar_t *ptszDst);
int SafeDeleteFile(const wchar_t *ptszSrc);
int SafeCreateFilePath(const wchar_t *pFolder);
-char *StrToLower(char *str);
+char* StrToLower(char *str);