summaryrefslogtreecommitdiff
path: root/src/core/stdclist
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2020-04-05 13:50:39 +0300
committerGeorge Hazan <ghazan@miranda.im>2020-04-05 13:50:39 +0300
commitac0147f8c31d95e2537dd7c53af78634a3e9d625 (patch)
treee1dc75e8a26351436c574f7d15250161b88530bd /src/core/stdclist
parent89ed8048de18bd9a173b8e09b7e17d1d20594659 (diff)
another common clist option moved to the core
Diffstat (limited to 'src/core/stdclist')
-rw-r--r--src/core/stdclist/res/resource.rc2
-rw-r--r--src/core/stdclist/src/clcopts.cpp23
-rw-r--r--src/core/stdclist/src/resource.h1
3 files changed, 2 insertions, 24 deletions
diff --git a/src/core/stdclist/res/resource.rc b/src/core/stdclist/res/resource.rc
index e2db018eeb..c040eff77e 100644
--- a/src/core/stdclist/res/resource.rc
+++ b/src/core/stdclist/res/resource.rc
@@ -130,8 +130,6 @@ BEGIN
CONTROL "Make selection highlight translucent",IDC_NOTNOTRANSLUCENTSEL,
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,11,83,179,10
CONTROL "Dim idle contacts",IDC_IDLE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,11,96,153,10
- LTEXT "'Hide offline' means to hide:",IDC_STATIC,191,10,112,8
- CONTROL "Tree1",IDC_HIDEOFFLINEOPTS,"SysTreeView32",TVS_DISABLEDRAGDROP | TVS_NOTOOLTIPS | WS_BORDER | WS_HSCROLL | WS_TABSTOP,191,20,112,84
GROUPBOX "Groups",IDC_STATIC,2,112,148,136
CONTROL "Draw a line alongside group names",IDC_LINEWITHGROUPS,
"Button",BS_AUTOCHECKBOX | BS_MULTILINE | WS_TABSTOP,11,129,131,16
diff --git a/src/core/stdclist/src/clcopts.cpp b/src/core/stdclist/src/clcopts.cpp
index d3a7d34a8f..7f0507eb15 100644
--- a/src/core/stdclist/src/clcopts.cpp
+++ b/src/core/stdclist/src/clcopts.cpp
@@ -55,9 +55,8 @@ struct CheckBoxValues_t
{
DWORD style;
wchar_t* szDescr;
-};
-
-static const struct CheckBoxValues_t greyoutValues[] =
+}
+static const greyoutValues[] =
{
{ GREYF_UNFOCUS, LPGENW("Not focused") },
{ MODEF_OFFLINE, LPGENW("Offline") },
@@ -70,18 +69,6 @@ static const struct CheckBoxValues_t greyoutValues[] =
{ PF2_INVISIBLE, LPGENW("Invisible") }
};
-static const struct CheckBoxValues_t offlineValues[] =
-{
- { MODEF_OFFLINE, LPGENW("Offline") },
- { PF2_ONLINE, LPGENW("Online") },
- { PF2_SHORTAWAY, LPGENW("Away") },
- { PF2_LONGAWAY, LPGENW("Not available") },
- { PF2_LIGHTDND, LPGENW("Occupied") },
- { PF2_HEAVYDND, LPGENW("Do not disturb")},
- { PF2_FREECHAT, LPGENW("Free for chat") },
- { PF2_INVISIBLE, LPGENW("Invisible") }
-};
-
static void FillCheckBoxTree(HWND hwndTree, const struct CheckBoxValues_t *values, int nValues, DWORD style)
{
TVINSERTSTRUCT tvis;
@@ -142,8 +129,6 @@ static INT_PTR CALLBACK DlgProcClcMainOpts(HWND hwndDlg, UINT msg, WPARAM wParam
TranslateDialogDefault(hwndDlg);
SetWindowLongPtr(GetDlgItem(hwndDlg, IDC_GREYOUTOPTS), GWL_STYLE,
GetWindowLongPtr(GetDlgItem(hwndDlg, IDC_GREYOUTOPTS), GWL_STYLE) | TVS_NOHSCROLL | TVS_CHECKBOXES);
- SetWindowLongPtr(GetDlgItem(hwndDlg, IDC_HIDEOFFLINEOPTS), GWL_STYLE,
- GetWindowLongPtr(GetDlgItem(hwndDlg, IDC_HIDEOFFLINEOPTS), GWL_STYLE) | TVS_NOHSCROLL | TVS_CHECKBOXES);
{
DWORD exStyle = db_get_dw(0, "CLC", "ExStyle", Clist_GetDefaultExStyle());
for (auto &it : checkBoxToStyleEx)
@@ -169,8 +154,6 @@ static INT_PTR CALLBACK DlgProcClcMainOpts(HWND hwndDlg, UINT msg, WPARAM wParam
EnableWindow(GetDlgItem(hwndDlg, IDC_GREYOUTOPTS), IsDlgButtonChecked(hwndDlg, IDC_GREYOUT));
FillCheckBoxTree(GetDlgItem(hwndDlg, IDC_GREYOUTOPTS), greyoutValues, _countof(greyoutValues),
db_get_dw(0, "CLC", "FullGreyoutFlags", CLCDEFAULT_FULLGREYOUTFLAGS));
- FillCheckBoxTree(GetDlgItem(hwndDlg, IDC_HIDEOFFLINEOPTS), offlineValues, _countof(offlineValues),
- db_get_dw(0, "CLC", "OfflineModes", CLCDEFAULT_OFFLINEMODES));
CheckDlgButton(hwndDlg, IDC_NOSCROLLBAR, db_get_b(0, "CLC", "NoVScrollBar", 0) ? BST_CHECKED : BST_UNCHECKED);
CheckDlgButton(hwndDlg, IDC_GAMMACORRECT, db_get_b(0, "CLC", "GammaCorrect", CLCDEFAULT_GAMMACORRECT) ? BST_CHECKED : BST_UNCHECKED);
{
@@ -214,7 +197,6 @@ static INT_PTR CALLBACK DlgProcClcMainOpts(HWND hwndDlg, UINT msg, WPARAM wParam
case WM_NOTIFY:
switch (((LPNMHDR)lParam)->idFrom) {
case IDC_GREYOUTOPTS:
- case IDC_HIDEOFFLINEOPTS:
if (((LPNMHDR)lParam)->code == NM_CLICK) {
TVHITTESTINFO hti;
hti.pt.x = (short)LOWORD(GetMessagePos());
@@ -250,7 +232,6 @@ static INT_PTR CALLBACK DlgProcClcMainOpts(HWND hwndDlg, UINT msg, WPARAM wParam
db_set_dw(0, "CLC", "GreyoutFlags", 0);
}
db_set_b(0, "CLC", "ShowIdle", (BYTE)(IsDlgButtonChecked(hwndDlg, IDC_IDLE) ? 1 : 0));
- db_set_dw(0, "CLC", "OfflineModes", MakeCheckBoxTreeFlags(GetDlgItem(hwndDlg, IDC_HIDEOFFLINEOPTS)));
db_set_b(0, "CLC", "LeftMargin", (BYTE)SendDlgItemMessage(hwndDlg, IDC_LEFTMARGINSPIN, UDM_GETPOS, 0, 0));
db_set_w(0, "CLC", "ScrollTime", (WORD)SendDlgItemMessage(hwndDlg, IDC_SMOOTHTIMESPIN, UDM_GETPOS, 0, 0));
db_set_b(0, "CLC", "GroupIndent", (BYTE)SendDlgItemMessage(hwndDlg, IDC_GROUPINDENTSPIN, UDM_GETPOS, 0, 0));
diff --git a/src/core/stdclist/src/resource.h b/src/core/stdclist/src/resource.h
index d25ecb5890..b4c544a1d2 100644
--- a/src/core/stdclist/src/resource.h
+++ b/src/core/stdclist/src/resource.h
@@ -74,7 +74,6 @@
#define IDC_SCRIPT 1300
#define IDC_TILEV 1301
#define IDC_GAMMACORRECT 1302
-#define IDC_HIDEOFFLINEOPTS 1308
#define IDC_DONTCYCLE 1315
#define IDC_PRIMARYSTATUS 1316
#define IDC_CYCLE 1317