summaryrefslogtreecommitdiff
path: root/src/mir_app
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2016-09-01 12:48:54 +0000
committerGeorge Hazan <george.hazan@gmail.com>2016-09-01 12:48:54 +0000
commit11ab7716e9d48c7505fbcf4fe1deba33b494cdc1 (patch)
tree795bb05caa502ed8e1f4fc7064563e112b077197 /src/mir_app
parentecfe7288fee11443d9a0f48ca38daa2aabf955c5 (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 'src/mir_app')
-rw-r--r--src/mir_app/src/clistmod.cpp2
-rw-r--r--src/mir_app/src/clui.cpp2
-rw-r--r--src/mir_app/src/menu_groups.cpp9
3 files changed, 9 insertions, 4 deletions
diff --git a/src/mir_app/src/clistmod.cpp b/src/mir_app/src/clistmod.cpp
index 844027ecf1..9b39a4f170 100644
--- a/src/mir_app/src/clistmod.cpp
+++ b/src/mir_app/src/clistmod.cpp
@@ -412,7 +412,6 @@ static INT_PTR CompareContacts(WPARAM wParam, LPARAM lParam)
/***************************************************************************************/
static INT_PTR ShowHideStub(WPARAM wParam, LPARAM lParam) { return cli.pfnShowHide(wParam, lParam); }
-static INT_PTR SetHideOfflineStub(WPARAM wParam, LPARAM) { return cli.pfnSetHideOffline((int)wParam); }
static INT_PTR Docking_ProcessWindowMessageStub(WPARAM wParam, LPARAM lParam) { return cli.pfnDocking_ProcessWindowMessage(wParam, lParam); }
static INT_PTR HotkeysProcessMessageStub(WPARAM wParam, LPARAM lParam) { return cli.pfnHotkeysProcessMessage(wParam, lParam); }
@@ -433,7 +432,6 @@ int LoadContactListModule2(void)
CreateServiceFunction(MS_CLIST_CONTACTSCOMPARE, CompareContacts);
CreateServiceFunction(MS_CLIST_CONTACTCHANGEGROUP, ContactChangeGroup);
CreateServiceFunction(MS_CLIST_SHOWHIDE, ShowHideStub);
- CreateServiceFunction(MS_CLIST_SETHIDEOFFLINE, SetHideOfflineStub);
CreateServiceFunction(MS_CLIST_DOCKINGPROCESSMESSAGE, Docking_ProcessWindowMessageStub);
CreateServiceFunction(MS_CLIST_DOCKINGISDOCKED, Docking_IsDocked);
CreateServiceFunction(MS_CLIST_HOTKEYSPROCESSMESSAGE, HotkeysProcessMessageStub);
diff --git a/src/mir_app/src/clui.cpp b/src/mir_app/src/clui.cpp
index 2090775fd5..8f6d32b2e7 100644
--- a/src/mir_app/src/clui.cpp
+++ b/src/mir_app/src/clui.cpp
@@ -704,7 +704,7 @@ LRESULT CALLBACK fnContactListWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM
break;
case POPUP_HIDEOFFLINE:
- CallService(MS_CLIST_SETHIDEOFFLINE, (WPARAM)(-1), 0);
+ cli.pfnSetHideOffline(-1);
break;
case POPUP_HIDEOFFLINEROOT:
diff --git a/src/mir_app/src/menu_groups.cpp b/src/mir_app/src/menu_groups.cpp
index e4a0a1d0af..a80c9dc527 100644
--- a/src/mir_app/src/menu_groups.cpp
+++ b/src/mir_app/src/menu_groups.cpp
@@ -119,6 +119,12 @@ static INT_PTR UseGroupsHelper(WPARAM, LPARAM)
return newVal;
}
+static INT_PTR HideOfflineHelper(WPARAM, LPARAM)
+{
+ cli.pfnSetHideOffline(-1);
+ return 0;
+}
+
static INT_PTR HideOfflineRootHelper(WPARAM, LPARAM)
{
int newVal = !SendMessage(cli.hwndContactTree, CLM_GETHIDEOFFLINEROOT, 0, 0);
@@ -293,10 +299,11 @@ void InitGroupMenus(void)
SET_UID(mi, 0xe6269658, 0x69, 0x4094, 0x9b, 0x35, 0x4e, 0x80, 0x29, 0x26, 0xf, 0x8e);
mi.position = 500001;
mi.hIcolibItem = NULL;
- mi.pszService = MS_CLIST_SETHIDEOFFLINE;
+ mi.pszService = MS_CLIST_TOGGLEHIDEOFFLINE;
mi.name.a = LPGEN("&Hide offline users");
gmp.wParam = -1;
hHideOfflineUsersMenuItem = Menu_AddGroupMenuItem(&mi, &gmp);
+ CreateServiceFunction(mi.pszService, HideOfflineHelper);
SET_UID(mi, 0xeded7371, 0xf6e6, 0x48c3, 0x8c, 0x9e, 0x62, 0xc1, 0xd5, 0xcb, 0x51, 0xbc);
mi.position = 500002;