From 11ab7716e9d48c7505fbcf4fe1deba33b494cdc1 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Thu, 1 Sep 2016 12:48:54 +0000 Subject: - MS_CLIST_SETHIDEOFFLINE replaced with pcli->pfnSetHideOffline(); - MS_CLIST_TOGGLEHIDEOFFLINE added to cover the only case with service call; git-svn-id: http://svn.miranda-ng.org/main/trunk@17237 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/Clist_modern/src/modern_clui.cpp | 14 ++++---------- plugins/Clist_modern/src/modern_viewmodebar.cpp | 6 +++--- 2 files changed, 7 insertions(+), 13 deletions(-) (limited to 'plugins/Clist_modern') diff --git a/plugins/Clist_modern/src/modern_clui.cpp b/plugins/Clist_modern/src/modern_clui.cpp index a545ba2928..5859cbd7eb 100644 --- a/plugins/Clist_modern/src/modern_clui.cpp +++ b/plugins/Clist_modern/src/modern_clui.cpp @@ -72,8 +72,8 @@ RECT g_rcEdgeSizingRect = { 0 }; /* Module global variables */ static BYTE bAlphaEnd; -static BYTE bOldHideOffline; -static BYTE bOldUseGroups; +static int bOldHideOffline; +static int bOldUseGroups; static WORD wBehindEdgeShowDelay, wBehindEdgeHideDelay, @@ -423,14 +423,8 @@ HRESULT CLUI::CreateCLC() nLastRequiredHeight = 0; if (g_CluiData.current_viewmode[0] == '\0') { - if (bOldHideOffline != (BYTE)-1) - CallService(MS_CLIST_SETHIDEOFFLINE, (WPARAM)bOldHideOffline, 0); - else - CallService(MS_CLIST_SETHIDEOFFLINE, 0, 0); - if (bOldUseGroups != (BYTE)-1) - CallService(MS_CLIST_SETUSEGROUPS, (WPARAM)bOldUseGroups, 0); - else - CallService(MS_CLIST_SETUSEGROUPS, 0, 0); + pcli->pfnSetHideOffline((bOldHideOffline == -1) ? false : bOldHideOffline); + CallService(MS_CLIST_SETUSEGROUPS, (bOldUseGroups == -1) ? false : bOldUseGroups, 0); } nLastRequiredHeight = 0; mutex_bDisableAutoUpdate = 0; diff --git a/plugins/Clist_modern/src/modern_viewmodebar.cpp b/plugins/Clist_modern/src/modern_viewmodebar.cpp index adb51b8167..0858bcbe5f 100644 --- a/plugins/Clist_modern/src/modern_viewmodebar.cpp +++ b/plugins/Clist_modern/src/modern_viewmodebar.cpp @@ -1246,7 +1246,7 @@ void ApplyViewMode(const char *Name, bool onlySelector) KillTimer(g_hwndViewModeFrame, TIMERID_VIEWMODEEXPIRE); SetDlgItemText(g_hwndViewModeFrame, IDC_SELECTMODE, TranslateT("All contacts")); if (g_CluiData.boldHideOffline != (BYTE)-1) - CallService(MS_CLIST_SETHIDEOFFLINE, (WPARAM)g_CluiData.boldHideOffline, 0); + pcli->pfnSetHideOffline(g_CluiData.boldHideOffline); if (g_CluiData.bOldUseGroups != (BYTE)-1) CallService(MS_CLIST_SETUSEGROUPS, (WPARAM)g_CluiData.bOldUseGroups, 0); g_CluiData.boldHideOffline = (BYTE)-1; @@ -1334,10 +1334,10 @@ void ApplyViewMode(const char *Name, bool onlySelector) if (g_CluiData.boldHideOffline == (BYTE)-1) g_CluiData.boldHideOffline = db_get_b(NULL, "CList", "HideOffline", SETTING_HIDEOFFLINE_DEFAULT); - CallService(MS_CLIST_SETHIDEOFFLINE, 0, 0); + pcli->pfnSetHideOffline(false); } else if (g_CluiData.boldHideOffline != (BYTE)-1) { - CallService(MS_CLIST_SETHIDEOFFLINE, g_CluiData.boldHideOffline, 0); + pcli->pfnSetHideOffline(g_CluiData.boldHideOffline); g_CluiData.boldHideOffline = -1; } -- cgit v1.2.3