summaryrefslogtreecommitdiff
path: root/plugins
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
parent89ed8048de18bd9a173b8e09b7e17d1d20594659 (diff)
another common clist option moved to the core
Diffstat (limited to 'plugins')
-rw-r--r--plugins/Clist_blind/res/resource.rc3
-rw-r--r--plugins/Clist_blind/src/clcopts.cpp93
-rw-r--r--plugins/Clist_blind/src/resource.h1
-rw-r--r--plugins/Clist_modern/res/resource.rc2
-rw-r--r--plugins/Clist_modern/src/modern_clcopts.cpp20
-rw-r--r--plugins/Clist_modern/src/resource.h1
-rw-r--r--plugins/Clist_nicer/res/resource.rc2
-rw-r--r--plugins/Clist_nicer/src/clcopts.cpp44
-rw-r--r--plugins/Clist_nicer/src/resource.h1
9 files changed, 17 insertions, 150 deletions
diff --git a/plugins/Clist_blind/res/resource.rc b/plugins/Clist_blind/res/resource.rc
index 1829012b75..397b74f441 100644
--- a/plugins/Clist_blind/res/resource.rc
+++ b/plugins/Clist_blind/res/resource.rc
@@ -134,9 +134,6 @@ STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD
EXSTYLE WS_EX_CONTROLPARENT
FONT 8, "MS Shell Dlg", 0, 0, 0x1
BEGIN
- GROUPBOX "Items",IDC_STATIC,2,2,310,88
- LTEXT "'Hide offline' means to hide:",IDC_STATIC,191,10,112,8
- CONTROL "Tree1",IDC_HIDEOFFLINEOPTS,"SysTreeView32",TVS_DISABLEDRAGDROP | TVS_NOTOOLTIPS | TVS_NONEVENHEIGHT | WS_BORDER | WS_TABSTOP,191,20,112,63
GROUPBOX "Groups",IDC_STATIC,2,93,310,67
CONTROL "Show counts of number of contacts in a group",IDC_SHOWGROUPCOUNTS,
"Button",BS_AUTOCHECKBOX | BS_MULTILINE | WS_TABSTOP,11,106,292,11
diff --git a/plugins/Clist_blind/src/clcopts.cpp b/plugins/Clist_blind/src/clcopts.cpp
index 36a8b33532..522cd62d9b 100644
--- a/plugins/Clist_blind/src/clcopts.cpp
+++ b/plugins/Clist_blind/src/clcopts.cpp
@@ -30,14 +30,13 @@ wchar_t* MyDBGetContactSettingTString(MCONTACT hContact, char* module, char* set
#define DBFONTF_ITALIC 2
#define DBFONTF_UNDERLINE 4
-struct CheckBoxToStyleEx_t
+struct
{
int id;
DWORD flag;
int not;
}
-
-static const checkBoxToStyleEx[] =
+static checkBoxToStyleEx[] =
{
{ IDC_TRACKSELECT, CLS_EX_TRACKSELECT, 0 },
{ IDC_SHOWGROUPCOUNTS, CLS_EX_SHOWGROUPCOUNTS, 0 },
@@ -48,66 +47,6 @@ static const checkBoxToStyleEx[] =
{ IDC_NOTNOSMOOTHSCROLLING, CLS_EX_NOSMOOTHSCROLLING, 1 }
};
-struct CheckBoxValues_t
-{
- DWORD style;
- wchar_t* szDescr;
-};
-
-static const struct CheckBoxValues_t greyoutValues[] = {
- { GREYF_UNFOCUS, LPGENW("Not focused") },
- { 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 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;
- tvis.hParent = nullptr;
- tvis.hInsertAfter = TVI_LAST;
- tvis.item.mask = TVIF_PARAM | TVIF_TEXT | TVIF_STATE;
- for (int i = 0; i < nValues; i++) {
- tvis.item.lParam = values[i].style;
- tvis.item.pszText = TranslateW( values[i].szDescr );
- tvis.item.stateMask = TVIS_STATEIMAGEMASK;
- tvis.item.state = INDEXTOSTATEIMAGEMASK((style & tvis.item.lParam) != 0 ? 2 : 1);
- TreeView_InsertItem( hwndTree, &tvis);
-} }
-
-static DWORD MakeCheckBoxTreeFlags(HWND hwndTree)
-{
- DWORD flags = 0;
- TVITEM tvi;
-
- tvi.mask = TVIF_HANDLE | TVIF_PARAM | TVIF_STATE;
- tvi.hItem = TreeView_GetRoot(hwndTree);
- while (tvi.hItem) {
- TreeView_GetItem(hwndTree, &tvi);
- if (((tvi.state & TVIS_STATEIMAGEMASK) >> 12 == 2))
- flags |= tvi.lParam;
- tvi.hItem = TreeView_GetNextSibling(hwndTree, tvi.hItem);
- }
- return flags;
-}
-
-
static INT_PTR CALLBACK DlgProcClcMainOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam)
{
wchar_t tmp[1024];
@@ -115,8 +54,6 @@ static INT_PTR CALLBACK DlgProcClcMainOpts(HWND hwndDlg, UINT msg, WPARAM wParam
switch (msg) {
case WM_INITDIALOG:
TranslateDialogDefault(hwndDlg);
- 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)
@@ -137,8 +74,6 @@ static INT_PTR CALLBACK DlgProcClcMainOpts(HWND hwndDlg, UINT msg, WPARAM wParam
SendDlgItemMessage(hwndDlg, IDC_GROUPINDENTSPIN, UDM_SETPOS, 0,
MAKELONG(db_get_b(0, "CLC", "GroupIndent", CLCDEFAULT_GROUPINDENT), 0));
EnableWindow(GetDlgItem(hwndDlg, IDC_SMOOTHTIME), IsDlgButtonChecked(hwndDlg, IDC_NOTNOSMOOTHSCROLLING));
- FillCheckBoxTree(GetDlgItem(hwndDlg, IDC_HIDEOFFLINEOPTS), offlineValues, _countof(offlineValues),
- db_get_dw(0, "CLC", "OfflineModes", CLCDEFAULT_OFFLINEMODES));
SetDlgItemText(hwndDlg, IDC_T_CONTACT, MyDBGetContactSettingTString(NULL, "CLC", "TemplateContact", tmp, 1024, TranslateT("%name% [%status% %protocol%] %status_message%")));
SendDlgItemMessage(hwndDlg, IDC_T_CONTACT, EM_LIMITTEXT, 256, 0);
@@ -149,9 +84,7 @@ static INT_PTR CALLBACK DlgProcClcMainOpts(HWND hwndDlg, UINT msg, WPARAM wParam
SetDlgItemText(hwndDlg, IDC_T_INFO, MyDBGetContactSettingTString(NULL, "CLC", "TemplateInfo", tmp, 1024, TranslateT("Info: %s")));
SendDlgItemMessage(hwndDlg, IDC_T_INFO, EM_LIMITTEXT, 256, 0);
return TRUE;
- case WM_VSCROLL:
- SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0);
- break;
+
case WM_COMMAND:
if (LOWORD(wParam) == IDC_NOTNOSMOOTHSCROLLING)
EnableWindow(GetDlgItem(hwndDlg, IDC_SMOOTHTIME), IsDlgButtonChecked(hwndDlg, IDC_NOTNOSMOOTHSCROLLING));
@@ -163,26 +96,9 @@ static INT_PTR CALLBACK DlgProcClcMainOpts(HWND hwndDlg, UINT msg, WPARAM wParam
return 0;
SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0);
break;
+
case WM_NOTIFY:
switch (((LPNMHDR)lParam)->idFrom) {
- case IDC_HIDEOFFLINEOPTS:
- if (((LPNMHDR)lParam)->code == NM_CLICK) {
- TVHITTESTINFO hti;
- hti.pt.x = (short)LOWORD(GetMessagePos());
- hti.pt.y = (short)HIWORD(GetMessagePos());
- ScreenToClient(((LPNMHDR)lParam)->hwndFrom, &hti.pt);
- if (TreeView_HitTest(((LPNMHDR)lParam)->hwndFrom, &hti))
- if (hti.flags & TVHT_ONITEMSTATEICON) {
- TVITEM tvi;
- tvi.mask = TVIF_HANDLE | TVIF_IMAGE | TVIF_SELECTEDIMAGE;
- tvi.hItem = hti.hItem;
- TreeView_GetItem(((LPNMHDR)lParam)->hwndFrom, &tvi);
- tvi.iImage = tvi.iSelectedImage = tvi.iImage == 1 ? 2 : 1;
- TreeView_SetItem(((LPNMHDR)lParam)->hwndFrom, &tvi);
- SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0);
- }
- }
- break;
case 0:
if (((LPNMHDR)lParam)->code == PSN_APPLY) {
int i;
@@ -193,7 +109,6 @@ static INT_PTR CALLBACK DlgProcClcMainOpts(HWND hwndDlg, UINT msg, WPARAM wParam
db_set_dw(0, "CLC", "ExStyle", exStyle);
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",
diff --git a/plugins/Clist_blind/src/resource.h b/plugins/Clist_blind/src/resource.h
index ab9eeb7a16..5d59bb030e 100644
--- a/plugins/Clist_blind/src/resource.h
+++ b/plugins/Clist_blind/src/resource.h
@@ -72,7 +72,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
diff --git a/plugins/Clist_modern/res/resource.rc b/plugins/Clist_modern/res/resource.rc
index 038d21db4a..e0a3667736 100644
--- a/plugins/Clist_modern/res/resource.rc
+++ b/plugins/Clist_modern/res/resource.rc
@@ -384,8 +384,6 @@ BEGIN
CONTROL "Make selection highlight translucent",IDC_NOTNOTRANSLUCENTSEL,
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,11,77,175,10
CONTROL "Dim idle contacts",IDC_IDLE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,11,89,153,10
- CTEXT "'Hide offline' means to hide:",IDC_STATIC,185,14,112,8
- CONTROL "Tree1",IDC_HIDEOFFLINEOPTS,"SysTreeView32",TVS_DISABLEDRAGDROP | TVS_NOTOOLTIPS | TVS_NONEVENHEIGHT | WS_BORDER | WS_HSCROLL | WS_TABSTOP,191,24,105,73
GROUPBOX "Groups",IDC_STATIC,2,105,148,115
CONTROL "Draw a line alongside group names",IDC_LINEWITHGROUPS,
"Button",BS_AUTOCHECKBOX | BS_MULTILINE | WS_TABSTOP,11,114,131,16
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
diff --git a/plugins/Clist_nicer/res/resource.rc b/plugins/Clist_nicer/res/resource.rc
index e28a325ac4..baed5a1603 100644
--- a/plugins/Clist_nicer/res/resource.rc
+++ b/plugins/Clist_nicer/res/resource.rc
@@ -148,8 +148,6 @@ BEGIN
"Button",BS_AUTOCHECKBOX | BS_MULTILINE | WS_TABSTOP,5,61,130,16
CONTROL "Do not separate offline contacts",IDC_DONTSEPARATE,
"Button",BS_AUTOCHECKBOX | BS_MULTILINE | WS_TABSTOP,5,80,132,16
- LTEXT "Hide as offline",IDC_STATIC,151,1,73,8
- CONTROL "",IDC_HIDEOFFLINEOPTS,"SysTreeView32",TVS_DISABLEDRAGDROP | TVS_NOTOOLTIPS | TVS_NONEVENHEIGHT | WS_BORDER | WS_HSCROLL | WS_TABSTOP,147,11,152,134
LTEXT "Right align contacts",IDC_STATIC,5,150,130,10
COMBOBOX IDC_CLISTALIGN,147,148,77,56,CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP
END
diff --git a/plugins/Clist_nicer/src/clcopts.cpp b/plugins/Clist_nicer/src/clcopts.cpp
index 5c5f05ea28..6a9838805d 100644
--- a/plugins/Clist_nicer/src/clcopts.cpp
+++ b/plugins/Clist_nicer/src/clcopts.cpp
@@ -63,15 +63,17 @@ struct CheckBoxToGroupStyleEx_t {
struct CheckBoxValues_t {
DWORD style;
wchar_t *szDescr;
-};
-
-static const struct CheckBoxValues_t greyoutValues[] = {
- { GREYF_UNFOCUS, LPGENW("Not focused") }, { 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 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 const greyoutValues[] = {
+ { GREYF_UNFOCUS, LPGENW("Not focused") },
+ { 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 UINT sortCtrlIDs[] = { IDC_SORTPRIMARY, IDC_SORTTHEN, IDC_SORTFINALLY, 0 };
@@ -238,8 +240,6 @@ static INT_PTR CALLBACK DlgProcDspItems(HWND hwndDlg, UINT msg, WPARAM wParam, L
case WM_INITDIALOG:
TranslateDialogDefault(hwndDlg);
{
- SetWindowLongPtr(GetDlgItem(hwndDlg, IDC_HIDEOFFLINEOPTS), GWL_STYLE, GetWindowLongPtr(GetDlgItem(hwndDlg, IDC_HIDEOFFLINEOPTS), GWL_STYLE) | TVS_NOHSCROLL | TVS_CHECKBOXES);
-
for (int i = 0; sortCtrlIDs[i] != 0; i++) {
SendDlgItemMessage(hwndDlg, sortCtrlIDs[i], CB_INSERTSTRING, -1, (LPARAM)TranslateT("Nothing"));
SendDlgItemMessage(hwndDlg, sortCtrlIDs[i], CB_INSERTSTRING, -1, (LPARAM)TranslateT("Name"));
@@ -253,7 +253,6 @@ static INT_PTR CALLBACK DlgProcDspItems(HWND hwndDlg, UINT msg, WPARAM wParam, L
SendDlgItemMessage(hwndDlg, IDC_CLISTALIGN, CB_INSERTSTRING, -1, (LPARAM)TranslateT("For RTL only"));
SendDlgItemMessage(hwndDlg, IDC_CLISTALIGN, CB_INSERTSTRING, -1, (LPARAM)TranslateT("RTL TEXT only"));
- FillCheckBoxTree(GetDlgItem(hwndDlg, IDC_HIDEOFFLINEOPTS), offlineValues, sizeof(offlineValues) / sizeof(offlineValues[0]), db_get_dw(0, "CLC", "OfflineModes", CLCDEFAULT_OFFLINEMODES));
CheckDlgButton(hwndDlg, IDC_EVENTSONTOP, (cfg::dat.dwFlags & CLUI_STICKYEVENTS) ? BST_CHECKED : BST_UNCHECKED);
CheckDlgButton(hwndDlg, IDC_DONTSEPARATE, cfg::dat.bDontSeparateOffline ? BST_CHECKED : BST_UNCHECKED);
for (int i = 0; sortCtrlIDs[i] != 0; i++)
@@ -272,25 +271,6 @@ static INT_PTR CALLBACK DlgProcDspItems(HWND hwndDlg, UINT msg, WPARAM wParam, L
case WM_NOTIFY:
switch (((LPNMHDR)lParam)->idFrom) {
- case IDC_HIDEOFFLINEOPTS:
- if (((LPNMHDR)lParam)->code == NM_CLICK) {
- TVHITTESTINFO hti;
- hti.pt.x = (short)LOWORD(GetMessagePos());
- hti.pt.y = (short)HIWORD(GetMessagePos());
- ScreenToClient(((LPNMHDR)lParam)->hwndFrom, &hti.pt);
- if (TreeView_HitTest(((LPNMHDR)lParam)->hwndFrom, &hti))
- if (hti.flags & TVHT_ONITEMSTATEICON) {
- TVITEM tvi;
- tvi.mask = TVIF_HANDLE | TVIF_IMAGE | TVIF_SELECTEDIMAGE;
- tvi.hItem = hti.hItem;
- TreeView_GetItem(((LPNMHDR)lParam)->hwndFrom, &tvi);
- tvi.iImage = tvi.iSelectedImage = tvi.iImage == 1 ? 2 : 1;
- TreeView_SetItem(((LPNMHDR)lParam)->hwndFrom, &tvi);
- SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0);
- }
- }
- break;
-
case 0:
if (((LPNMHDR)lParam)->code == PSN_APPLY) {
for (int i = 0; sortCtrlIDs[i] != 0; i++) {
@@ -305,8 +285,6 @@ static INT_PTR CALLBACK DlgProcDspItems(HWND hwndDlg, UINT msg, WPARAM wParam, L
cfg::dat.bDontSeparateOffline = IsDlgButtonChecked(hwndDlg, IDC_DONTSEPARATE) ? 1 : 0;
g_plugin.setByte("DontSeparateOffline", (BYTE)cfg::dat.bDontSeparateOffline);
- db_set_dw(0, "CLC", "OfflineModes", MakeCheckBoxTreeFlags(GetDlgItem(hwndDlg, IDC_HIDEOFFLINEOPTS)));
-
cfgSetFlag(hwndDlg, IDC_EVENTSONTOP, CLUI_STICKYEVENTS);
cfg::dat.bUseDCMirroring = (BYTE)SendDlgItemMessage(hwndDlg, IDC_CLISTALIGN, CB_GETCURSEL, 0, 0);
diff --git a/plugins/Clist_nicer/src/resource.h b/plugins/Clist_nicer/src/resource.h
index caa128069a..851b1edcc3 100644
--- a/plugins/Clist_nicer/src/resource.h
+++ b/plugins/Clist_nicer/src/resource.h
@@ -82,7 +82,6 @@
#define IDC_CBOTTOMSPIN 1079
#define IDC_CRIGHT 1080
#define IDC_CRIGHTSPIN 1081
-#define IDC_HIDEOFFLINEOPTS 1082
#define IDC_LEFTMARGINSPIN 1092
#define IDC_NOGROUPICON 1102
#define IDC_ONECLK 1105