summaryrefslogtreecommitdiff
path: root/plugins/Clist_modern
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2015-06-27 21:50:25 +0000
committerGeorge Hazan <george.hazan@gmail.com>2015-06-27 21:50:25 +0000
commit24415c15d859a94a34a2b575af74336a9aff5f45 (patch)
treeecca2fa440ba5064a60bc90aa3f6843b1feb46f2 /plugins/Clist_modern
parent944634aed3d3f7849a207b5007c6f8c4d6c2c975 (diff)
- clist menus went to functions
- m_clist.h cleaning & reordering git-svn-id: http://svn.miranda-ng.org/main/trunk@14422 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Clist_modern')
-rw-r--r--plugins/Clist_modern/src/CLUIFrames/groupmenu.cpp4
-rw-r--r--plugins/Clist_modern/src/modern_clisttray.cpp10
-rw-r--r--plugins/Clist_modern/src/modern_clui.cpp13
-rw-r--r--plugins/Clist_modern/src/modern_statusbar.cpp6
4 files changed, 15 insertions, 18 deletions
diff --git a/plugins/Clist_modern/src/CLUIFrames/groupmenu.cpp b/plugins/Clist_modern/src/CLUIFrames/groupmenu.cpp
index a63d2279ae..1af388347a 100644
--- a/plugins/Clist_modern/src/CLUIFrames/groupmenu.cpp
+++ b/plugins/Clist_modern/src/CLUIFrames/groupmenu.cpp
@@ -102,12 +102,12 @@ INT_PTR GroupMenuonAddService(WPARAM wParam, LPARAM lParam)
}
if (hGroupMainMenuItemProxy == (HANDLE)lParam) {
mii->fMask |= MIIM_SUBMENU;
- mii->hSubMenu = (HMENU)CallService(MS_CLIST_MENUGETMAIN, 0, 0);
+ mii->hSubMenu = Menu_GetMainMenu();
}
if (hGroupStatusMenuItemProxy == (HANDLE)lParam) {
mii->fMask |= MIIM_SUBMENU;
- mii->hSubMenu = (HMENU)CallService(MS_CLIST_MENUGETSTATUS, 0, 0);
+ mii->hSubMenu = (HMENU)Menu_GetStatusMenu();
}
return TRUE;
diff --git a/plugins/Clist_modern/src/modern_clisttray.cpp b/plugins/Clist_modern/src/modern_clisttray.cpp
index 049e105b36..5dfb00c715 100644
--- a/plugins/Clist_modern/src/modern_clisttray.cpp
+++ b/plugins/Clist_modern/src/modern_clisttray.cpp
@@ -196,12 +196,12 @@ INT_PTR TrayMenuonAddService(WPARAM wParam, LPARAM lParam)
if (hTrayMainMenuItemProxy == (HGENMENU)lParam) {
mii->fMask |= MIIM_SUBMENU;
- mii->hSubMenu = (HMENU)CallService(MS_CLIST_MENUGETMAIN, 0, 0);
+ mii->hSubMenu = Menu_GetMainMenu();
}
if (hTrayStatusMenuItemProxy == (HGENMENU)lParam) {
mii->fMask |= MIIM_SUBMENU;
- mii->hSubMenu = (HMENU)CallService(MS_CLIST_MENUGETSTATUS, 0, 0);
+ mii->hSubMenu = (HMENU)Menu_GetStatusMenu();
}
return(TRUE);
@@ -239,7 +239,7 @@ INT_PTR cli_TrayIconProcessMessage(WPARAM wParam, LPARAM lParam)
case TIM_CALLBACK:
if ((GetAsyncKeyState(VK_CONTROL) & 0x8000) && msg->lParam == WM_LBUTTONDOWN && !db_get_b(NULL, "CList", "Tray1Click", SETTING_TRAY1CLICK_DEFAULT)) {
POINT pt;
- HMENU hMenu = (HMENU)CallService(MS_CLIST_MENUGETSTATUS, 0, 0);
+ HMENU hMenu = (HMENU)Menu_GetStatusMenu();
g_mutex_bOnTrayRightClick = 1;
IS_WM_MOUSE_DOWN_IN_TRAY = 1;
SetForegroundWindow(msg->hwnd);
@@ -357,8 +357,8 @@ void InitTrayMenus(void)
mi.name.a = LPGEN("&About");
Menu_AddTrayMenuItem(&mi);
- hMainMenu = (HMENU)CallService(MS_CLIST_MENUGETMAIN, 0, 0);
- hStatusMenu = (HMENU)CallService(MS_CLIST_MENUGETSTATUS, 0, 0);
+ hMainMenu = Menu_GetMainMenu();
+ hStatusMenu = (HMENU)Menu_GetStatusMenu();
}
void UninitTrayMenu()
diff --git a/plugins/Clist_modern/src/modern_clui.cpp b/plugins/Clist_modern/src/modern_clui.cpp
index d2945e1aa0..d4851203ce 100644
--- a/plugins/Clist_modern/src/modern_clui.cpp
+++ b/plugins/Clist_modern/src/modern_clui.cpp
@@ -213,17 +213,15 @@ int CLUI::OnEvent_ContactMenuPreBuild(WPARAM, LPARAM)
INT_PTR CLUI::Service_ShowMainMenu(WPARAM, LPARAM)
{
- HMENU hMenu = (HMENU)CallService(MS_CLIST_MENUGETMAIN, 0, 0);
-
POINT pt;
GetCursorPos(&pt);
- TrackPopupMenu(hMenu, TPM_TOPALIGN | TPM_LEFTALIGN | TPM_LEFTBUTTON, pt.x, pt.y, 0, pcli->hwndContactList, NULL);
+ TrackPopupMenu(Menu_GetMainMenu(), TPM_TOPALIGN | TPM_LEFTALIGN | TPM_LEFTBUTTON, pt.x, pt.y, 0, pcli->hwndContactList, NULL);
return 0;
}
INT_PTR CLUI::Service_ShowStatusMenu(WPARAM, LPARAM)
{
- HMENU hMenu = (HMENU)CallService(MS_CLIST_MENUGETSTATUS, 0, 0);
+ HMENU hMenu = (HMENU)Menu_GetStatusMenu();
POINT pt;
GetCursorPos(&pt);
@@ -254,10 +252,10 @@ HRESULT CLUI::CreateCluiFrames()
MENUITEMINFO mii = { 0 };
mii.cbSize = sizeof(mii);
mii.fMask = MIIM_SUBMENU;
- mii.hSubMenu = (HMENU)CallService(MS_CLIST_MENUGETMAIN, 0, 0);
+ mii.hSubMenu = Menu_GetMainMenu();
SetMenuItemInfo(g_hMenuMain, 0, TRUE, &mii);
- mii.hSubMenu = (HMENU)CallService(MS_CLIST_MENUGETSTATUS, 0, 0);
+ mii.hSubMenu = (HMENU)Menu_GetStatusMenu();
SetMenuItemInfo(g_hMenuMain, 1, TRUE, &mii);
CreateCLCWindow(pcli->hwndContactList);
@@ -1816,8 +1814,7 @@ LRESULT CLUI::OnUpdate(UINT /*msg*/, WPARAM /*wParam*/, LPARAM /*lParam*/)
LRESULT CLUI::OnInitMenu(UINT /*msg*/, WPARAM /*wParam*/, LPARAM /*lParam*/)
{
if (!CLUI::IsMainMenuInited()) {
- if (ServiceExists(MS_CLIST_MENUBUILDMAIN))
- CallService(MS_CLIST_MENUBUILDMAIN, 0, 0);
+ Menu_BuildMainMenu();
CLUI::m_fMainMenuInited = TRUE;
}
return FALSE;
diff --git a/plugins/Clist_modern/src/modern_statusbar.cpp b/plugins/Clist_modern/src/modern_statusbar.cpp
index 1f087a1cb4..e2b429d3a5 100644
--- a/plugins/Clist_modern/src/modern_statusbar.cpp
+++ b/plugins/Clist_modern/src/modern_statusbar.cpp
@@ -832,12 +832,12 @@ LRESULT CALLBACK ModernStatusProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPa
if (msg == WM_RBUTTONDOWN) {
BOOL a = ((g_StatusBarData.perProtoConfig && p.SBarRightClk) || g_StatusBarData.SBarRightClk);
if (a ^ bShift)
- hMenu = (HMENU)CallService(MS_CLIST_MENUGETMAIN, 0, 0);
+ hMenu = Menu_GetMainMenu();
else
- hMenu = (HMENU)CallService(MS_CLIST_MENUGETSTATUS, 0, 0);
+ hMenu = (HMENU)Menu_GetStatusMenu();
}
else {
- hMenu = (HMENU)CallService(MS_CLIST_MENUGETSTATUS, 0, 0);
+ hMenu = (HMENU)Menu_GetStatusMenu();
HMENU hSubMenu = GetSubMenu(hMenu, p.iProtoPos);
if (hSubMenu)
hMenu = hSubMenu;