summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/m_clist.h6
-rw-r--r--plugins/Clist_modern/src/groupmenu.cpp2
-rw-r--r--plugins/Clist_nicer/src/groupmenu.cpp4
-rw-r--r--src/mir_app/src/menu_clist.cpp7
-rw-r--r--src/mir_app/src/menu_tray.cpp2
5 files changed, 16 insertions, 5 deletions
diff --git a/include/m_clist.h b/include/m_clist.h
index f919bc5c06..ee96559b84 100644
--- a/include/m_clist.h
+++ b/include/m_clist.h
@@ -360,6 +360,12 @@ EXTERN_C MIR_APP_DLL(BOOL) Clist_IsDocked(void);
#define MS_CLIST_TOGGLEHIDEOFFLINEROOT "CList/ToggleHideOfflineRoot"
/////////////////////////////////////////////////////////////////////////////////////////
+// toggles contact list visibility
+// wParam = lParam = 0
+
+#define MS_CLIST_SHOWHIDE "CList/ShowHide"
+
+/////////////////////////////////////////////////////////////////////////////////////////
// sent when the group get modified (created, renamed or deleted)
// or contact is moving from group to group
// wParam = hContact - NULL if operation on group
diff --git a/plugins/Clist_modern/src/groupmenu.cpp b/plugins/Clist_modern/src/groupmenu.cpp
index 0cf65d4ec9..0c2f81b74a 100644
--- a/plugins/Clist_modern/src/groupmenu.cpp
+++ b/plugins/Clist_modern/src/groupmenu.cpp
@@ -60,7 +60,7 @@ void InitGroupMenus(void)
SET_UID(mi, 0xe386678a, 0x5aee, 0x4bfa, 0xa8, 0x23, 0xd, 0xa0, 0x11, 0x99, 0xb1, 0x98);
mi.position = 500;
- mi.pszService = "Clist/ShowHide";
+ mi.pszService = MS_CLIST_SHOWHIDE;
mi.hIcolibItem = Skin_GetIconHandle(SKINICON_OTHER_SHOWHIDE);
mi.name.a = LPGEN("&Hide/show");
Menu_AddGroupMenuItem(&mi);
diff --git a/plugins/Clist_nicer/src/groupmenu.cpp b/plugins/Clist_nicer/src/groupmenu.cpp
index b4fe9c1384..7a89429983 100644
--- a/plugins/Clist_nicer/src/groupmenu.cpp
+++ b/plugins/Clist_nicer/src/groupmenu.cpp
@@ -94,12 +94,10 @@ void InitGroupMenus(void)
HookEvent(ME_CLIST_PREBUILDGROUPMENU, OnBuildGroupMenu);
-
CMenuItem mi;
-
SET_UID(mi, 0xe386678a, 0x5aee, 0x4bfa, 0xa8, 0x23, 0xd, 0xa0, 0x11, 0x99, 0xb1, 0x98);
mi.position = 500;
- mi.pszService = "Clist/ShowHide";
+ mi.pszService = MS_CLIST_SHOWHIDE;
mi.hIcolibItem = Skin_GetIconHandle(SKINICON_OTHER_SHOWHIDE);
mi.name.a = LPGEN("&Hide/show");
hHideShowMainMenuItem = Menu_AddGroupMenuItem(&mi);
diff --git a/src/mir_app/src/menu_clist.cpp b/src/mir_app/src/menu_clist.cpp
index adb2decf95..466a8e3ff1 100644
--- a/src/mir_app/src/menu_clist.cpp
+++ b/src/mir_app/src/menu_clist.cpp
@@ -1030,6 +1030,12 @@ static INT_PTR HotkeySetStatus(WPARAM, LPARAM lParam)
return 0;
}
+static INT_PTR ShowHide(WPARAM, LPARAM)
+{
+ cli.pfnShowHide();
+ return 0;
+}
+
/////////////////////////////////////////////////////////////////////////////////////////
// PROTOCOL MENU
@@ -1104,6 +1110,7 @@ void InitCustomMenus(void)
// initialize hotkeys
CreateServiceFunction(MS_CLIST_HKSTATUS, HotkeySetStatus);
+ CreateServiceFunction(MS_CLIST_SHOWHIDE, ShowHide);
HOTKEYDESC hkd = {};
hkd.szSection.w = L"Status";
diff --git a/src/mir_app/src/menu_tray.cpp b/src/mir_app/src/menu_tray.cpp
index c508be12bb..b2ad890e86 100644
--- a/src/mir_app/src/menu_tray.cpp
+++ b/src/mir_app/src/menu_tray.cpp
@@ -121,7 +121,7 @@ void InitTrayMenus(void)
SET_UID(mi, 0x6c202553, 0xb4d5, 0x403c, 0xa6, 0x82, 0x2, 0xd8, 0x2b, 0x42, 0xba, 0x9e);
mi.flags = CMIF_DEFAULT;
mi.position = 100000;
- mi.pszService = "CList/ShowHide";
+ mi.pszService = MS_CLIST_SHOWHIDE;
mi.name.a = LPGEN("&Hide/show");
mi.hIcolibItem = Skin_GetIconHandle(SKINICON_OTHER_SHOWHIDE);
Menu_AddTrayMenuItem(&mi);