diff options
author | George Hazan <george.hazan@gmail.com> | 2016-09-02 15:00:54 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2016-09-02 15:00:54 +0000 |
commit | 6a2895b7cc2eabdd975ace83ce5dc5f8c0d6f88f (patch) | |
tree | 4b0447e0fccf3989dd61ca9a586d3f2d198dcebe /plugins | |
parent | cd045c23540a1a18886b1886f20aaa30b7f586c1 (diff) |
- three remaining clist services converted into functions (Clist_MenuProcessCommand, Clist_IsDocked, Clist_MenuProcessHotkey);
- old unused junk removed from CLIST_INTERFACE with its stubs;
- all unused clist services also removed with bunch of another crap like unused params
git-svn-id: http://svn.miranda-ng.org/main/trunk@17243 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins')
42 files changed, 80 insertions, 82 deletions
diff --git a/plugins/ClientChangeNotify/src/ClientChangeNotify.cpp b/plugins/ClientChangeNotify/src/ClientChangeNotify.cpp index 67f13a01a7..f7949bc5e6 100644 --- a/plugins/ClientChangeNotify/src/ClientChangeNotify.cpp +++ b/plugins/ClientChangeNotify/src/ClientChangeNotify.cpp @@ -75,7 +75,7 @@ static VOID NTAPI ShowContactMenu(ULONG_PTR wParam) HMENU hMenu = Menu_BuildContactMenu(wParam);
GetCursorPos(&pt);
SetForegroundWindow(hMenuWnd);
- CallService(MS_CLIST_MENUPROCESSCOMMAND, MAKEWPARAM(TrackPopupMenu(hMenu, TPM_LEFTALIGN | TPM_RIGHTBUTTON | TPM_RETURNCMD, pt.x, pt.y, 0, hMenuWnd, NULL), MPCF_CONTACTMENU), (LPARAM)wParam);
+ Clist_MenuProcessCommand(TrackPopupMenu(hMenu, TPM_LEFTALIGN | TPM_RIGHTBUTTON | TPM_RETURNCMD, pt.x, pt.y, 0, hMenuWnd, NULL), MPCF_CONTACTMENU, wParam);
PostMessage(hMenuWnd, WM_NULL, 0, 0);
DestroyMenu(hMenu);
DestroyWindow(hMenuWnd);
diff --git a/plugins/Clist_modern/src/cluiframes.cpp b/plugins/Clist_modern/src/cluiframes.cpp index 701715a7c3..9f1287c328 100644 --- a/plugins/Clist_modern/src/cluiframes.cpp +++ b/plugins/Clist_modern/src/cluiframes.cpp @@ -1382,7 +1382,7 @@ static int _us_DoCollapseFrame(WPARAM wParam, LPARAM lParam) // do not collapse/uncollapse client/locked/invisible frames
if (g_pfwFrames[FrameId].align == alClient && !(g_pfwFrames[FrameId].Locked || (!g_pfwFrames[FrameId].visible) || g_pfwFrames[FrameId].floating)) {
RECT rc;
- if (CallService(MS_CLIST_DOCKINGISDOCKED, 0, 0)) { return 0; };
+ if (Clist_IsDocked()) { return 0; };
if (!g_CluiData.fDocked && g_CluiData.fAutoSize) { return 0; };
GetWindowRect(pcli->hwndContactList, &rc);
@@ -2614,7 +2614,7 @@ static LRESULT CALLBACK CLUIFrameTitleBarProc(HWND hwnd, UINT msg, WPARAM wParam return 1;
case WM_COMMAND:
- if (CallService(MS_CLIST_MENUPROCESSCOMMAND, MAKEWPARAM(LOWORD(wParam), 0), Frameid))
+ if (Clist_MenuProcessCommand(LOWORD(wParam), 0, Frameid))
break;
if (HIWORD(wParam) == 0) {//mouse events for self created menu
diff --git a/plugins/Clist_modern/src/groupmenu.cpp b/plugins/Clist_modern/src/groupmenu.cpp index 0c33a8b972..b2cbffff5a 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 = MS_CLIST_SHOWHIDE;
+ mi.pszService = "Clist/ShowHide";
mi.hIcolibItem = Skin_GetIconHandle(SKINICON_OTHER_SHOWHIDE);
mi.name.a = LPGEN("&Hide/show");
Menu_AddGroupMenuItem(&mi);
diff --git a/plugins/Clist_modern/src/init.cpp b/plugins/Clist_modern/src/init.cpp index 4e76e461f3..ccb7e2a412 100644 --- a/plugins/Clist_modern/src/init.cpp +++ b/plugins/Clist_modern/src/init.cpp @@ -119,6 +119,9 @@ extern "C" __declspec(dllexport) int Unload(void) return 0;
}
+/////////////////////////////////////////////////////////////////////////////////////////
+
+static int cliShowHideStub() { return cliShowHide(false); }
static HRESULT SubclassClistInterface()
{
@@ -160,7 +163,7 @@ static HRESULT SubclassClistInterface() pcli->pfnRecalcScrollBar = cliRecalcScrollBar;
pcli->pfnRowHitTest = cliRowHitTest;
pcli->pfnScrollTo = cliScrollTo;
- pcli->pfnShowHide = cliShowHide;
+ pcli->pfnShowHide = cliShowHideStub;
pcli->pfnHitTest = cliHitTest;
pcli->pfnCompareContacts = cliCompareContacts;
pcli->pfnGetIconFromStatusMode = cliGetIconFromStatusMode;
diff --git a/plugins/Clist_modern/src/modern_clc.cpp b/plugins/Clist_modern/src/modern_clc.cpp index 2f9b9d7f2c..1cd8e95663 100644 --- a/plugins/Clist_modern/src/modern_clc.cpp +++ b/plugins/Clist_modern/src/modern_clc.cpp @@ -409,7 +409,7 @@ static LRESULT clcOnKeyDown(ClcData *dat, HWND hwnd, UINT, WPARAM wParam, LPARAM KillTimer(hwnd, TIMERID_INFOTIP);
KillTimer(hwnd, TIMERID_RENAME);
- if (CallService(MS_CLIST_MENUPROCESSHOTKEY, wParam, MPCF_CONTACTMENU))
+ if (Clist_MenuProcessHotkey(wParam))
return 0;
RECT clRect;
diff --git a/plugins/Clist_modern/src/modern_clcopts.cpp b/plugins/Clist_modern/src/modern_clcopts.cpp index 3e0f9e51e9..f3c9ae692a 100644 --- a/plugins/Clist_modern/src/modern_clcopts.cpp +++ b/plugins/Clist_modern/src/modern_clcopts.cpp @@ -920,7 +920,7 @@ static INT_PTR CALLBACK DlgProcClistBehaviourOpts(HWND hwndDlg, UINT msg, WPARAM SendMessage(pcli->hwndContactTree, WM_SIZE, 0, 0); //forces it to send a cln_listsizechanged
CLUI_ReloadCLUIOptions();
EventArea_ConfigureEventArea();
- cliShowHide(0, 1);
+ cliShowHide(true);
g_mutex_bChangingMode = FALSE;
return TRUE;
}
@@ -1194,7 +1194,7 @@ static INT_PTR CALLBACK DlgProcClistWindowOpts(HWND hwndDlg, UINT msg, WPARAM wP CLUI_ChangeWindowMode();
SendMessage(pcli->hwndContactTree, WM_SIZE, 0, 0); //forces it to send a cln_listsizechanged
CLUI_ReloadCLUIOptions();
- cliShowHide(0, 1);
+ cliShowHide(true);
g_mutex_bChangingMode = FALSE;
return TRUE;
}
@@ -1756,7 +1756,7 @@ static INT_PTR CALLBACK DlgProcModernOptions(HWND hwndDlg, UINT msg, WPARAM wPar CLUI_ChangeWindowMode();
SendMessage(pcli->hwndContactTree, WM_SIZE, 0, 0); //forces it to send a cln_listsizechanged
CLUI_ReloadCLUIOptions();
- cliShowHide(0, 1);
+ cliShowHide(true);
}
g_mutex_bChangingMode = FALSE;
return TRUE;
diff --git a/plugins/Clist_modern/src/modern_clistmod.cpp b/plugins/Clist_modern/src/modern_clistmod.cpp index d1786bb6a3..3c24073f87 100644 --- a/plugins/Clist_modern/src/modern_clistmod.cpp +++ b/plugins/Clist_modern/src/modern_clistmod.cpp @@ -318,14 +318,14 @@ int GetWindowVisibleState(HWND hWnd, int iStepX, int iStepY) BYTE g_bCalledFromShowHide = 0;
-int cliShowHide(WPARAM, LPARAM lParam)
+int cliShowHide(bool bAlwaysShow)
{
BOOL bShow = FALSE;
int iVisibleState = GetWindowVisibleState(pcli->hwndContactList, 0, 0);
int method = db_get_b(NULL, "ModernData", "HideBehind", SETTING_HIDEBEHIND_DEFAULT); //(0-none, 1-leftedge, 2-rightedge);
if (method) {
- if (db_get_b(NULL, "ModernData", "BehindEdge", SETTING_BEHINDEDGE_DEFAULT) == 0 && lParam != 1)
+ if (db_get_b(NULL, "ModernData", "BehindEdge", SETTING_BEHINDEDGE_DEFAULT) == 0 && !bAlwaysShow)
CLUI_HideBehindEdge(); //hide
else
CLUI_ShowFromBehindEdge();
@@ -342,7 +342,7 @@ int cliShowHide(WPARAM, LPARAM lParam) db_unset(NULL, "ModernData", "BehindEdge");
}
- //bShow is FALSE when we enter the switch if no hide behind edge.
+ // bShow is FALSE when we enter the switch if no hide behind edge.
switch (iVisibleState) {
case GWVS_PARTIALLY_COVERED:
bShow = TRUE; break;
@@ -356,7 +356,7 @@ int cliShowHide(WPARAM, LPARAM lParam) return 0;
}
- if (bShow || lParam == 1) {
+ if (bShow || bAlwaysShow) {
Sync(CLUIFrames_ActivateSubContainers, TRUE);
CLUI_ShowWindowMod(pcli->hwndContactList, SW_RESTORE);
@@ -381,7 +381,7 @@ int cliShowHide(WPARAM, LPARAM lParam) MoveWindow(pcli->hwndContactList, rcWindow.left, rcWindow.top,
rcWindow.right - rcWindow.left, rcWindow.bottom - rcWindow.top, TRUE);
}
- else { //It needs to be hidden
+ else { // It needs to be hidden
if (GetWindowLongPtr(pcli->hwndContactList, GWL_EXSTYLE) & WS_EX_TOOLWINDOW) {
CListMod_HideWindow();
db_set_b(NULL, "CList", "State", SETTING_STATE_HIDDEN);
diff --git a/plugins/Clist_modern/src/modern_clui.cpp b/plugins/Clist_modern/src/modern_clui.cpp index 5859cbd7eb..5a7d189c51 100644 --- a/plugins/Clist_modern/src/modern_clui.cpp +++ b/plugins/Clist_modern/src/modern_clui.cpp @@ -736,7 +736,7 @@ void CLUI_ChangeWindowMode() int v = (r.bottom - r.top) > (w * 2) ? w : (r.bottom - r.top);
h = (h < v) ? h : v;
HRGN hRgn1 = CreateRoundRectRgn(0, 0, (r.right - r.left + 1), (r.bottom - r.top + 1), h, h);
- if ((db_get_b(NULL, "CLC", "RoundCorners", SETTING_ROUNDCORNERS_DEFAULT)) && (!CallService(MS_CLIST_DOCKINGISDOCKED, 0, 0)))
+ if (db_get_b(NULL, "CLC", "RoundCorners", SETTING_ROUNDCORNERS_DEFAULT) && !Clist_IsDocked())
SetWindowRgn(pcli->hwndContactList, hRgn1, 1);
else {
DeleteObject(hRgn1);
@@ -1680,7 +1680,7 @@ LRESULT CLUI::OnSizingMoving(UINT msg, WPARAM wParam, LPARAM lParam) CheckFramesPos(&rc);
Sync(CLUIFrames_OnMoving, m_hWnd, &rc);
if (!IsIconic(m_hWnd)) {
- if (!CallService(MS_CLIST_DOCKINGISDOCKED, 0, 0)) { // if g_CluiData.fDocked, dont remember pos (except for width)
+ if (!Clist_IsDocked()) { // if g_CluiData.fDocked, dont remember pos (except for width)
db_set_dw(NULL, "CList", "Height", (DWORD)(rc.bottom - rc.top));
db_set_dw(NULL, "CList", "x", (DWORD)rc.left);
db_set_dw(NULL, "CList", "y", (DWORD)rc.top);
@@ -1717,7 +1717,7 @@ LRESULT CLUI::OnSizingMoving(UINT msg, WPARAM wParam, LPARAM lParam) }
// if g_CluiData.fDocked, dont remember pos (except for width)
- if (!CallService(MS_CLIST_DOCKINGISDOCKED, 0, 0)) {
+ if (!Clist_IsDocked()) {
db_set_dw(NULL, "CList", "Height", (DWORD)(rc.bottom - rc.top));
db_set_dw(NULL, "CList", "x", (DWORD)rc.left);
db_set_dw(NULL, "CList", "y", (DWORD)rc.top);
@@ -1734,7 +1734,7 @@ LRESULT CLUI::OnSizingMoving(UINT msg, WPARAM wParam, LPARAM lParam) int v = (r.bottom - r.top) > (w * 2) ? w : (r.bottom - r.top);
h = (h < v) ? h : v;
hRgn1 = CreateRoundRectRgn(0, 0, (r.right - r.left + 1), (r.bottom - r.top + 1), h, h);
- if ((db_get_b(NULL, "CLC", "RoundCorners", SETTING_ROUNDCORNERS_DEFAULT)) && (!CallService(MS_CLIST_DOCKINGISDOCKED, 0, 0)))
+ if (db_get_b(NULL, "CLC", "RoundCorners", SETTING_ROUNDCORNERS_DEFAULT) && !Clist_IsDocked())
SetWindowRgn(m_hWnd, hRgn1, FALSE);
else {
DeleteObject(hRgn1);
@@ -1905,7 +1905,7 @@ LRESULT CLUI::OnCreateClc(UINT /*msg*/, WPARAM /*wParam*/, LPARAM /*lParam*/) {
CreateCLC();
if (db_get_b(NULL, "CList", "ShowOnStart", SETTING_SHOWONSTART_DEFAULT))
- cliShowHide((WPARAM)m_hWnd, TRUE);
+ cliShowHide(true);
pcli->pfnInitAutoRebuild(pcli->hwndContactTree);
return FALSE;
}
@@ -2177,7 +2177,7 @@ LRESULT CLUI::OnNcLButtonDblClk(UINT msg, WPARAM wParam, LPARAM lParam) POINT pt = UNPACK_POINT(lParam);
if (pt.x > rc.right - 16 && pt.x < rc.right)
- return CallService(MS_CLIST_SHOWHIDE, 0, 0);
+ return pcli->pfnShowHide();
}
return DefCluiWndProc(msg, wParam, lParam);
}
@@ -2279,7 +2279,7 @@ LRESULT CLUI::OnListSizeChangeNotify(NMCLISTCONTROL * pnmc) rcWindow = rcSizingRect;
else
GetWindowRect(m_hWnd, &rcWindow);
- if (!g_CluiData.fAutoSize || pcli->hwndContactTree == 0 || CallService(MS_CLIST_DOCKINGISDOCKED, 0, 0))
+ if (!g_CluiData.fAutoSize || pcli->hwndContactTree == 0 || Clist_IsDocked())
return FALSE;
maxHeight = db_get_b(NULL, "CLUI", "MaxSizeHeight", SETTING_MAXSIZEHEIGHT_DEFAULT);
diff --git a/plugins/Clist_modern/src/modern_commonprototypes.h b/plugins/Clist_modern/src/modern_commonprototypes.h index 610778758a..e48b78c646 100644 --- a/plugins/Clist_modern/src/modern_commonprototypes.h +++ b/plugins/Clist_modern/src/modern_commonprototypes.h @@ -120,7 +120,6 @@ BOOL ske_DrawText(HDC hdc, LPCTSTR lpString, int nCount, RECT *lpRect, UINT f LPSKINOBJECTDESCRIPTOR ske_FindObjectByName(const char *szName, BYTE objType, SKINOBJECTSLIST *Skin);
HBITMAP ske_GetCurrentWindowImage();
int ske_GetFullFilename(wchar_t *buf, const wchar_t *file, wchar_t *skinfolder, BOOL madeAbsolute);
-int ske_GetSkinFolder(wchar_t *szFileName, char *t2);
BOOL ske_ImageList_DrawEx(HIMAGELIST himl, int i, HDC hdcDst, int x, int y, int dx, int dy, COLORREF rgbBk, COLORREF rgbFg, UINT fStyle);
HICON ske_ImageList_GetIcon(HIMAGELIST himl, int i);
int ske_JustUpdateWindowImageRect(RECT *rty);
@@ -218,8 +217,6 @@ void SaveViewMode(const char *name, const wchar_t *szGroupFilter, const char *sz // cluiframes.c
int ExtraImage_ExtraIDToColumnNum(int extra);
-int LoadSkinButtonModule();
-void GetDefaultFontSetting(int i, LOGFONTA *lf, COLORREF *colour);
int CLUI_OnSkinLoad(WPARAM wParam, LPARAM lParam);
HRESULT CluiLoadModule();
HRESULT PreLoadContactListModule();
@@ -234,7 +231,6 @@ void cliCheckCacheItem(ClcCacheEntry *pdnce); void cliFreeCacheItem(ClcCacheEntry *p);
void cliRebuildEntireList(HWND hwnd, ClcData *dat);
void cliRecalcScrollBar(HWND hwnd, ClcData *dat);
-void CLUI_cliOnCreateClc(void);
int cliGetGroupContentsCount(ClcGroup *group, int visibleOnly);
int cliFindRowByText(HWND hwnd, ClcData *dat, const wchar_t *text, int prefixOk);
int cliGetRowsPriorTo(ClcGroup *group, ClcGroup *subgroup, int contactIndex);
@@ -246,7 +242,7 @@ void cli_SetContactCheckboxes(ClcContact*, int); LRESULT cli_ProcessExternalMessages(HWND hwnd, ClcData *dat, UINT msg, WPARAM wParam, LPARAM lParam);
CListEvent* cli_AddEvent(CLISTEVENT *cle);
LRESULT CALLBACK cli_ContactListControlWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam);
-int cliShowHide(WPARAM wParam, LPARAM lParam);
+int cliShowHide(bool bAlwaysShow);
BOOL cliInvalidateRect(HWND hWnd, CONST RECT *lpRect, BOOL bErase);
int cliCompareContacts(const ClcContact *contact1, const ClcContact *contact2);
int cliFindItem(HWND hwnd, ClcData *dat, DWORD dwItem, ClcContact **contact, ClcGroup **subgroup, int *isVisible);
diff --git a/plugins/Clist_modern/src/modern_skinopt.cpp b/plugins/Clist_modern/src/modern_skinopt.cpp index ace3621e07..161038a4f5 100644 --- a/plugins/Clist_modern/src/modern_skinopt.cpp +++ b/plugins/Clist_modern/src/modern_skinopt.cpp @@ -500,7 +500,7 @@ INT_PTR SvcApplySkin(WPARAM, LPARAM lParam) CLUI_ChangeWindowMode(); SendMessage(pcli->hwndContactTree, WM_SIZE, 0, 0); //forces it to send a cln_listsizechanged CLUI_ReloadCLUIOptions(); - cliShowHide(0, 1); + cliShowHide(true); g_mutex_bChangingMode = FALSE; if (g_hCLUIOptionsWnd) { diff --git a/plugins/Clist_nicer/src/clistmod.cpp b/plugins/Clist_nicer/src/clistmod.cpp index 83ff0f4687..350def26eb 100644 --- a/plugins/Clist_nicer/src/clistmod.cpp +++ b/plugins/Clist_nicer/src/clistmod.cpp @@ -173,7 +173,7 @@ int GetWindowVisibleState(HWND hWnd, int iStepX, int iStepY) return GWVS_PARTIALLY_COVERED;
}
-int ShowHide(WPARAM, LPARAM)
+int ShowHide()
{
BOOL bShow = FALSE;
diff --git a/plugins/Clist_nicer/src/clui.cpp b/plugins/Clist_nicer/src/clui.cpp index f99c10ca7f..d35cb59db5 100644 --- a/plugins/Clist_nicer/src/clui.cpp +++ b/plugins/Clist_nicer/src/clui.cpp @@ -959,7 +959,7 @@ LRESULT CALLBACK ContactListWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM l } if (cfg::dat.bClipBorder != 0 || cfg::dat.dwFlags & CLUI_FRAME_ROUNDEDFRAME) { - int docked = CallService(MS_CLIST_DOCKINGISDOCKED, 0, 0); + int docked = Clist_IsDocked(); int clip = cfg::dat.bClipBorder; if (!g_CLUISkinnedBkColor) @@ -1121,7 +1121,7 @@ skipbg: GetWindowRect(hwnd, &rc); // if docked, dont remember pos (except for width) - if (!CallService(MS_CLIST_DOCKINGISDOCKED, 0, 0)) { + if (!Clist_IsDocked()) { db_set_dw(NULL, "CList", "Height", (DWORD)(rc.bottom - rc.top)); db_set_dw(NULL, "CList", "x", (DWORD)rc.left); db_set_dw(NULL, "CList", "y", (DWORD)rc.top); @@ -1313,11 +1313,11 @@ skipbg: db_set_b(NULL, "CList", "State", SETTING_STATE_MINIMIZED); break; } - pcli->pfnShowHide(0, 0); + pcli->pfnShowHide(); return 0; } if (wParam == SC_RESTORE) { - pcli->pfnShowHide(0, 0); + pcli->pfnShowHide(); return 0; } } @@ -1474,7 +1474,7 @@ skipbg: return 0; } } - else if (CallService(MS_CLIST_MENUPROCESSCOMMAND, MAKEWPARAM(LOWORD(wParam), MPCF_MAINMENU), NULL)) + else if (Clist_MenuProcessCommand(LOWORD(wParam), MPCF_MAINMENU, NULL)) return 0; buttons_done: @@ -1488,7 +1488,7 @@ buttons_done: case ID_TRAY_HIDE: case IDC_TBMINIMIZE: case IDC_STBMINIMIZE: - pcli->pfnShowHide(0, 0); + pcli->pfnShowHide(); break; case POPUP_NEWGROUP: SendMessage(pcli->hwndContactTree, CLM_SETHIDEEMPTYGROUPS, 0, 0); @@ -1513,7 +1513,7 @@ buttons_done: SetButtonStates(); break; case POPUP_HIDEMIRANDA: - pcli->pfnShowHide(0, 0); + pcli->pfnShowHide(); break; case POPUP_SHOWMETAICONS: cfg::dat.dwFlags ^= CLUI_USEMETAICONS; @@ -1731,7 +1731,7 @@ buttons_done: PostMessage(hwnd, WM_SYSCOMMAND, SC_MINIMIZE, 0); return 0; } - pcli->pfnShowHide(0, 0); + pcli->pfnShowHide(); return 0; case CLUIINTM_REDRAW: diff --git a/plugins/Clist_nicer/src/cluiframes.cpp b/plugins/Clist_nicer/src/cluiframes.cpp index a3a6475ccf..91c347d1d0 100644 --- a/plugins/Clist_nicer/src/cluiframes.cpp +++ b/plugins/Clist_nicer/src/cluiframes.cpp @@ -1234,7 +1234,7 @@ INT_PTR CLUIFramesCollapseUnCollapseFrame(WPARAM wParam, LPARAM) // do not collapse/uncollapse client/locked/invisible frames if (Frames[FrameId].align == alClient && !(Frames[FrameId].Locked || (!Frames[FrameId].visible) || Frames[FrameId].floating)) { RECT rc; - if (CallService(MS_CLIST_DOCKINGISDOCKED, 0, 0)) + if (Clist_IsDocked()) return 0; if (db_get_b(NULL, "CLUI", "AutoSize", 0)) @@ -2278,7 +2278,7 @@ LRESULT CALLBACK CLUIFrameTitleBarProc(HWND hwnd, UINT msg, WPARAM wParam, LPARA return 0; case WM_COMMAND: - if (CallService(MS_CLIST_MENUPROCESSCOMMAND, MAKEWPARAM(LOWORD(wParam), 0), Frameid)) + if (Clist_MenuProcessCommand(LOWORD(wParam), 0, Frameid)) break; if (HIWORD(wParam) == 0) {//mouse events for self created menu diff --git a/plugins/Clist_nicer/src/groupmenu.cpp b/plugins/Clist_nicer/src/groupmenu.cpp index fe5c5177f9..1d634a48d3 100644 --- a/plugins/Clist_nicer/src/groupmenu.cpp +++ b/plugins/Clist_nicer/src/groupmenu.cpp @@ -99,7 +99,7 @@ void InitGroupMenus(void) SET_UID(mi, 0xe386678a, 0x5aee, 0x4bfa, 0xa8, 0x23, 0xd, 0xa0, 0x11, 0x99, 0xb1, 0x98);
mi.position = 500;
- mi.pszService = MS_CLIST_SHOWHIDE;
+ mi.pszService = "Clist/ShowHide";
mi.hIcolibItem = Skin_GetIconHandle(SKINICON_OTHER_SHOWHIDE);
mi.name.a = LPGEN("&Hide/show");
hHideShowMainMenuItem = Menu_AddGroupMenuItem(&mi);
diff --git a/plugins/Clist_nicer/src/init.cpp b/plugins/Clist_nicer/src/init.cpp index a9f25d0472..e6f3473460 100644 --- a/plugins/Clist_nicer/src/init.cpp +++ b/plugins/Clist_nicer/src/init.cpp @@ -46,7 +46,7 @@ void LoadButtonModule(); void GetDefaultFontSetting(int i, LOGFONT *lf, COLORREF *colour);
int GetWindowVisibleState(HWND hWnd, int iStepX, int iStepY);
-int ShowHide(WPARAM wParam, LPARAM lParam);
+int ShowHide(void);
int ClcShutdown(WPARAM wParam, LPARAM lParam);
CListEvent* AddEvent(CLISTEVENT *cle);
diff --git a/plugins/ContactsPlus/src/receive.cpp b/plugins/ContactsPlus/src/receive.cpp index affed99313..b85f23343e 100644 --- a/plugins/ContactsPlus/src/receive.cpp +++ b/plugins/ContactsPlus/src/receive.cpp @@ -289,7 +289,7 @@ INT_PTR CALLBACK RecvDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPara case WM_COMMAND:
{
- if (!lParam && CallService(MS_CLIST_MENUPROCESSCOMMAND, MAKEWPARAM(LOWORD(wParam), MPCF_CONTACTMENU), (LPARAM)wndData->mhContact))
+ if (!lParam && Clist_MenuProcessCommand(LOWORD(wParam), MPCF_CONTACTMENU, wndData->mhContact))
break;
switch(LOWORD(wParam))
diff --git a/plugins/ContactsPlus/src/send.cpp b/plugins/ContactsPlus/src/send.cpp index 93da4f592d..a432d66e1f 100644 --- a/plugins/ContactsPlus/src/send.cpp +++ b/plugins/ContactsPlus/src/send.cpp @@ -311,7 +311,7 @@ INT_PTR CALLBACK SendDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPara break;
case WM_COMMAND:
- if (!lParam && CallService(MS_CLIST_MENUPROCESSCOMMAND, MAKEWPARAM(LOWORD(wParam), MPCF_CONTACTMENU), (LPARAM)wndData->hContact))
+ if (!lParam && Clist_MenuProcessCommand(LOWORD(wParam), MPCF_CONTACTMENU, wndData->hContact))
break;
switch (LOWORD(wParam)) {
diff --git a/plugins/Db3x_mmap/src/dbcrypt.cpp b/plugins/Db3x_mmap/src/dbcrypt.cpp index b2f72c50d6..006821fc9a 100644 --- a/plugins/Db3x_mmap/src/dbcrypt.cpp +++ b/plugins/Db3x_mmap/src/dbcrypt.cpp @@ -155,7 +155,7 @@ int CDb3Mmap::InitCrypt() DBCONTACTWRITESETTING dbcws = { "CryptoEngine", "Provider" };
dbcws.value.type = DBVT_BLOB;
dbcws.value.pbVal = (PBYTE)pProvider->pszName;
- dbcws.value.cpbVal = (int)mir_strlen(pProvider->pszName) + 1;
+ dbcws.value.cpbVal = (WORD)mir_strlen(pProvider->pszName) + 1;
WriteContactSetting(NULL, &dbcws);
}
else {
diff --git a/plugins/FTPFileYM/src/dialog.cpp b/plugins/FTPFileYM/src/dialog.cpp index 36ae1f824c..7cc1bc5453 100644 --- a/plugins/FTPFileYM/src/dialog.cpp +++ b/plugins/FTPFileYM/src/dialog.cpp @@ -229,7 +229,7 @@ INT_PTR CALLBACK UploadDialog::UploadDlgProc(HWND hwndDlg, UINT msg, WPARAM wPar {
MCONTACT hContact = uDlg->m_tabs[uDlg->m_activeTab]->m_job->m_hContact;
if (hContact != NULL)
- if (CallService(MS_CLIST_MENUPROCESSCOMMAND, MAKEWPARAM(LOWORD(wParam), MPCF_CONTACTMENU), hContact))
+ if (Clist_MenuProcessCommand(LOWORD(wParam), MPCF_CONTACTMENU, hContact))
break;
if (HIWORD(wParam) == BN_CLICKED) {
diff --git a/plugins/FavContacts/src/menu.cpp b/plugins/FavContacts/src/menu.cpp index ebf50f87fa..2daf8d0dd5 100644 --- a/plugins/FavContacts/src/menu.cpp +++ b/plugins/FavContacts/src/menu.cpp @@ -432,7 +432,7 @@ static LRESULT CALLBACK MenuHostWndProc(HWND hwnd, UINT message, WPARAM wParam, SetForegroundWindow(hwndSave);
DestroyMenu(hMenu);
- CallService(MS_CLIST_MENUPROCESSCOMMAND, MAKEWPARAM(res, MPCF_CONTACTMENU), hContact);
+ Clist_MenuProcessCommand(res, MPCF_CONTACTMENU, hContact);
return TRUE;
}
diff --git a/plugins/FloatingContacts/src/main.cpp b/plugins/FloatingContacts/src/main.cpp index ca53b9415c..593d36793f 100644 --- a/plugins/FloatingContacts/src/main.cpp +++ b/plugins/FloatingContacts/src/main.cpp @@ -326,7 +326,7 @@ static void ShowContactMenu(HWND hwnd, POINT pt) return;
int idCommand = TrackPopupMenu(hContactMenu, TPM_RIGHTALIGN | TPM_TOPALIGN | TPM_RETURNCMD, pt.x, pt.y, 0, hwnd, NULL);
- CallService(MS_CLIST_MENUPROCESSCOMMAND, MAKEWPARAM(idCommand, MPCF_CONTACTMENU), (LPARAM)pThumb->hContact);
+ Clist_MenuProcessCommand(idCommand, MPCF_CONTACTMENU, pThumb->hContact);
}
}
diff --git a/plugins/HwHotKeys/src/HwHotKeys_KbdHook.cpp b/plugins/HwHotKeys/src/HwHotKeys_KbdHook.cpp index 0d2c95114a..eadb9f1f4d 100644 --- a/plugins/HwHotKeys/src/HwHotKeys_KbdHook.cpp +++ b/plugins/HwHotKeys/src/HwHotKeys_KbdHook.cpp @@ -106,7 +106,7 @@ LRESULT CALLBACK key_hook(int nCode, WPARAM wParam, LPARAM lParam) // https://m else if (HwHotKeys_CompareCurrentScancode(code_HideShow)) // хоткей сворачивания/разворачивания главного окна Miranda
{
// Beep(700, 200);
- pcli->pfnShowHide(0, 0); // есть варианты
+ pcli->pfnShowHide(); // есть варианты
return 1;
}
else if (HwHotKeys_CompareCurrentScancode(code_ReadMsg)) // хоткей чтения сообщения
diff --git a/plugins/MyDetails/src/frame.cpp b/plugins/MyDetails/src/frame.cpp index 3ab2d647e4..b1409d534f 100644 --- a/plugins/MyDetails/src/frame.cpp +++ b/plugins/MyDetails/src/frame.cpp @@ -1398,7 +1398,7 @@ void ShowGlobalStatusMenu(HWND hwnd, MyDetailsFrameData *data, POINT &p) | (opts.draw_text_align_right ? TPM_RIGHTALIGN : TPM_LEFTALIGN), p.x, p.y, 0, hwnd, NULL);
if (ret)
- CallService(MS_CLIST_MENUPROCESSCOMMAND, MAKEWPARAM(LOWORD(ret), MPCF_MAINMENU), 0);
+ Clist_MenuProcessCommand(LOWORD(ret), MPCF_MAINMENU, 0);
}
void ShowProtocolStatusMenu(HWND hwnd, MyDetailsFrameData *data, Protocol *proto, POINT &p)
@@ -1441,7 +1441,7 @@ void ShowProtocolStatusMenu(HWND hwnd, MyDetailsFrameData *data, Protocol *proto | (opts.draw_text_align_right ? TPM_RIGHTALIGN : TPM_LEFTALIGN), p.x, p.y, 0, hwnd, NULL);
if (ret)
- CallService(MS_CLIST_MENUPROCESSCOMMAND, MAKEWPARAM(LOWORD(ret), MPCF_MAINMENU), 0);
+ Clist_MenuProcessCommand(LOWORD(ret), MPCF_MAINMENU, 0);
}
else {
// Well, lets do it by hand
diff --git a/plugins/NewAwaySysMod/src/ContactList.cpp b/plugins/NewAwaySysMod/src/ContactList.cpp index 12889aaa21..1381950154 100644 --- a/plugins/NewAwaySysMod/src/ContactList.cpp +++ b/plugins/NewAwaySysMod/src/ContactList.cpp @@ -317,7 +317,7 @@ LRESULT CALLBACK ContactListSubclassProc(HWND hWnd, UINT Msg, WPARAM wParam, LPA HMENU hMenu = Menu_BuildContactMenu(hContact);
if (hMenu) {
ClientToScreen(hWnd, &pt);
- CallService(MS_CLIST_MENUPROCESSCOMMAND, MAKEWPARAM(TrackPopupMenu(hMenu, TPM_LEFTALIGN | TPM_RIGHTBUTTON | TPM_RETURNCMD, pt.x, pt.y, 0, hWnd, NULL), MPCF_CONTACTMENU), hContact);
+ Clist_MenuProcessCommand(TrackPopupMenu(hMenu, TPM_LEFTALIGN | TPM_RIGHTBUTTON | TPM_RETURNCMD, pt.x, pt.y, 0, hWnd, NULL), MPCF_CONTACTMENU, hContact);
DestroyMenu(hMenu);
return 0;
}
diff --git a/plugins/NewAwaySysMod/src/Notification.cpp b/plugins/NewAwaySysMod/src/Notification.cpp index e52cdeff3d..2dac6af6ec 100644 --- a/plugins/NewAwaySysMod/src/Notification.cpp +++ b/plugins/NewAwaySysMod/src/Notification.cpp @@ -58,7 +58,7 @@ static VOID CALLBACK ShowContactMenu(MCONTACT hContact) HMENU hMenu = Menu_BuildContactMenu(hContact);
GetCursorPos(&pt);
SetForegroundWindow(hMenuWnd);
- CallService(MS_CLIST_MENUPROCESSCOMMAND, MAKEWPARAM(TrackPopupMenu(hMenu, TPM_LEFTALIGN | TPM_RIGHTBUTTON | TPM_RETURNCMD, pt.x, pt.y, 0, hMenuWnd, NULL), MPCF_CONTACTMENU), hContact);
+ Clist_MenuProcessCommand(TrackPopupMenu(hMenu, TPM_LEFTALIGN | TPM_RIGHTBUTTON | TPM_RETURNCMD, pt.x, pt.y, 0, hMenuWnd, NULL), MPCF_CONTACTMENU, hContact);
PostMessage(hMenuWnd, WM_NULL, 0, 0);
DestroyMenu(hMenu);
DestroyWindow(hMenuWnd);
diff --git a/plugins/NewXstatusNotify/src/popup.cpp b/plugins/NewXstatusNotify/src/popup.cpp index fe70659bfa..e68d017ddf 100644 --- a/plugins/NewXstatusNotify/src/popup.cpp +++ b/plugins/NewXstatusNotify/src/popup.cpp @@ -162,7 +162,7 @@ LRESULT CALLBACK PopupDlgProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lPa case WM_COMMAND:
//This one returns TRUE if it processed the menu command, and FALSE if it did not process it.
- if (CallServiceSync(MS_CLIST_MENUPROCESSCOMMAND, MAKEWPARAM(LOWORD(wParam), MPCF_CONTACTMENU), (LPARAM)PUGetContact(hwnd)))
+ if (Clist_MenuProcessCommand(LOWORD(wParam), MPCF_CONTACTMENU, PUGetContact(hwnd)))
break;
PopupAction(hwnd, opt.LeftClickAction);
diff --git a/plugins/Popup/src/popup_wnd2.cpp b/plugins/Popup/src/popup_wnd2.cpp index c4611f8ce7..a3334c6362 100644 --- a/plugins/Popup/src/popup_wnd2.cpp +++ b/plugins/Popup/src/popup_wnd2.cpp @@ -1297,7 +1297,7 @@ LRESULT CALLBACK MenuHostWndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM case WM_COMMAND:
// do not call PluginWindowProc if menu item was clicked. prevent auto-closing...
- if (CallService(MS_CLIST_MENUPROCESSCOMMAND, MAKEWPARAM(LOWORD(wParam), MPCF_CONTACTMENU), hContact))
+ if (Clist_MenuProcessCommand(LOWORD(wParam), MPCF_CONTACTMENU, hContact))
return DefWindowProc(hwnd, message, wParam, lParam);
break;
diff --git a/plugins/QuickContacts/src/quickcontacts.cpp b/plugins/QuickContacts/src/quickcontacts.cpp index 5f10956175..91a75a87c4 100644 --- a/plugins/QuickContacts/src/quickcontacts.cpp +++ b/plugins/QuickContacts/src/quickcontacts.cpp @@ -944,7 +944,7 @@ static INT_PTR CALLBACK MainDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA if(ret)
{
SendMessage(hwndDlg, WM_CLOSE, 0, 0);
- CallService(MS_CLIST_MENUPROCESSCOMMAND, MAKEWPARAM(LOWORD(ret),MPCF_CONTACTMENU),(LPARAM) hContact);
+ Clist_MenuProcessCommand(LOWORD(ret), MPCF_CONTACTMENU, hContact);
}
db_set_dw(NULL, MODULE_NAME, "LastSentTo", (DWORD) hContact);
diff --git a/plugins/RecentContacts/src/RecentContacts.cpp b/plugins/RecentContacts/src/RecentContacts.cpp index 86758e4288..67c2dc5129 100644 --- a/plugins/RecentContacts/src/RecentContacts.cpp +++ b/plugins/RecentContacts/src/RecentContacts.cpp @@ -348,7 +348,7 @@ INT_PTR CALLBACK ShowListMainDlgProc(HWND hDlg, UINT msg, WPARAM wParam, LPARAM return Menu_DrawItem((LPDRAWITEMSTRUCT)lParam);
case WM_COMMAND:
- if (CallService(MS_CLIST_MENUPROCESSCOMMAND, MAKEWPARAM(LOWORD(wParam), MPCF_CONTACTMENU), (LPARAM)DlgDat->hContact))
+ if (Clist_MenuProcessCommand(LOWORD(wParam), MPCF_CONTACTMENU, DlgDat->hContact))
break;
switch(wParam) {
diff --git a/plugins/Scriver/src/chat/window.cpp b/plugins/Scriver/src/chat/window.cpp index 565a5f8111..d42e5b5827 100644 --- a/plugins/Scriver/src/chat/window.cpp +++ b/plugins/Scriver/src/chat/window.cpp @@ -1650,7 +1650,7 @@ LABEL_SHOWWINDOW: break;
case WM_COMMAND:
- if (!lParam && CallService(MS_CLIST_MENUPROCESSCOMMAND, MAKEWPARAM(LOWORD(wParam), MPCF_CONTACTMENU), si->hContact))
+ if (!lParam && Clist_MenuProcessCommand(LOWORD(wParam), MPCF_CONTACTMENU, si->hContact))
break;
switch (LOWORD(wParam)) {
diff --git a/plugins/Scriver/src/msgdialog.cpp b/plugins/Scriver/src/msgdialog.cpp index e1ddf07e4e..124ad7a339 100644 --- a/plugins/Scriver/src/msgdialog.cpp +++ b/plugins/Scriver/src/msgdialog.cpp @@ -1548,7 +1548,7 @@ INT_PTR CALLBACK DlgProcMessage(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP return Menu_MeasureItem((LPMEASUREITEMSTRUCT)lParam);
case WM_COMMAND:
- if (!lParam && CallService(MS_CLIST_MENUPROCESSCOMMAND, MAKEWPARAM(LOWORD(wParam), MPCF_CONTACTMENU), (LPARAM)dat->hContact))
+ if (!lParam && Clist_MenuProcessCommand(LOWORD(wParam), MPCF_CONTACTMENU, dat->hContact))
break;
switch (LOWORD(wParam)) {
diff --git a/plugins/Scriver/src/msgwindow.cpp b/plugins/Scriver/src/msgwindow.cpp index 0443ba8534..ffa91c285f 100644 --- a/plugins/Scriver/src/msgwindow.cpp +++ b/plugins/Scriver/src/msgwindow.cpp @@ -847,7 +847,7 @@ INT_PTR CALLBACK DlgProcParentWindow(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR return Menu_DrawItem((LPDRAWITEMSTRUCT)lParam);
case WM_COMMAND:
- if (CallService(MS_CLIST_MENUPROCESSCOMMAND, MAKEWPARAM(LOWORD(wParam), MPCF_CONTACTMENU), (LPARAM)dat->hContact))
+ if (Clist_MenuProcessCommand(LOWORD(wParam), MPCF_CONTACTMENU, dat->hContact))
break;
if (LOWORD(wParam) == IDCANCEL)
@@ -899,7 +899,7 @@ INT_PTR CALLBACK DlgProcParentWindow(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR CloseOtherChilden(dat, mwtd->hwnd);
break;
default:
- CallService(MS_CLIST_MENUPROCESSCOMMAND, MAKEWPARAM(LOWORD(menuResult), MPCF_CONTACTMENU), (LPARAM)mwtd->hContact);
+ Clist_MenuProcessCommand(LOWORD(menuResult), MPCF_CONTACTMENU, mwtd->hContact);
}
if (hUserMenu != NULL)
DestroyMenu(hUserMenu);
diff --git a/plugins/SeenPlugin/src/history.cpp b/plugins/SeenPlugin/src/history.cpp index 84639ea0a6..34359ae81c 100644 --- a/plugins/SeenPlugin/src/history.cpp +++ b/plugins/SeenPlugin/src/history.cpp @@ -204,7 +204,7 @@ INT_PTR CALLBACK HistoryDlgProc(HWND hwndDlg, UINT Message, WPARAM wparam, LPARA case WM_COMMAND:
hContact = (MCONTACT)GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
- if (CallService(MS_CLIST_MENUPROCESSCOMMAND, MAKEWPARAM(LOWORD(wparam), MPCF_CONTACTMENU), hContact))
+ if (Clist_MenuProcessCommand(LOWORD(wparam), MPCF_CONTACTMENU, hContact))
break;
switch (LOWORD(wparam)) {
diff --git a/plugins/StatusPlugins/StartupStatus/startupstatus.cpp b/plugins/StatusPlugins/StartupStatus/startupstatus.cpp index 959d0c71de..55fcf30050 100644 --- a/plugins/StatusPlugins/StartupStatus/startupstatus.cpp +++ b/plugins/StatusPlugins/StartupStatus/startupstatus.cpp @@ -354,7 +354,7 @@ static int OnShutdown(WPARAM wParam, LPARAM lParam) case SETTING_STATE_HIDDEN:
// try to use services where possible
if (!isHidden)
- CallService(MS_CLIST_SHOWHIDE, 0, 0);
+ pcli->pfnShowHide();
break;
case SETTING_STATE_MINIMIZED:
@@ -365,7 +365,7 @@ static int OnShutdown(WPARAM wParam, LPARAM lParam) case SETTING_STATE_NORMAL:
// try to use services where possible (that's what they're for)
if (isHidden)
- CallService(MS_CLIST_SHOWHIDE, 0, 0);
+ pcli->pfnShowHide();
break;
}
}
@@ -464,7 +464,7 @@ int CSModuleLoaded(WPARAM wParam, LPARAM lParam) WINDOWPLACEMENT wndpl = { sizeof(wndpl) };
if (GetWindowPlacement(hClist, &wndpl)) {
- if (wndpl.showCmd == SW_SHOWNORMAL && !CallService(MS_CLIST_DOCKINGISDOCKED, 0, 0)) {
+ if (wndpl.showCmd == SW_SHOWNORMAL && !Clist_IsDocked()) {
RECT rc;
if (GetWindowRect(hClist, &rc)) {
int x = rc.left;
diff --git a/plugins/TabSRMM/src/container.cpp b/plugins/TabSRMM/src/container.cpp index 2678cc0a46..d8e425b8f0 100644 --- a/plugins/TabSRMM/src/container.cpp +++ b/plugins/TabSRMM/src/container.cpp @@ -742,7 +742,7 @@ panel_found: HMENU hMenu = Menu_BuildContactMenu(hContact);
iSel = TrackPopupMenu(hMenu, TPM_RETURNCMD, pt.x, pt.y, 0, hwndDlg, NULL);
if (iSel)
- CallService(MS_CLIST_MENUPROCESSCOMMAND, MAKEWPARAM(LOWORD(iSel), MPCF_CONTACTMENU), hContact);
+ Clist_MenuProcessCommand(LOWORD(iSel), MPCF_CONTACTMENU, hContact);
DestroyMenu(hMenu);
}
}
@@ -867,11 +867,10 @@ panel_found: if (dat) {
if (fProcessContactMenu)
- return(CallService(MS_CLIST_MENUPROCESSCOMMAND, MAKEWPARAM(LOWORD(wParam), MPCF_CONTACTMENU), (LPARAM)dat->hContact));
- else if (fProcessMainMenu) {
- return(CallService(MS_CLIST_MENUPROCESSCOMMAND, MAKEWPARAM(LOWORD(wParam), MPCF_MAINMENU), 0));
- }
- else if (MsgWindowMenuHandler(dat, LOWORD(wParam), MENU_PICMENU) == 1)
+ return Clist_MenuProcessCommand(LOWORD(wParam), MPCF_CONTACTMENU, dat->hContact);
+ if (fProcessMainMenu)
+ return Clist_MenuProcessCommand(LOWORD(wParam), MPCF_MAINMENU, 0);
+ if (MsgWindowMenuHandler(dat, LOWORD(wParam), MENU_PICMENU) == 1)
break;
}
SendMessage(pContainer->hwndActive, DM_QUERYHCONTACT, 0, (LPARAM)&hContact);
diff --git a/plugins/TabSRMM/src/generic_msghandlers.cpp b/plugins/TabSRMM/src/generic_msghandlers.cpp index bf08ac6917..ddbf392426 100644 --- a/plugins/TabSRMM/src/generic_msghandlers.cpp +++ b/plugins/TabSRMM/src/generic_msghandlers.cpp @@ -567,7 +567,7 @@ LRESULT TSAPI DM_MsgWindowCmdHandler(HWND hwndDlg, TContainerData *m_pContainer, iSelection = TrackPopupMenu(submenu, TPM_RETURNCMD, rc.left, rc.bottom, 0, hwndDlg, NULL); if (iSelection) - CallService(MS_CLIST_MENUPROCESSCOMMAND, MAKEWPARAM(LOWORD(iSelection), MPCF_CONTACTMENU), (LPARAM)dat->hContact); + Clist_MenuProcessCommand(LOWORD(iSelection), MPCF_CONTACTMENU, dat->hContact); DestroyMenu(submenu); break; diff --git a/plugins/TooltipNotify/src/TooltipNotify.cpp b/plugins/TooltipNotify/src/TooltipNotify.cpp index bea0343104..cd774894b7 100644 --- a/plugins/TooltipNotify/src/TooltipNotify.cpp +++ b/plugins/TooltipNotify/src/TooltipNotify.cpp @@ -855,7 +855,7 @@ void CTooltipNotify::OnTooltipDblClicked(CTooltip *pTooltip) {
switch (m_sOptions.bLDblClick) {
case SHOW_HIDE_CLIST:
- ::CallService(MS_CLIST_SHOWHIDE, 0, 0);
+ pcli->pfnShowHide();
break;
case OPEN_MSGDLG:
@@ -868,7 +868,7 @@ void CTooltipNotify::OnTooltipDblClicked(CTooltip *pTooltip) }
default:
- ::CallService(MS_CLIST_SHOWHIDE, 0, 0);
+ pcli->pfnShowHide();
break;
}
}
diff --git a/plugins/TopToolBar/src/InternalButtons.cpp b/plugins/TopToolBar/src/InternalButtons.cpp index 81bbdac991..26e06d42b3 100644 --- a/plugins/TopToolBar/src/InternalButtons.cpp +++ b/plugins/TopToolBar/src/InternalButtons.cpp @@ -29,7 +29,7 @@ static stdButtons[] = { { LPGEN("Enable/disable metacontacts"), "MetaContacts/OnOff", IDI_METAOFF, IDI_METAON, LPGEN("Disable metacontacts"), LPGEN("Enable metacontacts"), 1, 1 },
{ LPGEN("Enable/disable groups"), MS_CLIST_TOGGLEGROUPS, IDI_GROUPSOFF, IDI_GROUPSON, LPGEN("Enable groups"), LPGEN("Disable groups"), 1, 1 },
{ LPGEN("Enable/disable sounds"), TTBI_SOUNDSONOFF, IDI_SOUNDSOFF, IDI_SOUNDSON, LPGEN("Disable sounds"), LPGEN("Enable sounds"), 1, 1 },
- { LPGEN("Minimize contact list"), MS_CLIST_SHOWHIDE, SKINICON_OTHER_SHOWHIDE, 0, LPGEN("Minimize contact list"), NULL, 0, 1 },
+ { LPGEN("Minimize contact list"), "Clist/ShowHide", SKINICON_OTHER_SHOWHIDE, 0, LPGEN("Minimize contact list"), NULL, 0, 1 },
{ LPGEN("Exit"), "CloseAction", SKINICON_OTHER_EXIT, 0, LPGEN("Exit"), NULL, 0, 0 }
};
diff --git a/plugins/UserInfoEx/src/dlg_anniversarylist.cpp b/plugins/UserInfoEx/src/dlg_anniversarylist.cpp index 8eab08d56b..11c2b3e83b 100644 --- a/plugins/UserInfoEx/src/dlg_anniversarylist.cpp +++ b/plugins/UserInfoEx/src/dlg_anniversarylist.cpp @@ -437,7 +437,7 @@ class CAnnivList CItemData* pid = pDlg->ItemData(pDlg->_curSel);
// process contact menu command
- if (pid && CallService(MS_CLIST_MENUPROCESSCOMMAND, MAKEWPARAM(LOWORD(wParam), MPCF_CONTACTMENU), (LPARAM)pid->_hContact))
+ if (pid && Clist_MenuProcessCommand(LOWORD(wParam), MPCF_CONTACTMENU, pid->_hContact))
break;
switch (LOWORD(wParam)) {
diff --git a/plugins/Weather/src/weather_mwin.cpp b/plugins/Weather/src/weather_mwin.cpp index 6d414a8f7e..fae16001e1 100644 --- a/plugins/Weather/src/weather_mwin.cpp +++ b/plugins/Weather/src/weather_mwin.cpp @@ -100,11 +100,11 @@ static LRESULT CALLBACK wndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPara break;
case WM_LBUTTONDBLCLK:
- BriefInfo((WPARAM)data->hContact, 0);
+ BriefInfo(data->hContact, 0);
break;
case WM_COMMAND: //Needed by the contact's context menu
- if (CallService(MS_CLIST_MENUPROCESSCOMMAND, MAKEWPARAM(LOWORD(wParam), MPCF_CONTACTMENU), (LPARAM)data->hContact))
+ if (Clist_MenuProcessCommand(LOWORD(wParam), MPCF_CONTACTMENU, data->hContact))
break;
return FALSE;
@@ -116,7 +116,7 @@ static LRESULT CALLBACK wndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPara case WM_NOTIFY:
if (((LPNMHDR)lParam)->code == NM_AVATAR_CHANGED) {
- BOOL newava = CallService(MS_AV_GETAVATARBITMAP, (WPARAM)data->hContact, 0) != 0;
+ BOOL newava = CallService(MS_AV_GETAVATARBITMAP, data->hContact, 0) != 0;
if (newava != data->haveAvatar) {
LONG_PTR style = GetWindowLongPtr(data->hAvt, GWL_STYLE);
data->haveAvatar = newava;
@@ -293,7 +293,7 @@ INT_PTR Mwin_MenuClicked(WPARAM wParam, LPARAM) int BuildContactMenu(WPARAM wparam, LPARAM)
{
- int flags = db_get_dw((MCONTACT)wparam, WEATHERPROTONAME, "mwin", 0) ? CMIF_CHECKED : 0;
+ int flags = db_get_dw(wparam, WEATHERPROTONAME, "mwin", 0) ? CMIF_CHECKED : 0;
Menu_ModifyItem(hMwinMenu, NULL, INVALID_HANDLE_VALUE, flags);
return 0;
}
diff --git a/plugins/Weather/src/weather_popup.cpp b/plugins/Weather/src/weather_popup.cpp index c94e12a7ea..62beb8a588 100644 --- a/plugins/Weather/src/weather_popup.cpp +++ b/plugins/Weather/src/weather_popup.cpp @@ -25,7 +25,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #include "stdafx.h"
// variables for weather_popup.c
-static HANDLE hPopupContact;
+static MCONTACT hPopupContact;
//============ SHOW WEATHER POPUPS ============
@@ -175,7 +175,7 @@ LRESULT CALLBACK PopupWndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam case IDM_M7: // display contact menu
hMenu = Menu_BuildContactMenu(wParam);
GetCursorPos(&pt);
- hPopupContact = (HANDLE)wParam;
+ hPopupContact = wParam;
TrackPopupMenu(hMenu, TPM_LEFTALIGN, pt.x, pt.y, 0, hWnd, NULL);
DestroyMenu(hMenu);
break;
@@ -184,7 +184,7 @@ LRESULT CALLBACK PopupWndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam CallService(MS_USERINFO_SHOWDIALOG, wParam, 0);
case WM_COMMAND: //Needed by the contact's context menu
- if (CallService(MS_CLIST_MENUPROCESSCOMMAND, MAKEWPARAM(LOWORD(wParam), MPCF_CONTACTMENU), (LPARAM)hPopupContact))
+ if (Clist_MenuProcessCommand(LOWORD(wParam), MPCF_CONTACTMENU, hPopupContact))
break;
return FALSE;
diff --git a/plugins/WhenWasIt/src/dlg_handlers.cpp b/plugins/WhenWasIt/src/dlg_handlers.cpp index 984fc1b5b2..c2c48930e5 100644 --- a/plugins/WhenWasIt/src/dlg_handlers.cpp +++ b/plugins/WhenWasIt/src/dlg_handlers.cpp @@ -679,7 +679,7 @@ static LRESULT CALLBACK BirthdaysListSubclassProc(HWND hWnd, UINT msg, WPARAM wP hContact = (MCONTACT)item.lParam;
HMENU hMenu = Menu_BuildContactMenu(hContact);
if (hMenu != NULL) {
- CallService(MS_CLIST_MENUPROCESSCOMMAND, MAKEWPARAM(TrackPopupMenu(hMenu, TPM_RIGHTBUTTON | TPM_RETURNCMD, pt.x, pt.y, 0, hWnd, NULL), MPCF_CONTACTMENU), hContact);
+ Clist_MenuProcessCommand(TrackPopupMenu(hMenu, TPM_RIGHTBUTTON | TPM_RETURNCMD, pt.x, pt.y, 0, hWnd, NULL), MPCF_CONTACTMENU, hContact);
DestroyMenu(hMenu);
}
break;
|