diff options
author | George Hazan <george.hazan@gmail.com> | 2016-09-01 12:48:54 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2016-09-01 12:48:54 +0000 |
commit | 11ab7716e9d48c7505fbcf4fe1deba33b494cdc1 (patch) | |
tree | 795bb05caa502ed8e1f4fc7064563e112b077197 /plugins/Clist_modern/src | |
parent | ecfe7288fee11443d9a0f48ca38daa2aabf955c5 (diff) |
- 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
Diffstat (limited to 'plugins/Clist_modern/src')
-rw-r--r-- | plugins/Clist_modern/src/modern_clui.cpp | 14 | ||||
-rw-r--r-- | plugins/Clist_modern/src/modern_viewmodebar.cpp | 6 |
2 files changed, 7 insertions, 13 deletions
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;
}
|