From 6a2895b7cc2eabdd975ace83ce5dc5f8c0d6f88f Mon Sep 17 00:00:00 2001 From: George Hazan Date: Fri, 2 Sep 2016 15:00:54 +0000 Subject: - 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 --- plugins/Clist_nicer/src/clistmod.cpp | 2 +- plugins/Clist_nicer/src/clui.cpp | 16 ++++++++-------- plugins/Clist_nicer/src/cluiframes.cpp | 4 ++-- plugins/Clist_nicer/src/groupmenu.cpp | 2 +- plugins/Clist_nicer/src/init.cpp | 2 +- 5 files changed, 13 insertions(+), 13 deletions(-) (limited to 'plugins/Clist_nicer') 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); -- cgit v1.2.3