summaryrefslogtreecommitdiff
path: root/plugins/TabSRMM/src
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2017-08-22 15:22:17 +0300
committerGeorge Hazan <ghazan@miranda.im>2017-08-22 15:22:17 +0300
commit94dde7112f11c5963aa620c692170d02fe65a2a7 (patch)
tree74263e5b64f159274d61d6c95ced60aab47effc1 /plugins/TabSRMM/src
parentf5c13759fa223cf295888c6b59f39b2dbd845ea1 (diff)
unused code removed
Diffstat (limited to 'plugins/TabSRMM/src')
-rw-r--r--plugins/TabSRMM/src/msgoptions.cpp154
1 files changed, 0 insertions, 154 deletions
diff --git a/plugins/TabSRMM/src/msgoptions.cpp b/plugins/TabSRMM/src/msgoptions.cpp
index 86845fd854..598bd8436b 100644
--- a/plugins/TabSRMM/src/msgoptions.cpp
+++ b/plugins/TabSRMM/src/msgoptions.cpp
@@ -1448,160 +1448,6 @@ void OptCheckBox_Save(HWND hwnd, OptCheckBox *cb)
}
}
-static INT_PTR CALLBACK DlgProcTabSrmmModernOptions(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam)
-{
- OptCheckBox opts[] =
- {
- //{IDC_, def, bit, dbtype, dbmodule, dbsetting, valtype, pval},
- { IDC_CLOSEONESC, FALSE, 0, DBVT_BYTE, SRMSGMOD_T, "escmode" },
- { IDC_ALWAYSPOPUP, FALSE, 0, DBVT_BYTE, SRMSGMOD_T, SRMSGSET_AUTOPOPUP },
- { IDC_CREATEMIN, TRUE, 0, DBVT_BYTE, SRMSGMOD_T, "autocontainer" },
- //{IDC_USETABS, , 0, DBVT_BYTE, SRMSGMOD_T, },
- { IDC_CREATENOACTIVATE, TRUE, 0, DBVT_BYTE, SRMSGMOD_T, "autotabs" },
- { IDC_POPUPONCREATE, FALSE, 0, DBVT_BYTE, SRMSGMOD_T, "cpopup" },
- { IDC_AUTOSWITCHTABS, TRUE, 0, DBVT_BYTE, SRMSGMOD_T, "autoswitchtabs" },
- //{IDC_SENDCTRLENTER, , 0, DBVT_BYTE, SRMSGMOD_T, },
- { IDC_SENDSHIFTENTER, FALSE, 0, DBVT_BYTE, SRMSGMOD_T, "sendonshiftenter" },
- { IDC_SENDENTER, TRUE, 0, DBVT_BYTE, SRMSGMOD_T, SRMSGSET_SENDONENTER },
- { IDC_SENDDBLENTER, FALSE, 0, DBVT_BYTE, SRMSGMOD_T, "SendOnDblEnter" },
- { IDC_MINSEND, FALSE, 0, DBVT_BYTE, SRMSGMOD_T, SRMSGSET_AUTOMIN },
- { IDC_NOOPENNOTIFY, FALSE, 0, DBVT_BYTE, "tabSRMM_NEN", OPT_WINDOWCHECK, CBVT_BOOL, &nen_options.bWindowCheck },
- };
-
- static BOOL bInit = TRUE;
-
- switch (msg) {
- case WM_INITDIALOG:
- TranslateDialogDefault(hwndDlg);
- {
- DWORD maxhist = M.GetDword("maxhist", 0);
-
- bInit = TRUE;
-
- for (int i = 0; i < _countof(opts); ++i)
- OptCheckBox_Load(hwndDlg, opts + i);
-
- // Always on!
- CheckDlgButton(hwndDlg, IDC_SENDCTRLENTER, BST_CHECKED);
-
- switch (M.GetByte(SRMSGMOD, SRMSGSET_LOADHISTORY, SRMSGDEFSET_LOADHISTORY)) {
- case LOADHISTORY_UNREAD:
- CheckDlgButton(hwndDlg, IDC_LOADUNREAD, BST_CHECKED);
- break;
- case LOADHISTORY_COUNT:
- CheckDlgButton(hwndDlg, IDC_LOADCOUNT, BST_CHECKED);
- Utils::enableDlgControl(hwndDlg, IDC_LOADCOUNTN, true);
- Utils::enableDlgControl(hwndDlg, IDC_LOADCOUNTSPIN, true);
- break;
- case LOADHISTORY_TIME:
- CheckDlgButton(hwndDlg, IDC_LOADTIME, BST_CHECKED);
- Utils::enableDlgControl(hwndDlg, IDC_LOADTIMEN, true);
- Utils::enableDlgControl(hwndDlg, IDC_LOADTIMESPIN, true);
- Utils::enableDlgControl(hwndDlg, IDC_STMINSOLD, true);
- break;
- }
-
- SendDlgItemMessage(hwndDlg, IDC_LOADCOUNTSPIN, UDM_SETRANGE, 0, MAKELONG(100, 0));
- SendDlgItemMessage(hwndDlg, IDC_LOADCOUNTSPIN, UDM_SETPOS, 0, db_get_w(0, SRMSGMOD, SRMSGSET_LOADCOUNT, SRMSGDEFSET_LOADCOUNT));
- SendDlgItemMessage(hwndDlg, IDC_LOADTIMESPIN, UDM_SETRANGE, 0, MAKELONG(24 * 60, 0));
- SendDlgItemMessage(hwndDlg, IDC_LOADTIMESPIN, UDM_SETPOS, 0, db_get_w(0, SRMSGMOD, SRMSGSET_LOADTIME, SRMSGDEFSET_LOADTIME));
-
- SendDlgItemMessage(hwndDlg, IDC_TRIMSPIN, UDM_SETRANGE, 0, MAKELONG(1000, 5));
- SendDlgItemMessage(hwndDlg, IDC_TRIMSPIN, UDM_SETPOS, 0, maxhist);
- Utils::enableDlgControl(hwndDlg, IDC_TRIMSPIN, maxhist != 0);
- Utils::enableDlgControl(hwndDlg, IDC_TRIM, maxhist != 0);
- CheckDlgButton(hwndDlg, IDC_ALWAYSTRIM, maxhist != 0 ? BST_CHECKED : BST_UNCHECKED);
-
- BOOL bTabOptGroups = M.GetByte("useclistgroups", 0);
- BOOL bTabOptLimit = M.GetByte("limittabs", 0);
- BOOL bTabOptSingle = M.GetByte("singlewinmode", 0);
-
- if (bTabOptSingle && !bTabOptGroups && !bTabOptLimit)
- CheckDlgButton(hwndDlg, IDC_USETABS, BST_UNCHECKED);
- else if (!bTabOptSingle && !bTabOptGroups && !bTabOptLimit)
- CheckDlgButton(hwndDlg, IDC_USETABS, BST_CHECKED);
- else {
- LONG s = (GetWindowLongPtr(GetDlgItem(hwndDlg, IDC_USETABS), GWL_STYLE) & ~BS_TYPEMASK) | BS_AUTO3STATE;
- SetWindowLongPtr(GetDlgItem(hwndDlg, IDC_USETABS), GWL_STYLE, s);
- CheckDlgButton(hwndDlg, IDC_USETABS, BST_INDETERMINATE);
- }
- }
- bInit = FALSE;
- return TRUE;
-
- case WM_DESTROY:
- bInit = TRUE;
- break;
-
- case WM_COMMAND:
- switch (LOWORD(wParam)) {
- case IDC_LOADUNREAD:
- case IDC_LOADCOUNT:
- case IDC_LOADTIME:
- Utils::enableDlgControl(hwndDlg, IDC_LOADCOUNTN, IsDlgButtonChecked(hwndDlg, IDC_LOADCOUNT) != 0);
- Utils::enableDlgControl(hwndDlg, IDC_LOADCOUNTSPIN, IsDlgButtonChecked(hwndDlg, IDC_LOADCOUNT) != 0);
- Utils::enableDlgControl(hwndDlg, IDC_LOADTIMEN, IsDlgButtonChecked(hwndDlg, IDC_LOADTIME) != 0);
- Utils::enableDlgControl(hwndDlg, IDC_LOADTIMESPIN, IsDlgButtonChecked(hwndDlg, IDC_LOADTIME) != 0);
- Utils::enableDlgControl(hwndDlg, IDC_STMINSOLD, IsDlgButtonChecked(hwndDlg, IDC_LOADTIME) != 0);
- break;
- case IDC_ALWAYSTRIM:
- Utils::enableDlgControl(hwndDlg, IDC_TRIMSPIN, IsDlgButtonChecked(hwndDlg, IDC_ALWAYSTRIM) != 0);
- Utils::enableDlgControl(hwndDlg, IDC_TRIM, IsDlgButtonChecked(hwndDlg, IDC_ALWAYSTRIM) != 0);
- break;
- case IDC_TRIM:
- if (HIWORD(wParam) != EN_CHANGE || (HWND)lParam != GetFocus())
- return TRUE;
- break;
- }
- if (!bInit)
- SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0);
- break;
-
- case WM_NOTIFY:
- switch (((LPNMHDR)lParam)->idFrom) {
- case 0:
- switch (((LPNMHDR)lParam)->code) {
- case PSN_APPLY:
- for (int i = 0; i < _countof(opts); ++i)
- OptCheckBox_Save(hwndDlg, opts + i);
-
- if (IsDlgButtonChecked(hwndDlg, IDC_LOADCOUNT))
- db_set_b(0, SRMSGMOD, SRMSGSET_LOADHISTORY, LOADHISTORY_COUNT);
- else if (IsDlgButtonChecked(hwndDlg, IDC_LOADTIME))
- db_set_b(0, SRMSGMOD, SRMSGSET_LOADHISTORY, LOADHISTORY_TIME);
- else
- db_set_b(0, SRMSGMOD, SRMSGSET_LOADHISTORY, LOADHISTORY_UNREAD);
- db_set_w(0, SRMSGMOD, SRMSGSET_LOADCOUNT, (WORD)SendDlgItemMessage(hwndDlg, IDC_LOADCOUNTSPIN, UDM_GETPOS, 0, 0));
- db_set_w(0, SRMSGMOD, SRMSGSET_LOADTIME, (WORD)SendDlgItemMessage(hwndDlg, IDC_LOADTIMESPIN, UDM_GETPOS, 0, 0));
-
- if (IsDlgButtonChecked(hwndDlg, IDC_ALWAYSTRIM))
- db_set_dw(0, SRMSGMOD_T, "maxhist", (DWORD)SendDlgItemMessage(hwndDlg, IDC_TRIMSPIN, UDM_GETPOS, 0, 0));
- else
- db_set_dw(0, SRMSGMOD_T, "maxhist", 0);
-
- switch (IsDlgButtonChecked(hwndDlg, IDC_USETABS)) {
- case BST_UNCHECKED:
- db_set_b(0, SRMSGMOD_T, "useclistgroups", 0);
- db_set_b(0, SRMSGMOD_T, "limittabs", 0);
- db_set_b(0, SRMSGMOD_T, "singlewinmode", 1);
- break;
- case BST_CHECKED:
- db_set_b(0, SRMSGMOD_T, "useclistgroups", 0);
- db_set_b(0, SRMSGMOD_T, "limittabs", 0);
- db_set_b(0, SRMSGMOD_T, "singlewinmode", 0);
- break;
- }
- PluginConfig.reloadSettings();
- Srmm_Broadcast(DM_OPTIONSAPPLIED, 1, 0);
- return TRUE;
- }
- }
- break;
- }
-
- return FALSE;
-}
-
int TSAPI InitOptions(void)
{
HookEvent(ME_OPT_INITIALISE, OptInitialise);