summaryrefslogtreecommitdiff
path: root/plugins/Clist_modern/src
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 /plugins/Clist_modern/src
parent89ed8048de18bd9a173b8e09b7e17d1d20594659 (diff)
another common clist option moved to the core
Diffstat (limited to 'plugins/Clist_modern/src')
-rw-r--r--plugins/Clist_modern/src/modern_clcopts.cpp20
-rw-r--r--plugins/Clist_modern/src/resource.h1
2 files changed, 2 insertions, 19 deletions
diff --git a/plugins/Clist_modern/src/modern_clcopts.cpp b/plugins/Clist_modern/src/modern_clcopts.cpp
index e090ed6601..e2a38d164a 100644
--- a/plugins/Clist_modern/src/modern_clcopts.cpp
+++ b/plugins/Clist_modern/src/modern_clcopts.cpp
@@ -244,9 +244,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") },
{ PF2_ONLINE, LPGENW("Online") },
@@ -258,17 +257,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;
@@ -373,7 +361,6 @@ static INT_PTR CALLBACK DlgProcClistListOpts(HWND hwndDlg, UINT msg, WPARAM wPar
case WM_INITDIALOG:
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", GetDefaultExStyle());
for (auto &it : checkBoxToStyleEx)
@@ -393,7 +380,6 @@ static INT_PTR CALLBACK DlgProcClistListOpts(HWND hwndDlg, UINT msg, WPARAM wPar
EnableWindow(GetDlgItem(hwndDlg, IDC_SMOOTHTIME), IsDlgButtonChecked(hwndDlg, IDC_NOTNOSMOOTHSCROLLING));
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", CLCDEFAULT_NOVSCROLL) ? BST_CHECKED : BST_UNCHECKED);
return TRUE;
@@ -413,7 +399,6 @@ static INT_PTR CALLBACK DlgProcClistListOpts(HWND hwndDlg, UINT msg, WPARAM wPar
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());
@@ -450,7 +435,6 @@ static INT_PTR CALLBACK DlgProcClistListOpts(HWND hwndDlg, UINT msg, WPARAM wPar
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_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));
db_set_b(0, "CLC", "NoVScrollBar", (BYTE)(IsDlgButtonChecked(hwndDlg, IDC_NOSCROLLBAR) ? 1 : 0));
diff --git a/plugins/Clist_modern/src/resource.h b/plugins/Clist_modern/src/resource.h
index 3351ae4ae6..7aac6af638 100644
--- a/plugins/Clist_modern/src/resource.h
+++ b/plugins/Clist_modern/src/resource.h
@@ -173,7 +173,6 @@
#define IDC_TILEV 1301
#define IDC_GAMMACORRECT 1302
#define IDC_TILEVROWH 1302
-#define IDC_HIDEOFFLINEOPTS 1308
#define IDC_CYCLETIME 1318
#define IDC_CYCLETIMESPIN 1319
#define IDC_HIDETIMESPIN 1320