diff options
author | George Hazan <ghazan@miranda.im> | 2018-05-20 15:08:48 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2018-05-20 15:08:48 +0300 |
commit | 8a74e7495ce5ad39de4f5c25121a84d35df90c36 (patch) | |
tree | 03e5b4870f09a3163306740c2eebee47bc15b042 /plugins/SimpleAR/src/Options.cpp | |
parent | c5bf7d6123dd1c3b82ccb8fdb1b068077e9d56d4 (diff) |
CMPlugin to receive a reference to PLUGININFOEX
Diffstat (limited to 'plugins/SimpleAR/src/Options.cpp')
-rw-r--r-- | plugins/SimpleAR/src/Options.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/plugins/SimpleAR/src/Options.cpp b/plugins/SimpleAR/src/Options.cpp index e1f0f583ef..fa93906df2 100644 --- a/plugins/SimpleAR/src/Options.cpp +++ b/plugins/SimpleAR/src/Options.cpp @@ -11,11 +11,11 @@ INT_PTR CALLBACK DlgProcOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPara {
char tszStatus[6] = { 0 };
- CheckDlgButton(hwndDlg, IDC_ENABLEREPLIER, db_get_b(NULL, protocolname, KEY_ENABLED, 1) == 1 ? BST_CHECKED : BST_UNCHECKED);
- SetDlgItemInt(hwndDlg, IDC_INTERVAL, db_get_w(NULL, protocolname, KEY_REPEATINTERVAL, 300) / 60, FALSE);
+ CheckDlgButton(hwndDlg, IDC_ENABLEREPLIER, db_get_b(NULL, MODULENAME, KEY_ENABLED, 1) == 1 ? BST_CHECKED : BST_UNCHECKED);
+ SetDlgItemInt(hwndDlg, IDC_INTERVAL, db_get_w(NULL, MODULENAME, KEY_REPEATINTERVAL, 300) / 60, FALSE);
DBVARIANT dbv;
- if (!db_get_ws(NULL, protocolname, KEY_HEADING, &dbv)) {
+ if (!db_get_ws(NULL, MODULENAME, KEY_HEADING, &dbv)) {
SetDlgItemText(hwndDlg, IDC_HEADING, dbv.ptszVal);
db_free(&dbv);
}
@@ -28,7 +28,7 @@ INT_PTR CALLBACK DlgProcOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPara else {
SendDlgItemMessage(hwndDlg, IDC_STATUSMODE, CB_ADDSTRING, 0, (LPARAM)pszStatus);
- if (!db_get_ws(NULL, protocolname, tszStatus, &dbv)) {
+ if (!db_get_ws(NULL, MODULENAME, tszStatus, &dbv)) {
if (c < ID_STATUS_FREECHAT)
ptszMessage[c - ID_STATUS_ONLINE - 1] = wcsdup(dbv.ptszVal);
else if (c > ID_STATUS_INVISIBLE)
@@ -80,7 +80,7 @@ INT_PTR CALLBACK DlgProcOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPara BOOL translated;
BOOL fEnabled = IsDlgButtonChecked(hwndDlg, IDC_ENABLEREPLIER) == 1;
- db_set_b(NULL, protocolname, KEY_ENABLED, (BYTE)fEnabled);
+ db_set_b(NULL, MODULENAME, KEY_ENABLED, (BYTE)fEnabled);
if (fEnabled)
Menu_ModifyItem(hEnableMenu, LPGENW("Disable Auto&reply"), iconList[0].hIcolib);
@@ -88,12 +88,12 @@ INT_PTR CALLBACK DlgProcOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPara Menu_ModifyItem(hEnableMenu, LPGENW("Enable Auto&reply"), iconList[1].hIcolib);
GetDlgItemText(hwndDlg, IDC_HEADING, ptszText, _countof(ptszText));
- db_set_ws(NULL, protocolname, KEY_HEADING, ptszText);
+ db_set_ws(NULL, MODULENAME, KEY_HEADING, ptszText);
INT size = GetDlgItemInt(hwndDlg, IDC_INTERVAL, &translated, FALSE);
if (translated)
interval = size * 60;
- db_set_w(NULL, protocolname, KEY_REPEATINTERVAL, interval);
+ db_set_w(NULL, MODULENAME, KEY_REPEATINTERVAL, interval);
size = SendDlgItemMessage(hwndDlg, IDC_MESSAGE, WM_GETTEXTLENGTH, 0, 0) + 1;
GetDlgItemText(hwndDlg, IDC_MESSAGE, ptszMessage[lastIndex], size);
@@ -106,11 +106,11 @@ INT_PTR CALLBACK DlgProcOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPara mir_snprintf(szStatus, "%d", c);
if (c<ID_STATUS_FREECHAT && ptszMessage[c - ID_STATUS_ONLINE - 1])
- db_set_ws(NULL, protocolname, szStatus, ptszMessage[c - ID_STATUS_ONLINE - 1]);
+ db_set_ws(NULL, MODULENAME, szStatus, ptszMessage[c - ID_STATUS_ONLINE - 1]);
else if (c>ID_STATUS_INVISIBLE && ptszMessage[c - ID_STATUS_ONLINE - 3])
- db_set_ws(NULL, protocolname, szStatus, ptszMessage[c - ID_STATUS_ONLINE - 3]);
+ db_set_ws(NULL, MODULENAME, szStatus, ptszMessage[c - ID_STATUS_ONLINE - 3]);
else
- db_unset(NULL, protocolname, szStatus);
+ db_unset(NULL, MODULENAME, szStatus);
}
}
return TRUE;
|