summaryrefslogtreecommitdiff
path: root/plugins/MyDetails/options.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/MyDetails/options.cpp')
-rw-r--r--plugins/MyDetails/options.cpp62
1 files changed, 23 insertions, 39 deletions
diff --git a/plugins/MyDetails/options.cpp b/plugins/MyDetails/options.cpp
index 5e4db774cf..10f3823c0b 100644
--- a/plugins/MyDetails/options.cpp
+++ b/plugins/MyDetails/options.cpp
@@ -21,20 +21,12 @@ Boston, MA 02111-1307, USA.
#include "commons.h"
#include "options.h"
-
-
// Prototypes /////////////////////////////////////////////////////////////////////////////////////
Options opts;
-
-static BOOL CALLBACK DlgProcOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam);
-
-
// Functions //////////////////////////////////////////////////////////////////////////////////////
-
-
static OptPageControl pageControls[] = {
{ &opts.cycle_through_protocols, CONTROL_CHECKBOX, IDC_CYCLE_THROUGH_PROTOS, "CicleThroughtProtocols", (BYTE) 1 },
{ &opts.seconds_to_show_protocol, CONTROL_SPIN, IDC_CYCLE_TIME, "CicleTime", (WORD) 5, IDC_CYCLE_TIME_SPIN, (WORD) 1, (WORD) 255 },
@@ -80,37 +72,7 @@ void LoadOptions()
RefreshFrameAndCalcRects();
}
-
-int InitOptionsCallback(WPARAM wParam,LPARAM lParam)
-{
- OPTIONSDIALOGPAGE odp = { 0 };
- odp.cbSize = sizeof(odp);
- odp.position = -200000000;
- odp.hInstance = hInst;
- odp.pfnDlgProc = DlgProcOpts;
- odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPTS);
- odp.pszGroup = LPGEN("Customize");
- odp.pszTitle = LPGEN("My Details");
- odp.flags = ODPF_BOLDGROUPS;
- Options_AddPage(wParam, &odp);
- return 0;
-}
-
-
-void InitOptions()
-{
- LoadOptions();
-
- HookEvent(ME_OPT_INITIALISE, InitOptionsCallback);
-}
-
-// Deinitializations needed by options
-void DeInitOptions()
-{
-}
-
-
-static BOOL CALLBACK DlgProcOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam)
+static LRESULT CALLBACK DlgProcOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam)
{
BOOL ret = SaveOptsDlgProc(pageControls, SIZEOF(pageControls), MODULE_NAME, hwndDlg, msg, wParam, lParam);
@@ -193,3 +155,25 @@ static BOOL CALLBACK DlgProcOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM l
return ret;
}
+
+int InitOptionsCallback(WPARAM wParam,LPARAM lParam)
+{
+ OPTIONSDIALOGPAGE odp = { 0 };
+ odp.cbSize = sizeof(odp);
+ odp.position = -200000000;
+ odp.hInstance = hInst;
+ odp.pfnDlgProc = DlgProcOpts;
+ odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPTS);
+ odp.pszGroup = LPGEN("Customize");
+ odp.pszTitle = LPGEN("My Details");
+ odp.flags = ODPF_BOLDGROUPS;
+ Options_AddPage(wParam, &odp);
+ return 0;
+}
+
+void InitOptions()
+{
+ LoadOptions();
+
+ HookEvent(ME_OPT_INITIALISE, InitOptionsCallback);
+}