diff options
author | George Hazan <george.hazan@gmail.com> | 2016-09-01 10:56:58 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2016-09-01 10:56:58 +0000 |
commit | 95dccf315ba175eaf848fd6d85af6eb306a7482f (patch) | |
tree | 0e5d65712a914566cf76370c78ae256bd744218e /plugins/Clist_nicer/src | |
parent | 1fba79d0cd33719c33a431b0c6ecd4b169acd4d5 (diff) |
duplicate code removed
git-svn-id: http://svn.miranda-ng.org/main/trunk@17235 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Clist_nicer/src')
-rw-r--r-- | plugins/Clist_nicer/src/clui.cpp | 17 |
1 files changed, 4 insertions, 13 deletions
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); |