From 95dccf315ba175eaf848fd6d85af6eb306a7482f Mon Sep 17 00:00:00 2001 From: George Hazan Date: Thu, 1 Sep 2016 10:56:58 +0000 Subject: duplicate code removed git-svn-id: http://svn.miranda-ng.org/main/trunk@17235 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/Clist_nicer/src/clui.cpp | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) (limited to 'plugins/Clist_nicer') diff --git a/plugins/Clist_nicer/src/clui.cpp b/plugins/Clist_nicer/src/clui.cpp index 5cde52aab1..a73e090873 100644 --- a/plugins/Clist_nicer/src/clui.cpp +++ b/plugins/Clist_nicer/src/clui.cpp @@ -1501,25 +1501,16 @@ buttons_done: CallService(MS_CLIST_SETHIDEOFFLINE, (WPARAM)(-1), 0); break; case POPUP_HIDEOFFLINEROOT: - SendMessage(pcli->hwndContactTree, CLM_SETHIDEOFFLINEROOT, !SendMessage(pcli->hwndContactTree, CLM_GETHIDEOFFLINEROOT, 0, 0), 0); + CallService(MS_CLIST_TOGGLEHIDEOFFLINEROOT, 0, 0); break; case POPUP_HIDEEMPTYGROUPS: - { - int newVal = !(GetWindowLongPtr(pcli->hwndContactTree, GWL_STYLE) & CLS_HIDEEMPTYGROUPS); - db_set_b(NULL, "CList", "HideEmptyGroups", (BYTE)newVal); - SendMessage(pcli->hwndContactTree, CLM_SETHIDEEMPTYGROUPS, newVal, 0); - } + CallService(MS_CLIST_TOGGLEEMPTYGROUPS, 0, 0); break; case IDC_TBHIDEGROUPS: case IDC_STBHIDEGROUPS: case POPUP_DISABLEGROUPS: - { - int newVal = !(GetWindowLongPtr(pcli->hwndContactTree, GWL_STYLE) & CLS_USEGROUPS); - db_set_b(NULL, "CList", "UseGroups", (BYTE)newVal); - SendMessage(pcli->hwndContactTree, CLM_SETUSEGROUPS, newVal, 0); - ClcSetButtonState(IDC_TBHIDEGROUPS, newVal); - SetButtonStates(); - } + ClcSetButtonState(IDC_TBHIDEGROUPS, CallService(MS_CLIST_TOGGLEGROUPS, 0, 0)); + SetButtonStates(); break; case POPUP_HIDEMIRANDA: pcli->pfnShowHide(0, 0); -- cgit v1.2.3