summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2016-09-02 15:00:54 +0000
committerGeorge Hazan <george.hazan@gmail.com>2016-09-02 15:00:54 +0000
commit6a2895b7cc2eabdd975ace83ce5dc5f8c0d6f88f (patch)
tree4b0447e0fccf3989dd61ca9a586d3f2d198dcebe
parentcd045c23540a1a18886b1886f20aaa30b7f586c1 (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
-rw-r--r--bin10/lib/mir_app.libbin71674 -> 72418 bytes
-rw-r--r--bin10/lib/mir_app64.libbin69176 -> 69858 bytes
-rw-r--r--bin12/lib/mir_app.libbin71674 -> 72418 bytes
-rw-r--r--bin12/lib/mir_app64.libbin69176 -> 69858 bytes
-rw-r--r--bin14/lib/mir_app.libbin71674 -> 72418 bytes
-rw-r--r--bin14/lib/mir_app64.libbin69176 -> 69858 bytes
-rw-r--r--include/delphi/m_clistint.inc11
-rw-r--r--include/m_clist.h89
-rw-r--r--include/m_clistint.h11
-rw-r--r--plugins/ClientChangeNotify/src/ClientChangeNotify.cpp2
-rw-r--r--plugins/Clist_modern/src/cluiframes.cpp4
-rw-r--r--plugins/Clist_modern/src/groupmenu.cpp2
-rw-r--r--plugins/Clist_modern/src/init.cpp5
-rw-r--r--plugins/Clist_modern/src/modern_clc.cpp2
-rw-r--r--plugins/Clist_modern/src/modern_clcopts.cpp6
-rw-r--r--plugins/Clist_modern/src/modern_clistmod.cpp10
-rw-r--r--plugins/Clist_modern/src/modern_clui.cpp14
-rw-r--r--plugins/Clist_modern/src/modern_commonprototypes.h6
-rw-r--r--plugins/Clist_modern/src/modern_skinopt.cpp2
-rw-r--r--plugins/Clist_nicer/src/clistmod.cpp2
-rw-r--r--plugins/Clist_nicer/src/clui.cpp16
-rw-r--r--plugins/Clist_nicer/src/cluiframes.cpp4
-rw-r--r--plugins/Clist_nicer/src/groupmenu.cpp2
-rw-r--r--plugins/Clist_nicer/src/init.cpp2
-rw-r--r--plugins/ContactsPlus/src/receive.cpp2
-rw-r--r--plugins/ContactsPlus/src/send.cpp2
-rw-r--r--plugins/Db3x_mmap/src/dbcrypt.cpp2
-rw-r--r--plugins/FTPFileYM/src/dialog.cpp2
-rw-r--r--plugins/FavContacts/src/menu.cpp2
-rw-r--r--plugins/FloatingContacts/src/main.cpp2
-rw-r--r--plugins/HwHotKeys/src/HwHotKeys_KbdHook.cpp2
-rw-r--r--plugins/MyDetails/src/frame.cpp4
-rw-r--r--plugins/NewAwaySysMod/src/ContactList.cpp2
-rw-r--r--plugins/NewAwaySysMod/src/Notification.cpp2
-rw-r--r--plugins/NewXstatusNotify/src/popup.cpp2
-rw-r--r--plugins/Popup/src/popup_wnd2.cpp2
-rw-r--r--plugins/QuickContacts/src/quickcontacts.cpp2
-rw-r--r--plugins/RecentContacts/src/RecentContacts.cpp2
-rw-r--r--plugins/Scriver/src/chat/window.cpp2
-rw-r--r--plugins/Scriver/src/msgdialog.cpp2
-rw-r--r--plugins/Scriver/src/msgwindow.cpp4
-rw-r--r--plugins/SeenPlugin/src/history.cpp2
-rw-r--r--plugins/StatusPlugins/StartupStatus/startupstatus.cpp6
-rw-r--r--plugins/TabSRMM/src/container.cpp11
-rw-r--r--plugins/TabSRMM/src/generic_msghandlers.cpp2
-rw-r--r--plugins/TooltipNotify/src/TooltipNotify.cpp4
-rw-r--r--plugins/TopToolBar/src/InternalButtons.cpp2
-rw-r--r--plugins/UserInfoEx/src/dlg_anniversarylist.cpp2
-rw-r--r--plugins/Weather/src/weather_mwin.cpp8
-rw-r--r--plugins/Weather/src/weather_popup.cpp6
-rw-r--r--plugins/WhenWasIt/src/dlg_handlers.cpp2
-rw-r--r--protocols/JabberG/src/jabber_chat.cpp2
-rw-r--r--protocols/JabberG/src/jabber_disco.cpp4
-rw-r--r--protocols/JabberG/src/jabber_frame.cpp2
-rwxr-xr-xprotocols/JabberG/src/jabber_proto.cpp2
-rw-r--r--src/core/stdfile/src/filerecvdlg.cpp2
-rw-r--r--src/core/stdfile/src/filesenddlg.cpp2
-rw-r--r--src/core/stdfile/src/filexferdlg.cpp2
-rw-r--r--src/core/stdmsg/src/msgdialog.cpp2
-rw-r--r--src/mir_app/src/Docking.cpp4
-rw-r--r--src/mir_app/src/clc.cpp4
-rw-r--r--src/mir_app/src/clc.h10
-rw-r--r--src/mir_app/src/clistcore.cpp5
-rw-r--r--src/mir_app/src/clistmod.cpp12
-rw-r--r--src/mir_app/src/clisttray.cpp4
-rw-r--r--src/mir_app/src/clui.cpp21
-rw-r--r--src/mir_app/src/keyboard.cpp22
-rw-r--r--src/mir_app/src/menu_clist.cpp61
-rw-r--r--src/mir_app/src/menu_tray.cpp8
-rw-r--r--src/mir_app/src/meta_services.cpp2
-rw-r--r--src/mir_app/src/mir_app.def3
-rw-r--r--src/mir_app/src/mir_app64.def3
72 files changed, 211 insertions, 239 deletions
diff --git a/bin10/lib/mir_app.lib b/bin10/lib/mir_app.lib
index 459248cdd1..a26b93b6f0 100644
--- a/bin10/lib/mir_app.lib
+++ b/bin10/lib/mir_app.lib
Binary files differ
diff --git a/bin10/lib/mir_app64.lib b/bin10/lib/mir_app64.lib
index 1c227d1a96..4a1b8196dd 100644
--- a/bin10/lib/mir_app64.lib
+++ b/bin10/lib/mir_app64.lib
Binary files differ
diff --git a/bin12/lib/mir_app.lib b/bin12/lib/mir_app.lib
index 459248cdd1..a26b93b6f0 100644
--- a/bin12/lib/mir_app.lib
+++ b/bin12/lib/mir_app.lib
Binary files differ
diff --git a/bin12/lib/mir_app64.lib b/bin12/lib/mir_app64.lib
index 1c227d1a96..4a1b8196dd 100644
--- a/bin12/lib/mir_app64.lib
+++ b/bin12/lib/mir_app64.lib
Binary files differ
diff --git a/bin14/lib/mir_app.lib b/bin14/lib/mir_app.lib
index 459248cdd1..a26b93b6f0 100644
--- a/bin14/lib/mir_app.lib
+++ b/bin14/lib/mir_app.lib
Binary files differ
diff --git a/bin14/lib/mir_app64.lib b/bin14/lib/mir_app64.lib
index 1c227d1a96..4a1b8196dd 100644
--- a/bin14/lib/mir_app64.lib
+++ b/bin14/lib/mir_app64.lib
Binary files differ
diff --git a/include/delphi/m_clistint.inc b/include/delphi/m_clistint.inc
index 3b40b71055..2568903f6c 100644
--- a/include/delphi/m_clistint.inc
+++ b/include/delphi/m_clistint.inc
@@ -392,7 +392,7 @@ type
(* clistmod.c *)
pfnIconFromStatusMode : function (szProto:PAnsiChar; status:int; hContact:TMCONTACT):int; cdecl;
- pfnShowHide : function (_para1:WPARAM; _para2:LPARAM):int; cdecl;
+ pfnShowHide : function :int; cdecl;
pfnGetStatusModeDescription : function (mode:int; flags:int) : PWideChar; cdecl;
(* clistsettings.c *)
@@ -431,11 +431,10 @@ type
(* docking.c *)
pfnDocking_ProcessWindowMessage : function (wParam:WPARAM; lParam:LPARAM):int; cdecl;
- (* keyboard.c *)
- pfnHotKeysRegister : function (hwnd:HWND):int; cdecl;
- pfnHotKeysUnregister : procedure (hwnd:HWND); cdecl;
- pfnHotKeysProcess : function (hwnd:HWND; wParam:WPARAM; lParam:LPARAM):int; cdecl;
- pfnHotkeysProcessMessage : function (wParam:WPARAM; lParam:LPARAM):int; cdecl;
+ blablabla1 : procedure; cdecl;
+ blablabla2 : procedure; cdecl;
+ blablabla3 : procedure; cdecl;
+ blablabla4 : procedure; cdecl;
(*************************************************************************************
* version 2 - events processing
diff --git a/include/m_clist.h b/include/m_clist.h
index 182682b359..ccd6820d49 100644
--- a/include/m_clist.h
+++ b/include/m_clist.h
@@ -44,11 +44,13 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
// wParam = new status, from statusmodes.h
// lParam = protocol name, NULL if for all protocols
// also sent due to a ms_clist_setstatusmode call
+
#define ME_CLIST_STATUSMODECHANGE "CList/StatusModeChange"
/////////////////////////////////////////////////////////////////////////////////////////
// force a change of status mode
// wParam = new status, from statusmodes.h
+
#define MS_CLIST_SETSTATUSMODE "CList/SetStatusMode"
/////////////////////////////////////////////////////////////////////////////////////////
@@ -57,37 +59,44 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
// returns the current status
// This is the status *as set by the user*, not any protocol-specific status
// All protocol modules will attempt to conform to this setting at all times
+
#define MS_CLIST_GETSTATUSMODE "CList/GetStatusMode"
/////////////////////////////////////////////////////////////////////////////////////////
// MAIN MENU
// adds a new element into main menu
+
EXTERN_C MIR_APP_DLL(HGENMENU) Menu_AddMainMenuItem(TMO_MenuItem *pmi);
// gets a handle to the main Miranda menu
// returns a HMENU. This need not to be freed since it's owned by clist
+
EXTERN_C MIR_APP_DLL(HMENU) Menu_GetMainMenu(void);
/////////////////////////////////////////////////////////////////////////////////////////
// the main menu is about to be built
// wParam = lParam = 0
+
#define ME_CLIST_PREBUILDMAINMENU "CList/PreBuildMainMenu"
/////////////////////////////////////////////////////////////////////////////////////////
// CONTACT MENU
// adds a new element into contact menu
+
EXTERN_C MIR_APP_DLL(HGENMENU) Menu_AddContactMenuItem(TMO_MenuItem *pmi, const char *pszProto = NULL);
// builds the context menu for a specific contact
// returns a HMENU identifying the menu. This should be DestroyMenu()ed when
// finished with.
+
EXTERN_C MIR_APP_DLL(HMENU) Menu_BuildContactMenu(MCONTACT hContact);
// the context menu for a contact is about to be built
// modules should use this to change menu items that are specific to the
// contact that has them
+
#define ME_CLIST_PREBUILDCONTACTMENU "CList/PreBuildContactMenu"
/////////////////////////////////////////////////////////////////////////////////////////
@@ -95,19 +104,23 @@ EXTERN_C MIR_APP_DLL(HMENU) Menu_BuildContactMenu(MCONTACT hContact);
// get a handle to the Miranda status menu
// returns a HMENU. This need not be freed since it's owned by clist
+
EXTERN_C MIR_APP_DLL(HMENU) Menu_GetStatusMenu(void);
// adds an item to a status menu
+
EXTERN_C MIR_APP_DLL(HGENMENU) Menu_AddStatusMenuItem(TMO_MenuItem *pmi, const char *pszProto = NULL);
// the status menu is about to be built
// wParam = lParam = 0
+
#define ME_CLIST_PREBUILDSTATUSMENU "CList/PreBuildStatusMenu"
/////////////////////////////////////////////////////////////////////////////////////////
// PROTOCOL MENU
// adds an item to status or main menu, according to the option
+
EXTERN_C MIR_APP_DLL(HGENMENU) Menu_AddProtoMenuItem(TMO_MenuItem *pmi, const char *pszProto = NULL);
/////////////////////////////////////////////////////////////////////////////////////////
@@ -121,13 +134,16 @@ struct GroupMenuParam
// builds the Group menu
// returns a HMENU identifying the menu.
+
EXTERN_C MIR_APP_DLL(HMENU) Menu_BuildGroupMenu(void);
// adds a new item to the Group menus
+
EXTERN_C MIR_APP_DLL(HGENMENU) Menu_AddGroupMenuItem(TMO_MenuItem *pmi, GroupMenuParam *gmp = NULL);
// the Group menu is about to be built
// wParam = lParam = 0
+
#define ME_CLIST_PREBUILDGROUPMENU "CList/PreBuildGroupMenu"
/////////////////////////////////////////////////////////////////////////////////////////
@@ -135,15 +151,18 @@ EXTERN_C MIR_APP_DLL(HGENMENU) Menu_AddGroupMenuItem(TMO_MenuItem *pmi, GroupMen
// builds the SubGroup menu
// returns a HMENU identifying the menu.
+
EXTERN_C MIR_APP_DLL(HMENU) Menu_BuildSubGroupMenu(struct ClcGroup *group);
// adds a new item to the SubGroup menus
// wParam=GroupMenuParam*, params to call when exec menuitem
// lParam=(LPARAM)(TMO_MenuItem*)&mi
+
EXTERN_C MIR_APP_DLL(HGENMENU) Menu_AddSubGroupMenuItem(TMO_MenuItem *pmi, GroupMenuParam *gmp = NULL);
// the SubGroup menu is about to be built
// wParam = lParam = 0
+
#define ME_CLIST_PREBUILDSUBGROUPMENU "CList/PreBuildSubGroupMenu"
/////////////////////////////////////////////////////////////////////////////////////////
@@ -242,7 +261,9 @@ typedef struct {
// wParam = lParam = 0
// returns a HIMAGELIST
// the members of this image list are opaque, and you should trust what you are given
+
#define MS_CLIST_GETICONSIMAGELIST "CList/GetIconsImageList"
+
#define IMAGE_GROUPOPEN 11
#define IMAGE_GROUPSHUT 12
@@ -251,24 +272,21 @@ typedef struct {
// wParam = (MCONTACT)hContact
// lParam = iconId
// iconId is an offset into the clist's imagelist. See clist/geticonsimagelist
+
#define ME_CLIST_CONTACTICONCHANGED "CList/ContactIconChanged"
/////////////////////////////////////////////////////////////////////////////////////////
-//processes a menu selection from a menu
-//wParam = MAKEWPARAM(LOWORD(wParam from WM_COMMAND), flags)
-//lParam = (LPARAM)(MCONTACT)hContact
-//returns TRUE if it processed the command, FALSE otherwise
-//hContact is the currently selected contact. It it not used if this is a main
-//menu command. If this is NULL and the command is a contact menu one, the
-//command is ignored
-
-#define CLISTMENUIDMIN 0x4000 // reserved range for clist menu ids
-#define CLISTMENUIDMAX 0x7fff
-
+// processes a menu selection from a menu
+// wParam = MAKEWPARAM(LOWORD(wParam from WM_COMMAND), flags)
+// lParam = (LPARAM)(MCONTACT)hContact
+// returns TRUE if it processed the command, FALSE otherwise
+// hContact is the currently selected contact. It it not used if this is a main
+// menu command. If this is NULL and the command is a contact menu one, the
+// command is ignored
/////////////////////////////////////////////////////////////////////////////////////////
// Due to it is generic practice to handle menu command via WM_COMMAND
-// window message handle and practice to process it via calling service
-// in form: CallService(MS_CLIST_MENUPROCESSCOMMAND, MAKEWPARAM(LOWORD(wParam), MPCF_CONTACTMENU), (LPARAM) hContact))
+// window message handle and practice to process it via calling
+// Clist_MenuProcessCommand(LOWORD(wParam), MPCF_CONTACTMENU, hContact);
// to ensure that WM_COMMAND was really from clist menu not from other menu
// it is reserved range of menu ids from CLISTMENUIDMIN to CLISTMENUIDMAX
// the menu items with ids outside from such range will not be processed by service.
@@ -276,12 +294,15 @@ typedef struct {
// please be sure that you will not call service for non-clist menu items.
// The simplest way is to ensure that your menus are not use item ids from such range.
// Otherwise, you HAVE TO distinguish WM_COMMAND from clist menus and from youê internal menu and
-// DO NOT call MS_CLIST_MENUPROCESSCOMMAND for non clist menus.
+// DO NOT call Clist_MenuProcessCommand for non clist menus.
+
+#define CLISTMENUIDMIN 0x4000 // reserved range for clist menu ids
+#define CLISTMENUIDMAX 0x7fff
#define MPCF_CONTACTMENU 1 //test commands from a contact menu
#define MPCF_MAINMENU 2 //test commands from the main menu
-#define MS_CLIST_MENUPROCESSCOMMAND "CList/MenuProcessCommand"
+EXTERN_C MIR_APP_DLL(BOOL) Clist_MenuProcessCommand(int menu_id, int flags, MCONTACT hContact);
/////////////////////////////////////////////////////////////////////////////////////////
// processes a menu hotkey
@@ -289,60 +310,44 @@ typedef struct {
// lParam = MPCF_ flags
// returns TRUE if it processed the command, FALSE otherwise
// this should be called in WM_KEYDOWN
-#define MS_CLIST_MENUPROCESSHOTKEY "CList/MenuProcessHotkey"
-/////////////////////////////////////////////////////////////////////////////////////////
-// process all the messages required for docking
-// wParam = (WPARAM)(MSG*)&msg
-// lParam = (LPARAM)(LRESULT*)&lResult
-// returns TRUE if the message should not be processed further, FALSE otherwise
-// only msg.hwnd, msg.message, msg.wParam and msg.lParam are used
-// your wndproc should return lResult if and only if TRUE is returned
-#define MS_CLIST_DOCKINGPROCESSMESSAGE "CList/DockingProcessMessage"
+EXTERN_C MIR_APP_DLL(BOOL) Clist_MenuProcessHotkey(unsigned hotkey);
/////////////////////////////////////////////////////////////////////////////////////////
// determines whether the contact list is docked
// wParam = lParam = 0
// returns nonzero if the contact list is docked, of 0 if it is not
-#define MS_CLIST_DOCKINGISDOCKED "CList/DockingIsDocked"
-/////////////////////////////////////////////////////////////////////////////////////////
-// process all the messages required for hotkeys
-// wParam = (WPARAM)(MSG*)&msg
-// lParam = (LPARAM)(LRESULT*)&lResult
-// returns TRUE if the message should not be processed further, FALSE otherwise
-// only msg.hwnd, msg.message, msg.wParam and msg.lParam are used
-// your wndproc should return lResult if and only if TRUE is returned
-#define MS_CLIST_HOTKEYSPROCESSMESSAGE "CList/HotkeysProcessMessage"
+EXTERN_C MIR_APP_DLL(BOOL) Clist_IsDocked(void);
/////////////////////////////////////////////////////////////////////////////////////////
-// toggles the show/hide status of the contact list
-// wParam = lParam = 0
-// returns 0 on success, nonzero on failure
-#define MS_CLIST_SHOWHIDE "CList/ShowHide"
-
+// Clist-related buttons management
/////////////////////////////////////////////////////////////////////////////////////////
// toggles the use groups mode of the contact list
// wParam = lParam = 0
// returns new groups mode
+
#define MS_CLIST_TOGGLEGROUPS "CList/ToggleGroups"
/////////////////////////////////////////////////////////////////////////////////////////
// toggles the empty groups display mode
// wParam = lParam = 0
// returns new empty groups mode
+
#define MS_CLIST_TOGGLEEMPTYGROUPS "CList/ToggleEmptyGroups"
/////////////////////////////////////////////////////////////////////////////////////////
// toggles the hidden users display mode
// wParam = lParam = 0
// returns new hidden users mode
+
#define MS_CLIST_TOGGLEHIDEOFFLINE "CList/ToggleHideOffline"
/////////////////////////////////////////////////////////////////////////////////////////
// toggles the hidden users display mode
// wParam = lParam = 0
// returns new hidden users mode
+
#define MS_CLIST_TOGGLEHIDEOFFLINEROOT "CList/ToggleHideOfflineRoot"
/////////////////////////////////////////////////////////////////////////////////////////
@@ -451,6 +456,7 @@ EXTERN_C MIR_APP_DLL(void) Clist_EndRebuild(void);
// wParam = (MCONTACT)hContact
// lParam = 0
// returns 0 on success, nonzero on failure
+
#define MS_CLIST_CONTACTDOUBLECLICKED "CList/ContactDoubleClicked"
/////////////////////////////////////////////////////////////////////////////////////////
@@ -459,6 +465,7 @@ EXTERN_C MIR_APP_DLL(void) Clist_EndRebuild(void);
// lParam = (LPARAM)(char**)ppFiles
// returns 0 on success, nonzero on failure
// ppFiles is an array of fully qualified filenames, ending with a NULL.
+
#define MS_CLIST_CONTACTFILESDROPPED "CList/ContactFilesDropped"
/////////////////////////////////////////////////////////////////////////////////////////
@@ -467,6 +474,7 @@ EXTERN_C MIR_APP_DLL(void) Clist_EndRebuild(void);
// lParam = (LPARAM)(MGROUP)hGroup
// returns 0 on success, nonzero on failure
// use hGroup = NULL to put the contact in no group
+
#define MS_CLIST_CONTACTCHANGEGROUP "CList/ContactChangeGroup"
/////////////////////////////////////////////////////////////////////////////////////////
@@ -476,6 +484,7 @@ EXTERN_C MIR_APP_DLL(void) Clist_EndRebuild(void);
// returns 0 if hContact1 is the same as hContact2
// returns +1 if hContact2 should be displayed after hContact1
// returns -1 if hContact1 should be displayed after hContact2
+
#define MS_CLIST_CONTACTSCOMPARE "CList/ContactsCompare"
/////////////////////////////////////////////////////////////////////////////////////////
@@ -485,6 +494,7 @@ EXTERN_C MIR_APP_DLL(void) Clist_EndRebuild(void);
// wParam = (MCONTACT)hContact
// lParam = MAKELPARAM(screenX, screenY)
// return nonzero to make the cursor a 'can drop here', or zero for 'no'
+
#define ME_CLUI_CONTACTDRAGGING "CLUI/ContactDragging"
/////////////////////////////////////////////////////////////////////////////////////////
@@ -492,6 +502,7 @@ EXTERN_C MIR_APP_DLL(void) Clist_EndRebuild(void);
// wParam = (MCONTACT)hContact
// lParam = MAKELPARAM(screenX, screenY)
// return nonzero if your hook processed this, so no other hooks get it
+
#define ME_CLUI_CONTACTDROPPED "CLUI/ContactDropped"
/////////////////////////////////////////////////////////////////////////////////////////
@@ -499,6 +510,7 @@ EXTERN_C MIR_APP_DLL(void) Clist_EndRebuild(void);
// wParam = (MCONTACT)hContact
// lParam = 0
// always returns zero
+
#define ME_CLUI_CONTACTDRAGSTOP "CLUI/ContactDragStop"
/////////////////////////////////////////////////////////////////////////////////////////
@@ -518,7 +530,6 @@ EXTERN_C MIR_APP_DLL(void) Clist_EndRebuild(void);
#define NIIF_NOSOUND 0x00000010
#define NIIF_INTERN_UNICODE 0x00000100
-
typedef struct {
int cbSize; // sizeof(MIRANDASYSTRAY)
char *szProto; // protocol to show under (may have no effect)
diff --git a/include/m_clistint.h b/include/m_clistint.h
index 749188c444..daa37cc59e 100644
--- a/include/m_clistint.h
+++ b/include/m_clistint.h
@@ -359,7 +359,7 @@ struct CLIST_INTERFACE
/* clistmod.c */
int (*pfnIconFromStatusMode)(const char *szProto, int status, MCONTACT hContact);
- int (*pfnShowHide)(WPARAM, LPARAM);
+ int (*pfnShowHide)(void);
#define GSMDF_UNTRANSLATED 4 // don't tranlate the result
wchar_t* (*pfnGetStatusModeDescription)(int mode, int flags);
@@ -403,11 +403,10 @@ struct CLIST_INTERFACE
/* docking.c */
int (*pfnDocking_ProcessWindowMessage)(WPARAM wParam, LPARAM lParam);
- /* keyboard.c */
- int (*pfnHotKeysRegister)(HWND hwnd);
- void (*pfnHotKeysUnregister)(HWND hwnd);
- int (*pfnHotKeysProcess)(HWND hwnd, WPARAM wParam, LPARAM lParam);
- int (*pfnHotkeysProcessMessage)(WPARAM wParam, LPARAM lParam);
+ int (*blablabla1)();
+ int (*blablabla2)();
+ int (*blablabla3)();
+ int (*blablabla4)();
/*************************************************************************************
* version 2 - events processing
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;
diff --git a/protocols/JabberG/src/jabber_chat.cpp b/protocols/JabberG/src/jabber_chat.cpp
index d5599c001b..a3c53cd3ce 100644
--- a/protocols/JabberG/src/jabber_chat.cpp
+++ b/protocols/JabberG/src/jabber_chat.cpp
@@ -1003,7 +1003,7 @@ static void sttNickListHook(CJabberProto *ppro, JABBER_LIST_ITEM *item, GCHOOK*
if ((gch->dwData >= CLISTMENUIDMIN) && (gch->dwData <= CLISTMENUIDMAX)) {
if (him->m_tszRealJid && *him->m_tszRealJid)
if (MCONTACT hContact = ppro->HContactFromJID(him->m_tszRealJid))
- CallService(MS_CLIST_MENUPROCESSCOMMAND, MAKEWPARAM(gch->dwData, MPCF_CONTACTMENU), hContact);
+ Clist_MenuProcessCommand(gch->dwData, MPCF_CONTACTMENU, hContact);
return;
}
diff --git a/protocols/JabberG/src/jabber_disco.cpp b/protocols/JabberG/src/jabber_disco.cpp
index 6fefdf6ca2..f1f38a2791 100644
--- a/protocols/JabberG/src/jabber_disco.cpp
+++ b/protocols/JabberG/src/jabber_disco.cpp
@@ -1401,7 +1401,7 @@ void CJabberProto::ServiceDiscoveryShowMenu(CJabberSDNode *pNode, HTREELISTITEM
HMENU hContactMenu = Menu_BuildContactMenu(hContact);
GetCursorPos(&pt);
res = TrackPopupMenu(hContactMenu, TPM_RETURNCMD, pt.x, pt.y, 0, m_pDlgServiceDiscovery->GetHwnd(), NULL);
- CallService(MS_CLIST_MENUPROCESSCOMMAND, MAKEWPARAM(res, MPCF_CONTACTMENU), hContact);
+ Clist_MenuProcessCommand(res, MPCF_CONTACTMENU, hContact);
}
break;
@@ -1447,7 +1447,7 @@ void CJabberProto::ServiceDiscoveryShowMenu(CJabberSDNode *pNode, HTREELISTITEM
if ((res >= CLISTMENUIDMIN) && (res <= CLISTMENUIDMAX)) {
MCONTACT hContact = HContactFromJID(pNode->GetJid());
if (hContact)
- CallService(MS_CLIST_MENUPROCESSCOMMAND, MAKEWPARAM(res, MPCF_CONTACTMENU), hContact);
+ Clist_MenuProcessCommand(res, MPCF_CONTACTMENU, hContact);
}
break;
}
diff --git a/protocols/JabberG/src/jabber_frame.cpp b/protocols/JabberG/src/jabber_frame.cpp
index d9e880c771..be116dc5ae 100644
--- a/protocols/JabberG/src/jabber_frame.cpp
+++ b/protocols/JabberG/src/jabber_frame.cpp
@@ -183,7 +183,7 @@ LRESULT CJabberInfoFrame::WndProc(UINT msg, WPARAM wParam, LPARAM lParam)
MapWindowPoints(m_hwnd, NULL, &pt, 1);
HMENU hMenu = (HMENU)CallService(MS_CLIST_MENUBUILDFRAMECONTEXT, m_frameId, 0);
int res = TrackPopupMenu(hMenu, TPM_RETURNCMD, pt.x, pt.y, 0, pcli->hwndContactList, NULL);
- CallService(MS_CLIST_MENUPROCESSCOMMAND, MAKEWPARAM(res, 0), m_frameId);
+ Clist_MenuProcessCommand(res, 0, m_frameId);
return 0;
}
diff --git a/protocols/JabberG/src/jabber_proto.cpp b/protocols/JabberG/src/jabber_proto.cpp
index f66f63f151..4e66179a64 100755
--- a/protocols/JabberG/src/jabber_proto.cpp
+++ b/protocols/JabberG/src/jabber_proto.cpp
@@ -1279,7 +1279,7 @@ void CJabberProto::InfoFrame_OnTransport(CJabberInfoFrame_Event *evt)
POINT pt;
GetCursorPos(&pt);
int res = TrackPopupMenu(hContactMenu, TPM_RETURNCMD, pt.x, pt.y, 0, pcli->hwndContactList, NULL);
- CallService(MS_CLIST_MENUPROCESSCOMMAND, MAKEWPARAM(res, MPCF_CONTACTMENU), hContact);
+ Clist_MenuProcessCommand(res, MPCF_CONTACTMENU, hContact);
}
}
diff --git a/src/core/stdfile/src/filerecvdlg.cpp b/src/core/stdfile/src/filerecvdlg.cpp
index 660b717bae..1d155b1544 100644
--- a/src/core/stdfile/src/filerecvdlg.cpp
+++ b/src/core/stdfile/src/filerecvdlg.cpp
@@ -286,7 +286,7 @@ INT_PTR CALLBACK DlgProcRecvFile(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM l
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;
switch (LOWORD(wParam)) {
diff --git a/src/core/stdfile/src/filesenddlg.cpp b/src/core/stdfile/src/filesenddlg.cpp
index 3148d36c59..ccfc68af3f 100644
--- a/src/core/stdfile/src/filesenddlg.cpp
+++ b/src/core/stdfile/src/filesenddlg.cpp
@@ -281,7 +281,7 @@ INT_PTR CALLBACK DlgProcSendFile(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM l
break;
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;
switch (LOWORD(wParam)) {
diff --git a/src/core/stdfile/src/filexferdlg.cpp b/src/core/stdfile/src/filexferdlg.cpp
index 810587b75e..cfb958c689 100644
--- a/src/core/stdfile/src/filexferdlg.cpp
+++ b/src/core/stdfile/src/filexferdlg.cpp
@@ -344,7 +344,7 @@ INT_PTR CALLBACK DlgProcFileTransfer(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR
if (!dat)
break;
- if (CallService(MS_CLIST_MENUPROCESSCOMMAND, MAKEWPARAM(LOWORD(wParam), MPCF_CONTACTMENU), (LPARAM)dat->hContact))
+ if (Clist_MenuProcessCommand(LOWORD(wParam), MPCF_CONTACTMENU, dat->hContact))
break;
switch (LOWORD(wParam)) {
diff --git a/src/core/stdmsg/src/msgdialog.cpp b/src/core/stdmsg/src/msgdialog.cpp
index 2c335fec1a..2286d0c5a1 100644
--- a/src/core/stdmsg/src/msgdialog.cpp
+++ b/src/core/stdmsg/src/msgdialog.cpp
@@ -1334,7 +1334,7 @@ INT_PTR CALLBACK DlgProcMessage(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM l
break;
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/src/mir_app/src/Docking.cpp b/src/mir_app/src/Docking.cpp
index e4e095662c..8085cfa075 100644
--- a/src/mir_app/src/Docking.cpp
+++ b/src/mir_app/src/Docking.cpp
@@ -32,7 +32,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#define DOCKED_LEFT 1
#define DOCKED_RIGHT 2
-static char docked;
+static int docked;
static POINT dockPos;
static void Docking_GetMonitorRectFromPoint(LPPOINT pt, LPRECT rc)
@@ -127,7 +127,7 @@ static bool Docking_IsWindowVisible(HWND hwnd)
return style & WS_VISIBLE && !(style & WS_MINIMIZE);
}
-INT_PTR Docking_IsDocked(WPARAM, LPARAM)
+MIR_APP_DLL(BOOL) Clist_IsDocked()
{
return docked;
}
diff --git a/src/mir_app/src/clc.cpp b/src/mir_app/src/clc.cpp
index 4bbccb844b..872a099390 100644
--- a/src/mir_app/src/clc.cpp
+++ b/src/mir_app/src/clc.cpp
@@ -678,7 +678,7 @@ LRESULT CALLBACK fnContactListControlWndProc(HWND hwnd, UINT uMsg, WPARAM wParam
cli.pfnHideInfoTip(hwnd, dat);
KillTimer(hwnd, TIMERID_INFOTIP);
KillTimer(hwnd, TIMERID_RENAME);
- if (!CallService(MS_CLIST_MENUPROCESSHOTKEY, wParam, MPCF_CONTACTMENU)) {
+ if (!Clist_MenuProcessHotkey(wParam)) {
RECT clRect;
GetClientRect(hwnd, &clRect);
int pageSize = clRect.bottom / dat->rowHeight;
@@ -1236,7 +1236,7 @@ LRESULT CALLBACK fnContactListControlWndProc(HWND hwnd, UINT uMsg, WPARAM wParam
break;
if (contact->type == CLCIT_CONTACT)
- if (CallService(MS_CLIST_MENUPROCESSCOMMAND, MAKEWPARAM(LOWORD(wParam), MPCF_CONTACTMENU), contact->hContact))
+ if (Clist_MenuProcessCommand(LOWORD(wParam), MPCF_CONTACTMENU, contact->hContact))
break;
if (contact->type == CLCIT_GROUP) {
diff --git a/src/mir_app/src/clc.h b/src/mir_app/src/clc.h
index 3783f8ba2f..ab06801d8e 100644
--- a/src/mir_app/src/clc.h
+++ b/src/mir_app/src/clc.h
@@ -119,8 +119,6 @@ int fnGetAccountIndexByPos(int Pos);
int fnGetProtoIndexByPos(PROTOCOLDESCRIPTOR **proto, int protoCnt, int Pos);
void RebuildMenuOrder(void);
-INT_PTR MenuProcessCommand(WPARAM wParam, LPARAM lParam);
-
/* clistsettings.c */
wchar_t* fnGetContactDisplayName(MCONTACT hContact, int mode);
void fnGetDefaultFontSetting(int i, LOGFONT* lf, COLORREF * colour);
@@ -149,7 +147,7 @@ int fnRemoveEvent(MCONTACT hContact, MEVENT dbEvent);
/* clistmod.c */
int fnGetContactIcon(MCONTACT hContact);
int fnIconFromStatusMode(const char *szProto, int status, MCONTACT hContact);
-int fnShowHide(WPARAM wParam, LPARAM lParam);
+int fnShowHide(void);
HICON fnGetIconFromStatusMode(MCONTACT hContact, const char *szProto, int status);
wchar_t* fnGetStatusModeDescription(int wParam, int lParam);
int fnGetWindowVisibleState(HWND hWnd, int iStepX, int iStepY);
@@ -191,9 +189,3 @@ int fnSetHideOffline(int iValue);
/* docking.c */
int fnDocking_ProcessWindowMessage(WPARAM wParam, LPARAM lParam);
-
-/* keyboard.c */
-int fnHotKeysRegister(HWND hwnd);
-void fnHotKeysUnregister(HWND hwnd);
-int fnHotKeysProcess(HWND hwnd, WPARAM wParam, LPARAM lParam);
-int fnHotkeysProcessMessage(WPARAM wParam, LPARAM lParam);
diff --git a/src/mir_app/src/clistcore.cpp b/src/mir_app/src/clistcore.cpp
index ed68859386..0f232a662e 100644
--- a/src/mir_app/src/clistcore.cpp
+++ b/src/mir_app/src/clistcore.cpp
@@ -194,11 +194,6 @@ static INT_PTR srvRetrieveInterface(WPARAM, LPARAM)
cli.pfnShowHide = fnShowHide;
cli.pfnGetStatusModeDescription = fnGetStatusModeDescription;
- cli.pfnHotKeysRegister = fnHotKeysRegister;
- cli.pfnHotKeysUnregister = fnHotKeysUnregister;
- cli.pfnHotKeysProcess = fnHotKeysProcess;
- cli.pfnHotkeysProcessMessage = fnHotkeysProcessMessage;
-
cli.pfnGetProtocolVisibility = fnGetProtocolVisibility;
cli.pfnGetProtoIndexByPos = fnGetProtoIndexByPos;
cli.pfnReloadProtoMenus = fnReloadProtoMenus;
diff --git a/src/mir_app/src/clistmod.cpp b/src/mir_app/src/clistmod.cpp
index 9b39a4f170..edba951768 100644
--- a/src/mir_app/src/clistmod.cpp
+++ b/src/mir_app/src/clistmod.cpp
@@ -291,7 +291,7 @@ int fnGetWindowVisibleState(HWND hWnd, int iStepX, int iStepY)
if (IsIconic(hWnd) || !IsWindowVisible(hWnd))
return GWVS_HIDDEN;
- if (CallService(MS_CLIST_DOCKINGISDOCKED, 0, 0))
+ if (Clist_IsDocked())
return GWVS_VISIBLE;
GetWindowRect(hWnd, &rcWin);
@@ -333,7 +333,7 @@ int fnGetWindowVisibleState(HWND hWnd, int iStepX, int iStepY)
return GWVS_PARTIALLY_COVERED;
}
-int fnShowHide(WPARAM, LPARAM)
+int fnShowHide()
{
BOOL bShow = FALSE;
@@ -411,10 +411,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 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); }
-
int LoadContactListModule2(void)
{
HookEvent(ME_SYSTEM_MODULESLOADED, ContactListModulesLoaded);
@@ -431,10 +427,6 @@ int LoadContactListModule2(void)
CreateServiceFunction(MS_CLIST_CONTACTFILESDROPPED, ContactFilesDropped);
CreateServiceFunction(MS_CLIST_CONTACTSCOMPARE, CompareContacts);
CreateServiceFunction(MS_CLIST_CONTACTCHANGEGROUP, ContactChangeGroup);
- CreateServiceFunction(MS_CLIST_SHOWHIDE, ShowHideStub);
- CreateServiceFunction(MS_CLIST_DOCKINGPROCESSMESSAGE, Docking_ProcessWindowMessageStub);
- CreateServiceFunction(MS_CLIST_DOCKINGISDOCKED, Docking_IsDocked);
- CreateServiceFunction(MS_CLIST_HOTKEYSPROCESSMESSAGE, HotkeysProcessMessageStub);
InitCListEvents();
InitGroupServices();
diff --git a/src/mir_app/src/clisttray.cpp b/src/mir_app/src/clisttray.cpp
index 5254bb9372..1b58b6647e 100644
--- a/src/mir_app/src/clisttray.cpp
+++ b/src/mir_app/src/clisttray.cpp
@@ -675,7 +675,7 @@ INT_PTR fnTrayIconProcessMessage(WPARAM wParam, LPARAM lParam)
}
if (msg->lParam == WM_MBUTTONUP)
- cli.pfnShowHide(0, 0);
+ cli.pfnShowHide();
else if (msg->lParam == (db_get_b(NULL, "CList", "Tray1Click", SETTING_TRAY1CLICK_DEFAULT) ? WM_LBUTTONUP : WM_LBUTTONDBLCLK)) {
if ((GetAsyncKeyState(VK_CONTROL) & 0x8000)) {
POINT pt;
@@ -710,7 +710,7 @@ INT_PTR fnTrayIconProcessMessage(WPARAM wParam, LPARAM lParam)
TrackPopupMenu(hMenu, TPM_TOPALIGN | TPM_LEFTALIGN | TPM_LEFTBUTTON, pt.x, pt.y, 0, msg->hwnd, NULL);
}
else if (cli.pfnEventsProcessTrayDoubleClick(msg->wParam))
- cli.pfnShowHide(0, 0);
+ cli.pfnShowHide();
}
else if (msg->lParam == WM_RBUTTONUP) {
HMENU hMenu = Menu_BuildTrayMenu();
diff --git a/src/mir_app/src/clui.cpp b/src/mir_app/src/clui.cpp
index 8f6d32b2e7..6c474e04cd 100644
--- a/src/mir_app/src/clui.cpp
+++ b/src/mir_app/src/clui.cpp
@@ -231,8 +231,6 @@ LRESULT CALLBACK ContactListWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM l
return result;
if (cli.pfnTrayIconProcessMessage((WPARAM)&m, (LPARAM)&result))
return result;
- if (cli.pfnHotkeysProcessMessage((WPARAM)&m, (LPARAM)&result))
- return result;
return cli.pfnContactListWndProc(hwnd, msg, wParam, lParam);
}
@@ -534,7 +532,7 @@ LRESULT CALLBACK fnContactListWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM
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);
@@ -684,7 +682,7 @@ LRESULT CALLBACK fnContactListWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM
return DefWindowProc(hwnd, msg, wParam, lParam);
case WM_COMMAND:
- if (CallService(MS_CLIST_MENUPROCESSCOMMAND, MAKEWPARAM(LOWORD(wParam), MPCF_MAINMENU), (LPARAM)(HANDLE)NULL))
+ if (Clist_MenuProcessCommand(LOWORD(wParam), MPCF_MAINMENU, 0))
break;
switch (LOWORD(wParam)) {
@@ -695,7 +693,7 @@ LRESULT CALLBACK fnContactListWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM
break;
case ID_TRAY_HIDE:
- CallService(MS_CLIST_SHOWHIDE, 0, 0);
+ cli.pfnShowHide();
break;
case POPUP_NEWGROUP:
@@ -720,13 +718,13 @@ LRESULT CALLBACK fnContactListWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM
break;
case POPUP_HIDEMIRANDA:
- CallService(MS_CLIST_SHOWHIDE, 0, 0);
+ cli.pfnShowHide();
break;
}
return FALSE;
case WM_KEYDOWN:
- CallService(MS_CLIST_MENUPROCESSHOTKEY, wParam, MPCF_MAINMENU | MPCF_CONTACTMENU);
+ Clist_MenuProcessHotkey(wParam);
break;
case WM_GETMINMAXINFO:
@@ -736,8 +734,7 @@ LRESULT CALLBACK fnContactListWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM
return 0;
case WM_SETTINGCHANGE:
- if (wParam == SPI_SETWORKAREA && (GetWindowLongPtr(hwnd, GWL_STYLE) & (WS_VISIBLE | WS_MINIMIZE)) == WS_VISIBLE &&
- !CallService(MS_CLIST_DOCKINGISDOCKED, 0, 0)) {
+ if (wParam == SPI_SETWORKAREA && (GetWindowLongPtr(hwnd, GWL_STYLE) & (WS_VISIBLE | WS_MINIMIZE)) == WS_VISIBLE && !Clist_IsDocked()) {
RECT rc;
GetWindowRect(hwnd, &rc);
if (Utils_AssertInsideScreen(&rc) == 1)
@@ -792,7 +789,7 @@ LRESULT CALLBACK fnContactListWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM
return FALSE;
case NM_KEYDOWN:
- return CallService(MS_CLIST_MENUPROCESSHOTKEY, ((NMKEY*)lParam)->nVKey, MPCF_MAINMENU | MPCF_CONTACTMENU);
+ return Clist_MenuProcessHotkey(((NMKEY*)lParam)->nVKey);
case CLN_LISTSIZECHANGE:
{
@@ -801,7 +798,7 @@ LRESULT CALLBACK fnContactListWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM
if (!db_get_b(NULL, "CLUI", "AutoSize", 0))
break;
- if (CallService(MS_CLIST_DOCKINGISDOCKED, 0, 0))
+ if (Clist_IsDocked())
break;
maxHeight = db_get_b(NULL, "CLUI", "MaxSizeHeight", 75);
GetWindowRect(hwnd, &rcWindow);
@@ -1025,7 +1022,7 @@ LRESULT CALLBACK fnContactListWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM
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);
diff --git a/src/mir_app/src/keyboard.cpp b/src/mir_app/src/keyboard.cpp
index fbda9d07bf..0a501b7f63 100644
--- a/src/mir_app/src/keyboard.cpp
+++ b/src/mir_app/src/keyboard.cpp
@@ -28,7 +28,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
static INT_PTR hkHideShow(WPARAM, LPARAM)
{
- cli.pfnShowHide(0, 0);
+ cli.pfnShowHide();
return 0;
}
@@ -90,23 +90,3 @@ int InitClistHotKeys(void)
Hotkey_Register(&shk);
return 0;
}
-
-
-int fnHotKeysRegister(HWND)
-{
- return 0;
-}
-
-void fnHotKeysUnregister(HWND)
-{
-}
-
-int fnHotKeysProcess(HWND, WPARAM, LPARAM)
-{
- return TRUE;
-}
-
-int fnHotkeysProcessMessage(WPARAM, LPARAM)
-{
- return FALSE;
-}
diff --git a/src/mir_app/src/menu_clist.cpp b/src/mir_app/src/menu_clist.cpp
index 524e19b75b..0c8b519402 100644
--- a/src/mir_app/src/menu_clist.cpp
+++ b/src/mir_app/src/menu_clist.cpp
@@ -642,32 +642,45 @@ INT_PTR FreeOwnerDataStatusMenu(WPARAM, LPARAM lParam)
}
/////////////////////////////////////////////////////////////////////////////////////////
-// Other menu functions
+// Global menu functions
-INT_PTR MenuProcessCommand(WPARAM wParam, LPARAM lParam)
+MIR_APP_DLL(BOOL) Clist_MenuProcessCommand(int menu_id, int flags, MCONTACT hContact)
{
- WORD cmd = LOWORD(wParam);
-
- if (HIWORD(wParam) & MPCF_MAINMENU) {
- int hst = LOWORD(wParam);
- if (hst >= ID_STATUS_OFFLINE && hst <= ID_STATUS_OUTTOLUNCH) {
- int pos = statustopos(hst);
+ if (flags & MPCF_MAINMENU) {
+ if (menu_id >= ID_STATUS_OFFLINE && menu_id <= ID_STATUS_OUTTOLUNCH) {
+ int pos = statustopos(menu_id);
if (pos != -1 && hStatusMainMenuHandles != NULL)
- return Menu_ProcessCommand(hStatusMainMenuHandles[pos], lParam);
+ return Menu_ProcessCommand(hStatusMainMenuHandles[pos], hContact);
}
}
- if (!(cmd >= CLISTMENUIDMIN && cmd <= CLISTMENUIDMAX))
- return 0; // DO NOT process ids outside from clist menu id range v0.7.0.27+
+ if (!(menu_id >= CLISTMENUIDMIN && menu_id <= CLISTMENUIDMAX))
+ return false; // DO NOT process ids outside from clist menu id range v0.7.0.27+
// process old menu sys
- if (HIWORD(wParam) & MPCF_CONTACTMENU)
- return MO_ProcessCommandBySubMenuIdent(hContactMenuObject, cmd, lParam);
+ if (flags & MPCF_CONTACTMENU)
+ return MO_ProcessCommandBySubMenuIdent(hContactMenuObject, menu_id, hContact);
// unknown old menu
- return Menu_ProcessCommandById(cmd, lParam);
+ return Menu_ProcessCommandById(menu_id, hContact);
}
+MIR_APP_DLL(BOOL) Clist_MenuProcessHotkey(unsigned vKey)
+{
+ prochotkey = true;
+
+ bool res =
+ Menu_ProcessHotKey(hStatusMenuObject, vKey) ||
+ Menu_ProcessHotKey(hMainMenuObject, vKey);
+
+ prochotkey = false;
+
+ return res;
+}
+
+/////////////////////////////////////////////////////////////////////////////////////////
+// Other menu functions
+
BOOL FindMenuHanleByGlobalID(HMENU hMenu, TMO_IntMenuItem *id, MenuItemData* itdat)
{
if (!itdat)
@@ -701,22 +714,9 @@ BOOL FindMenuHanleByGlobalID(HMENU hMenu, TMO_IntMenuItem *id, MenuItemData* itd
return FALSE;
}
-static INT_PTR MenuProcessHotkey(WPARAM vKey, LPARAM)
-{
- prochotkey = true;
-
- bool res =
- Menu_ProcessHotKey(hStatusMenuObject, vKey) ||
- Menu_ProcessHotKey(hMainMenuObject, vKey);
-
- prochotkey = false;
-
- return res;
-}
-
static int MenuIconsChanged(WPARAM, LPARAM)
{
- //just rebuild menu
+ // just rebuild menu
RebuildMenuOrder();
cli.pfnCluiProtocolStatusChanged(0, 0);
return 0;
@@ -725,7 +725,7 @@ static int MenuIconsChanged(WPARAM, LPARAM)
static INT_PTR SetStatusMode(WPARAM wParam, LPARAM)
{
prochotkey = true;
- MenuProcessCommand(MAKEWPARAM(LOWORD(wParam), MPCF_MAINMENU), 0);
+ Clist_MenuProcessCommand(LOWORD(wParam), MPCF_MAINMENU, 0);
prochotkey = false;
return 0;
}
@@ -1104,9 +1104,6 @@ void InitCustomMenus(void)
CreateServiceFunction(MS_CLIST_SETSTATUSMODE, SetStatusMode);
- CreateServiceFunction(MS_CLIST_MENUPROCESSCOMMAND, MenuProcessCommand);
- CreateServiceFunction(MS_CLIST_MENUPROCESSHOTKEY, MenuProcessHotkey);
-
hPreBuildContactMenuEvent = CreateHookableEvent(ME_CLIST_PREBUILDCONTACTMENU);
hPreBuildMainMenuEvent = CreateHookableEvent(ME_CLIST_PREBUILDMAINMENU);
cli.hPreBuildStatusMenuEvent = CreateHookableEvent(ME_CLIST_PREBUILDSTATUSMENU);
diff --git a/src/mir_app/src/menu_tray.cpp b/src/mir_app/src/menu_tray.cpp
index 6fa492ba65..2000a51c3c 100644
--- a/src/mir_app/src/menu_tray.cpp
+++ b/src/mir_app/src/menu_tray.cpp
@@ -96,6 +96,11 @@ static INT_PTR TrayMenuOnAddService(WPARAM wParam, LPARAM lParam)
return TRUE;
}
+static INT_PTR ShowHideStub(WPARAM wParam, LPARAM lParam)
+{
+ return cli.pfnShowHide();
+}
+
void InitTrayMenus(void)
{
CreateServiceFunction("CLISTMENUSTRAY/ExecService", TrayMenuExecService);
@@ -116,10 +121,11 @@ 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 = MS_CLIST_SHOWHIDE;
+ mi.pszService = "CList/ShowHide";
mi.name.a = LPGEN("&Hide/show");
mi.hIcolibItem = Skin_GetIconHandle(SKINICON_OTHER_SHOWHIDE);
Menu_AddTrayMenuItem(&mi);
+ CreateServiceFunction(mi.pszService, ShowHideStub);
SET_UID(mi, 0x10e9b2f0, 0xeef2, 0x4684, 0xa7, 0xa7, 0xde, 0x7f, 0x2a, 0xb3, 0x5b, 0x30);
mi.flags = 0;
diff --git a/src/mir_app/src/meta_services.cpp b/src/mir_app/src/meta_services.cpp
index f42d3de877..3393c14a69 100644
--- a/src/mir_app/src/meta_services.cpp
+++ b/src/mir_app/src/meta_services.cpp
@@ -668,7 +668,7 @@ static VOID CALLBACK sttMenuThread(PVOID param)
tpmp.cbSize = sizeof(tpmp);
BOOL menuRet = TrackPopupMenuEx(hMenu, TPM_RETURNCMD, menuMousePoint.x, menuMousePoint.y, cli.hwndContactList, &tpmp);
- CallService(MS_CLIST_MENUPROCESSCOMMAND, MAKEWPARAM(LOWORD(menuRet), MPCF_CONTACTMENU), (LPARAM)param);
+ Clist_MenuProcessCommand(LOWORD(menuRet), MPCF_CONTACTMENU, (INT_PTR)param);
DestroyMenu(hMenu);
}
diff --git a/src/mir_app/src/mir_app.def b/src/mir_app/src/mir_app.def
index b8ffebf951..832cbb31b9 100644
--- a/src/mir_app/src/mir_app.def
+++ b/src/mir_app/src/mir_app.def
@@ -265,3 +265,6 @@ Window_SetSkinIcon_IcoLib @264
Window_SetIcon_IcoLib @265
Clist_Broadcast @266
Clist_BroadcastAsync @267
+Clist_MenuProcessCommand @268
+Clist_IsDocked @269
+Clist_MenuProcessHotkey @270
diff --git a/src/mir_app/src/mir_app64.def b/src/mir_app/src/mir_app64.def
index 9ac85f12c7..d4dbb2fe8f 100644
--- a/src/mir_app/src/mir_app64.def
+++ b/src/mir_app/src/mir_app64.def
@@ -265,3 +265,6 @@ Window_SetSkinIcon_IcoLib @264
Window_SetIcon_IcoLib @265
Clist_Broadcast @266
Clist_BroadcastAsync @267
+Clist_MenuProcessCommand @268
+Clist_IsDocked @269
+Clist_MenuProcessHotkey @270