summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2014-02-11 19:01:03 +0000
committerGeorge Hazan <george.hazan@gmail.com>2014-02-11 19:01:03 +0000
commit1925d3521846f4e6683d3d537cc41de9c9bd7250 (patch)
tree3f9bd6e5f557dc9eac040b078ededd5ee8e7870d
parentb63d67c92da0c420ee7c4f81b8ecdd3b8cfd132d (diff)
"we don't need these variables" (c) Pink Floyd
git-svn-id: http://svn.miranda-ng.org/main/trunk@8101 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
-rw-r--r--include/m_clistint.h4
-rw-r--r--plugins/AVS/src/main.cpp5
-rw-r--r--plugins/AVS/src/services.cpp8
-rw-r--r--plugins/AuthState/src/main.cpp3
-rw-r--r--plugins/AvatarHistory/src/AvatarHistory.cpp9
-rw-r--r--plugins/BasicHistory/src/BasicHistory.cpp3
-rw-r--r--plugins/BasicHistory/src/HistoryWindow.cpp3
-rw-r--r--plugins/Boltun/src/boltun.cpp29
-rw-r--r--plugins/BuddyPounce/src/main.cpp9
-rw-r--r--plugins/ClientChangeNotify/src/ClientChangeNotify.cpp3
-rw-r--r--plugins/Clist_modern/src/CLUIFrames/cluiframes.cpp60
-rw-r--r--plugins/Clist_modern/src/CLUIFrames/cluiframes.h2
-rw-r--r--plugins/Clist_modern/src/CLUIFrames/framesmenu.cpp2
-rw-r--r--plugins/Clist_modern/src/CLUIFrames/groupmenu.cpp44
-rw-r--r--plugins/Clist_modern/src/hdr/modern_clc.h4
-rw-r--r--plugins/Clist_modern/src/hdr/modern_commonheaders.h4
-rw-r--r--plugins/Clist_modern/src/hdr/modern_commonprototypes.h38
-rw-r--r--plugins/Clist_modern/src/hdr/modern_skinengine.h2
-rw-r--r--plugins/Clist_modern/src/hdr/modern_static_clui.h6
-rw-r--r--plugins/Clist_modern/src/hdr/modern_static_cluiframes_service.h88
-rw-r--r--plugins/Clist_modern/src/modern_aniavatars.cpp2
-rw-r--r--plugins/Clist_modern/src/modern_clc.cpp25
-rw-r--r--plugins/Clist_modern/src/modern_clcmsgs.cpp2
-rw-r--r--plugins/Clist_modern/src/modern_clistmenus.cpp4
-rw-r--r--plugins/Clist_modern/src/modern_clistmod.cpp20
-rw-r--r--plugins/Clist_modern/src/modern_clistsettings.cpp10
-rw-r--r--plugins/Clist_modern/src/modern_clisttray.cpp18
-rw-r--r--plugins/Clist_modern/src/modern_clui.cpp26
-rw-r--r--plugins/Clist_modern/src/modern_cluiservices.cpp4
-rw-r--r--plugins/Clist_modern/src/modern_contact.cpp6
-rw-r--r--plugins/Clist_modern/src/modern_docking.cpp4
-rw-r--r--plugins/Clist_modern/src/modern_gettextasync.cpp2
-rw-r--r--plugins/Clist_modern/src/modern_keyboard.cpp4
-rw-r--r--plugins/Clist_modern/src/modern_skinengine.cpp10
-rw-r--r--plugins/Clist_modern/src/modern_statusbar.cpp4
-rw-r--r--plugins/Clist_mw/src/BkgrCfg.cpp4
-rw-r--r--plugins/Clist_mw/src/CLUIFrames/cluiframes.cpp58
-rw-r--r--plugins/Clist_mw/src/CLUIFrames/cluiframes.h2
-rw-r--r--plugins/Clist_mw/src/CLUIFrames/framesmenu.cpp2
-rw-r--r--plugins/Clist_mw/src/CLUIFrames/statusbar.cpp2
-rw-r--r--plugins/Clist_mw/src/clc.cpp10
-rw-r--r--plugins/Clist_mw/src/clc.h4
-rw-r--r--plugins/Clist_mw/src/clcopts.cpp6
-rw-r--r--plugins/Clist_mw/src/clistmenus.cpp2
-rw-r--r--plugins/Clist_mw/src/clistmod.cpp12
-rw-r--r--plugins/Clist_mw/src/clistopts.cpp2
-rw-r--r--plugins/Clist_mw/src/clistsettings.cpp5
-rw-r--r--plugins/Clist_mw/src/clisttray.cpp18
-rw-r--r--plugins/Clist_mw/src/clui.cpp14
-rw-r--r--plugins/Clist_mw/src/cluiopts.cpp2
-rw-r--r--plugins/Clist_mw/src/contact.cpp8
-rw-r--r--plugins/Clist_mw/src/groupmenu.cpp42
-rw-r--r--plugins/Clist_mw/src/init.cpp6
-rw-r--r--plugins/Clist_mw/src/keyboard.cpp4
-rw-r--r--plugins/ContactsPlus/src/main.cpp6
-rw-r--r--plugins/DbEditorPP/src/main.cpp3
-rw-r--r--plugins/FTPFileYM/src/ftpfile.cpp6
-rw-r--r--plugins/FavContacts/src/contact_cache.cpp3
-rw-r--r--plugins/FavContacts/src/main.cpp3
-rw-r--r--plugins/FingerprintNG/src/fingerprint.cpp6
-rw-r--r--plugins/FloatingContacts/src/main.cpp21
-rw-r--r--plugins/HTTPServer/src/GuiElements.cpp5
-rw-r--r--plugins/HistoryLinkListPlus/src/linklist.cpp3
-rw-r--r--plugins/HistorySweeperLight/src/main.cpp6
-rw-r--r--plugins/IgnoreState/src/main.cpp3
-rw-r--r--plugins/KeyboardNotify/src/main.cpp3
-rw-r--r--plugins/MirOTR/MirOTR/src/dbfilter.cpp20
-rw-r--r--plugins/MirOTR/MirOTR/src/mirotrmenu.cpp6
-rw-r--r--plugins/MirOTR/MirOTR/src/svcs_menu.cpp47
-rw-r--r--plugins/MirOTR/MirOTR/src/svcs_srmm.cpp3
-rw-r--r--plugins/NewEventNotify/src/main.cpp12
-rw-r--r--plugins/NewXstatusNotify/src/main.cpp6
-rw-r--r--plugins/NewsAggregator/Src/Services.cpp6
-rw-r--r--plugins/NoHistory/src/dllmain.cpp20
-rw-r--r--plugins/Nudge/src/main.cpp28
-rw-r--r--plugins/PasteIt/src/PasteIt.cpp9
-rw-r--r--plugins/Popup/src/srmm_menu.cpp3
-rw-r--r--plugins/RecentContacts/src/RecentContacts.cpp5
-rw-r--r--plugins/SMS/src/receive.cpp3
-rw-r--r--plugins/Scriver/src/msgs.cpp51
-rw-r--r--plugins/Scriver/src/statusicon.cpp3
-rw-r--r--plugins/SecureIM/src/svcs_clist.cpp8
-rw-r--r--plugins/SecureIM/src/svcs_srmm.cpp7
-rw-r--r--plugins/SimpleAR/src/Main.cpp3
-rw-r--r--plugins/SmileyAdd/src/services.cpp20
-rw-r--r--plugins/SpellChecker/src/utils.cpp3
-rwxr-xr-xplugins/StopSpamMod/src/stopspam.cpp4
-rw-r--r--plugins/StopSpamPlus/src/services.cpp21
-rw-r--r--plugins/TabSRMM/src/generic_msghandlers.cpp3
-rw-r--r--plugins/TabSRMM/src/mim.cpp19
-rw-r--r--plugins/TabSRMM/src/msgs.cpp21
-rw-r--r--plugins/TipperYM/src/message_pump.cpp13
-rw-r--r--plugins/TooltipNotify/src/TooltipNotify.cpp30
-rw-r--r--plugins/UserInfoEx/src/ex_import/svc_ExImport.cpp8
-rw-r--r--plugins/UserInfoEx/src/svc_reminder.cpp3
-rw-r--r--plugins/Variables/src/contact.cpp3
-rw-r--r--plugins/WhenWasIt/src/services.cpp7
-rw-r--r--protocols/AimOscar/src/links.cpp2
-rw-r--r--protocols/AimOscar/src/services.cpp88
-rw-r--r--protocols/AimOscar/src/theme.cpp3
-rw-r--r--protocols/AimOscar/src/ui.cpp2
-rw-r--r--protocols/FacebookRM/src/chat.cpp4
-rw-r--r--protocols/GTalkExt/src/avatar.cpp6
-rw-r--r--protocols/GTalkExt/src/handlers.cpp5
-rw-r--r--protocols/Gadu-Gadu/src/core.cpp6
-rw-r--r--protocols/Gadu-Gadu/src/gg.cpp6
-rw-r--r--protocols/Gadu-Gadu/src/image.cpp3
-rw-r--r--protocols/Gadu-Gadu/src/services.cpp3
-rw-r--r--protocols/IRCG/src/services.cpp6
-rw-r--r--protocols/IcqOscarJ/src/icq_menu.cpp6
-rw-r--r--protocols/IcqOscarJ/src/icq_servlist.cpp16
-rw-r--r--protocols/IcqOscarJ/src/icq_xstatus.cpp20
-rw-r--r--protocols/IcqOscarJ/src/icqosc_svcs.cpp3
-rw-r--r--protocols/JabberG/src/jabber_adhoc.cpp5
-rw-r--r--protocols/JabberG/src/jabber_events.cpp6
-rw-r--r--protocols/JabberG/src/jabber_groupchat.cpp6
-rw-r--r--protocols/JabberG/src/jabber_icolib.cpp3
-rw-r--r--protocols/JabberG/src/jabber_menu.cpp41
-rw-r--r--protocols/JabberG/src/jabber_svc.cpp3
-rw-r--r--protocols/JabberG/src/jabber_xstatus.cpp4
-rw-r--r--protocols/MRA/src/Mra_menus.cpp6
-rw-r--r--protocols/MRA/src/Mra_svcs.cpp22
-rw-r--r--protocols/MSN/src/msn_menu.cpp26
-rw-r--r--protocols/MSN/src/msn_svcs.cpp17
-rw-r--r--protocols/Tlen/src/tlen.cpp13
-rw-r--r--protocols/Tlen/src/tlen_svc.cpp3
-rw-r--r--protocols/Twitter/src/contacts.cpp4
-rw-r--r--protocols/Twitter/src/proto.cpp11
-rw-r--r--protocols/Xfire/src/main.cpp6
-rw-r--r--protocols/Yahoo/src/im.cpp4
-rw-r--r--protocols/Yahoo/src/services.cpp9
-rw-r--r--src/core/stdfile/file.cpp12
-rw-r--r--src/core/stdmsg/src/globals.cpp9
-rw-r--r--src/core/stdmsg/src/msgs.cpp42
-rw-r--r--src/core/stdmsg/src/statusicon.cpp3
-rw-r--r--src/core/stdurl/url.cpp8
-rw-r--r--src/core/stduseronline/useronline.cpp22
-rw-r--r--src/modules/chat/clist.cpp20
-rw-r--r--src/modules/clist/clistevents.cpp3
-rw-r--r--src/modules/clist/clistmenus.cpp5
-rw-r--r--src/modules/clist/clistsettings.cpp14
-rw-r--r--src/modules/clist/clui.cpp77
-rw-r--r--src/modules/extraicons/DefaultExtraIcons.cpp9
-rw-r--r--src/modules/extraicons/extraicons.cpp6
-rw-r--r--src/modules/protocols/protoaccs.cpp12
-rw-r--r--src/modules/srmm/statusicon.cpp5
146 files changed, 746 insertions, 1002 deletions
diff --git a/include/m_clistint.h b/include/m_clistint.h
index d339fa87f4..f959efef13 100644
--- a/include/m_clistint.h
+++ b/include/m_clistint.h
@@ -277,8 +277,8 @@ typedef struct
int (*pfnGetRowsPriorTo)(ClcGroup *group, ClcGroup *subgroup, int contactIndex);
int (*pfnFindItem)(HWND hwnd, struct ClcData *dat, HANDLE hItem, ClcContact **contact, ClcGroup **subgroup, int *isVisible);
int (*pfnGetRowByIndex)(struct ClcData *dat, int testindex, ClcContact **contact, ClcGroup **subgroup);
- HANDLE (*pfnContactToHItem)(ClcContact* contact);
- HANDLE (*pfnContactToItemHandle)(ClcContact * contact, DWORD * nmFlags);
+ HANDLE (*pfnContactToHItem)(ClcContact *contact);
+ HANDLE (*pfnContactToItemHandle)(ClcContact *contact, DWORD *nmFlags);
/* clcitems.c */
ClcContact* (*pfnCreateClcContact)(void);
diff --git a/plugins/AVS/src/main.cpp b/plugins/AVS/src/main.cpp
index a0de907cfd..9b00e6be82 100644
--- a/plugins/AVS/src/main.cpp
+++ b/plugins/AVS/src/main.cpp
@@ -127,14 +127,13 @@ static int ProtocolAck(WPARAM wParam, LPARAM lParam)
return 0;
}
-static int MetaChanged(WPARAM wParam, LPARAM lParam)
+static int MetaChanged(WPARAM hContact, LPARAM lParam)
{
- if (wParam == 0 || g_shutDown)
+ if (hContact == 0 || g_shutDown)
return 0;
AVATARCACHEENTRY *ace;
- MCONTACT hContact = wParam;
MCONTACT hSubContact = GetContactThatHaveTheAvatar(hContact);
// Get the node
diff --git a/plugins/AVS/src/services.cpp b/plugins/AVS/src/services.cpp
index d854e4fd1c..7c9354ea06 100644
--- a/plugins/AVS/src/services.cpp
+++ b/plugins/AVS/src/services.cpp
@@ -26,12 +26,11 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
/////////////////////////////////////////////////////////////////////////////////////////
-INT_PTR GetAvatarBitmap(WPARAM wParam, LPARAM lParam)
+INT_PTR GetAvatarBitmap(WPARAM hContact, LPARAM lParam)
{
- if (wParam == 0 || g_shutDown || fei == NULL)
+ if (hContact == 0 || g_shutDown || fei == NULL)
return 0;
- MCONTACT hContact = wParam;
hContact = GetContactThatHaveTheAvatar(hContact);
// Get the node
@@ -44,9 +43,8 @@ INT_PTR GetAvatarBitmap(WPARAM wParam, LPARAM lParam)
/////////////////////////////////////////////////////////////////////////////////////////
-INT_PTR ProtectAvatar(WPARAM wParam, LPARAM lParam)
+INT_PTR ProtectAvatar(WPARAM hContact, LPARAM lParam)
{
- MCONTACT hContact = wParam;
BYTE was_locked = db_get_b(hContact, "ContactPhoto", "Locked", 0);
if (fei == NULL || was_locked == (BYTE)lParam) // no need for redundant lockings...
diff --git a/plugins/AuthState/src/main.cpp b/plugins/AuthState/src/main.cpp
index fbfd2a170a..f8498223b6 100644
--- a/plugins/AuthState/src/main.cpp
+++ b/plugins/AuthState/src/main.cpp
@@ -138,9 +138,8 @@ INT_PTR onAuthMenuSelected(WPARAM wParam, LPARAM lParam)
return 0;
}
-int onPrebuildContactMenu(WPARAM wParam, LPARAM lParam)
+int onPrebuildContactMenu(WPARAM hContact, LPARAM lParam)
{
- MCONTACT hContact = wParam;
char *proto = GetContactProto(hContact);
if (!proto)
return 0;
diff --git a/plugins/AvatarHistory/src/AvatarHistory.cpp b/plugins/AvatarHistory/src/AvatarHistory.cpp
index e6a878d420..d56a2a20cf 100644
--- a/plugins/AvatarHistory/src/AvatarHistory.cpp
+++ b/plugins/AvatarHistory/src/AvatarHistory.cpp
@@ -103,13 +103,12 @@ static INT_PTR IsEnabled(WPARAM wParam, LPARAM lParam)
// It is also possible that this event passes 0 as wParam (hContact), in which case,
// a protocol picture (pseudo - avatar) has been changed.
-static int AvatarChanged(WPARAM wParam, LPARAM lParam)
+static int AvatarChanged(WPARAM hContact, LPARAM lParam)
{
- MCONTACT hContact = wParam;
if (hContact == NULL)
return 0;
- char *proto = GetContactProto(wParam);
+ char *proto = GetContactProto(hContact);
if (proto == NULL)
return 0;
@@ -158,7 +157,7 @@ static int AvatarChanged(WPARAM wParam, LPARAM lParam)
ShowDebugPopup(hContact, TranslateT("AVH Debug: File copied successfully"), history_filename);
if (ServiceExists(MS_MC_GETMETACONTACT)) {
- MCONTACT hMetaContact = (MCONTACT)CallService(MS_MC_GETMETACONTACT, wParam, 0);
+ MCONTACT hMetaContact = (MCONTACT)CallService(MS_MC_GETMETACONTACT, hContact, 0);
if (hMetaContact != NULL && ContactEnabled(hMetaContact, "LogToDisk", AVH_DEF_LOGTOHISTORY)) {
TCHAR filename[MAX_PATH] = _T("");
@@ -203,7 +202,7 @@ static int AvatarChanged(WPARAM wParam, LPARAM lParam)
CreateOldStyleShortcut(hContact, history_filename);
if (ServiceExists(MS_MC_GETMETACONTACT)) {
- MCONTACT hMetaContact = (MCONTACT)CallService(MS_MC_GETMETACONTACT, wParam, 0);
+ MCONTACT hMetaContact = (MCONTACT)CallService(MS_MC_GETMETACONTACT, hContact, 0);
if (hMetaContact != NULL && ContactEnabled(hMetaContact, "LogToDisk", AVH_DEF_LOGTOHISTORY))
CreateOldStyleShortcut(hMetaContact, history_filename);
}
diff --git a/plugins/BasicHistory/src/BasicHistory.cpp b/plugins/BasicHistory/src/BasicHistory.cpp
index a1d4024961..1d5d89352b 100644
--- a/plugins/BasicHistory/src/BasicHistory.cpp
+++ b/plugins/BasicHistory/src/BasicHistory.cpp
@@ -194,9 +194,8 @@ HICON LoadIconEx(int iconId, int big)
return 0;
}
-INT_PTR ShowContactHistory(WPARAM wParam, LPARAM lParam)
+INT_PTR ShowContactHistory(WPARAM hContact, LPARAM lParam)
{
- MCONTACT hContact = wParam;
HistoryWindow::Open(hContact);
return 0;
}
diff --git a/plugins/BasicHistory/src/HistoryWindow.cpp b/plugins/BasicHistory/src/HistoryWindow.cpp
index 5a6a1c2af4..e14e778552 100644
--- a/plugins/BasicHistory/src/HistoryWindow.cpp
+++ b/plugins/BasicHistory/src/HistoryWindow.cpp
@@ -425,9 +425,8 @@ void HistoryWindow::OptionsSearchingChanged()
}
}
-INT_PTR HistoryWindow::DeleteAllUserHistory(WPARAM wParam, LPARAM)
+INT_PTR HistoryWindow::DeleteAllUserHistory(WPARAM hContact, LPARAM)
{
- MCONTACT hContact = wParam;
HWND hWnd = NULL;
int start = 0;
int end = 0;
diff --git a/plugins/Boltun/src/boltun.cpp b/plugins/Boltun/src/boltun.cpp
index 494d652bac..1d352aa13f 100644
--- a/plugins/Boltun/src/boltun.cpp
+++ b/plugins/Boltun/src/boltun.cpp
@@ -210,10 +210,8 @@ static bool BoltunAutoChat(MCONTACT hContact)
return false;
}
-static int MessageEventAdded(WPARAM wParam, LPARAM lParam)
+static int MessageEventAdded(WPARAM hContact, LPARAM lParam)
{
- MCONTACT hContact = wParam;
- HANDLE hDbEvent = (HANDLE)lParam;
if (!BoltunAutoChat(hContact))
return 0;
@@ -222,6 +220,7 @@ static int MessageEventAdded(WPARAM wParam, LPARAM lParam)
dbei.cbSize = sizeof(dbei);
dbei.cbBlob = 0;
+ HANDLE hDbEvent = (HANDLE)lParam;
dbei.cbBlob = db_event_getBlobSize(hDbEvent);
if (dbei.cbBlob == -1)
return 0;
@@ -499,10 +498,8 @@ static int MessageOptInit(WPARAM wParam, LPARAM lParam)
return 0;
}
-static int ContactClick(WPARAM wParam, LPARAM lParam, BOOL clickNotToChat)
+static int ContactClick(WPARAM hContact, LPARAM lParam, BOOL clickNotToChat)
{
- MCONTACT hContact = wParam;
-
BOOL boltunautochat = db_get_b(hContact, BOLTUN_KEY, DB_CONTACT_BOLTUN_AUTO_CHAT, FALSE);
BOOL boltunnottochat = db_get_b(hContact, BOLTUN_KEY, DB_CONTACT_BOLTUN_NOT_TO_CHAT, FALSE);
@@ -533,37 +530,33 @@ static int ContactClick(WPARAM wParam, LPARAM lParam, BOOL clickNotToChat)
return 0;
}
-static INT_PTR ContactClickAutoChat(WPARAM wParam, LPARAM lParam)
+static INT_PTR ContactClickAutoChat(WPARAM hContact, LPARAM lParam)
{
- return ContactClick(wParam, lParam, 0);
+ return ContactClick(hContact, lParam, 0);
}
-static INT_PTR ContactClickNotToChat(WPARAM wParam, LPARAM lParam)
+static INT_PTR ContactClickNotToChat(WPARAM hContact, LPARAM lParam)
{
- return ContactClick(wParam, lParam, 1);
+ return ContactClick(hContact, lParam, 1);
}
-static INT_PTR ContactClickStartChatting(WPARAM wParam, LPARAM lParam)
+static INT_PTR ContactClickStartChatting(WPARAM hContact, LPARAM lParam)
{
- MCONTACT hContact = wParam;
StartChatting(hContact);
return 0;
}
-static int MessagePrebuild(WPARAM wParam, LPARAM lParam)
+static int MessagePrebuild(WPARAM hContact, LPARAM lParam)
{
CLISTMENUITEM clmi = { sizeof(clmi) };
- MCONTACT hContact = wParam;
- if (!blInit || (db_get_b(hContact,"CList","NotOnList",0) == 1))
- {
+ if (!blInit || (db_get_b(hContact,"CList","NotOnList",0) == 1)) {
clmi.flags = CMIM_FLAGS | CMIF_GRAYED;
Menu_ModifyItem(hMenuItemAutoChat, &clmi);
Menu_ModifyItem(hMenuItemNotToChat, &clmi);
}
- else
- {
+ else {
BOOL boltunautochat = db_get_b(hContact, BOLTUN_KEY, DB_CONTACT_BOLTUN_AUTO_CHAT, FALSE);
BOOL boltunnottochat = db_get_b(hContact, BOLTUN_KEY, DB_CONTACT_BOLTUN_NOT_TO_CHAT, FALSE);
diff --git a/plugins/BuddyPounce/src/main.cpp b/plugins/BuddyPounce/src/main.cpp
index 15e1649b83..dbff32ad1f 100644
--- a/plugins/BuddyPounce/src/main.cpp
+++ b/plugins/BuddyPounce/src/main.cpp
@@ -151,18 +151,17 @@ void SendPounce(TCHAR *text, MCONTACT hContact)
}
-int UserOnlineSettingChanged(WPARAM wParam,LPARAM lParam)
+int UserOnlineSettingChanged(WPARAM hContact, LPARAM lParam)
{
- MCONTACT hContact = wParam;
DBCONTACTWRITESETTING *cws=(DBCONTACTWRITESETTING*)lParam;
char *szProto = GetContactProto(hContact);
- if((HANDLE)wParam == NULL || strcmp(cws->szSetting,"Status")) return 0;
+ if(hContact == NULL || strcmp(cws->szSetting,"Status")) return 0;
if (szProto && (CallProtoService(szProto, PS_GETCAPS, PFLAGNUM_1, 0) & PF1_IM)) {
int newStatus = cws->value.wVal;
- int oldStatus = db_get_w(wParam,"UserOnline","OldStatus",ID_STATUS_OFFLINE);
+ int oldStatus = db_get_w(hContact,"UserOnline","OldStatus",ID_STATUS_OFFLINE);
- if (newStatus != oldStatus && wParam != NULL && newStatus != ID_STATUS_OFFLINE) {
+ if (newStatus != oldStatus && hContact != NULL && newStatus != ID_STATUS_OFFLINE) {
DBVARIANT dbv;
if (!db_get_ts(hContact, modname, "PounceMsg", &dbv) && (dbv.ptszVal[0] != '\0')) {
// check my status
diff --git a/plugins/ClientChangeNotify/src/ClientChangeNotify.cpp b/plugins/ClientChangeNotify/src/ClientChangeNotify.cpp
index 8c14220ac5..5df2197e37 100644
--- a/plugins/ClientChangeNotify/src/ClientChangeNotify.cpp
+++ b/plugins/ClientChangeNotify/src/ClientChangeNotify.cpp
@@ -195,13 +195,12 @@ void ShowPopup(SHOWPOPUP_DATA *sd)
PUAddPopupT(&ppd);
}
-int ContactSettingChanged(WPARAM wParam, LPARAM lParam)
+int ContactSettingChanged(WPARAM hContact, LPARAM lParam)
{
DBCONTACTWRITESETTING *cws = (DBCONTACTWRITESETTING*)lParam;
if (lstrcmpA(cws->szSetting, DB_MIRVER))
return 0;
- MCONTACT hContact = wParam;
SHOWPOPUP_DATA sd = {0};
char *szProto = GetContactProto(hContact);
if (g_PreviewOptPage)
diff --git a/plugins/Clist_modern/src/CLUIFrames/cluiframes.cpp b/plugins/Clist_modern/src/CLUIFrames/cluiframes.cpp
index 935dca24d4..3b2ed38cb0 100644
--- a/plugins/Clist_modern/src/CLUIFrames/cluiframes.cpp
+++ b/plugins/Clist_modern/src/CLUIFrames/cluiframes.cpp
@@ -52,7 +52,7 @@ enum {
enum { eUnknownId = -1 };
-static int _us_DoSetFrameFloat(WPARAM wParam,LPARAM lParam);
+static int _us_DoSetFrameFloat(WPARAM wParam, LPARAM lParam);
static int CLUIFrameResizeFloatingFrame( int framepos );
static HWND CreateSubContainerWindow( HWND parent,int x,int y,int width,int height );
static BOOL CLUIFramesFitInSize();
@@ -979,7 +979,7 @@ static HMENU CLUIFramesCreateMenuForFrame(int frameid,int root,int popuppos,HGEN
return 0;
}
-static int ModifyMItem(WPARAM wParam,LPARAM lParam)
+static int ModifyMItem(WPARAM wParam, LPARAM lParam)
{
if ((int)wParam == -1 ) return 0; // FIXME
@@ -987,7 +987,7 @@ static int ModifyMItem(WPARAM wParam,LPARAM lParam)
};
-static int CLUIFramesModifyContextMenuForFrame(WPARAM wParam,LPARAM lParam)
+static int CLUIFramesModifyContextMenuForFrame(WPARAM wParam, LPARAM lParam)
{
/* HOOK */
if (MirandaExiting()) return 0;
@@ -1038,7 +1038,7 @@ static int CLUIFramesModifyContextMenuForFrame(WPARAM wParam,LPARAM lParam)
return 0;
}
-static int CLUIFramesModifyMainMenuItems(WPARAM wParam,LPARAM lParam)
+static int CLUIFramesModifyMainMenuItems(WPARAM wParam, LPARAM lParam)
{
//hiword(wParam) = frameid,loword(wParam) = flag
if (_fCluiFramesModuleNotStarted) return -1;
@@ -1092,7 +1092,7 @@ static int CLUIFramesModifyMainMenuItems(WPARAM wParam,LPARAM lParam)
}
-static INT_PTR _us_DoGetFrameOptions(WPARAM wParam,LPARAM lParam)
+static INT_PTR _us_DoGetFrameOptions(WPARAM wParam, LPARAM lParam)
{
INT_PTR retval;
BOOL bUnicodeText = (LOWORD(wParam) & FO_UNICODETEXT) != 0;
@@ -1182,7 +1182,7 @@ static int UpdateTBToolTip(int framepos)
}
//hiword(wParam) = frameid,loword(wParam) = flag
-static int _us_DoSetFrameOptions(WPARAM wParam,LPARAM lParam)
+static int _us_DoSetFrameOptions(WPARAM wParam, LPARAM lParam)
{
int retval; // value to be returned
BOOL bUnicodeText = (LOWORD(wParam) & FO_UNICODETEXT) != 0;
@@ -1351,7 +1351,7 @@ static int _us_DoSetFrameOptions(WPARAM wParam,LPARAM lParam)
}
//wparam = lparam = 0
-static int _us_DoShowAllFrames(WPARAM wParam,LPARAM lParam)
+static int _us_DoShowAllFrames(WPARAM wParam, LPARAM lParam)
{
int i;
@@ -1364,7 +1364,7 @@ static int _us_DoShowAllFrames(WPARAM wParam,LPARAM lParam)
}
//wparam = lparam = 0
-static int _us_DoShowTitles(WPARAM wParam,LPARAM lParam)
+static int _us_DoShowTitles(WPARAM wParam, LPARAM lParam)
{
int i;
@@ -1377,7 +1377,7 @@ static int _us_DoShowTitles(WPARAM wParam,LPARAM lParam)
}
//wparam = lparam = 0
-static int _us_DoHideTitles(WPARAM wParam,LPARAM lParam)
+static int _us_DoHideTitles(WPARAM wParam, LPARAM lParam)
{
int i;
@@ -1390,7 +1390,7 @@ static int _us_DoHideTitles(WPARAM wParam,LPARAM lParam)
}
//wparam = frameid
-static int _us_DoShowHideFrame(WPARAM wParam,LPARAM lParam)
+static int _us_DoShowHideFrame(WPARAM wParam, LPARAM lParam)
{
if (_fCluiFramesModuleNotStarted)
return -1;
@@ -1418,7 +1418,7 @@ static int _us_DoShowHideFrame(WPARAM wParam,LPARAM lParam)
}
//wparam = frameid
-static int _us_DoShowHideFrameTitle(WPARAM wParam,LPARAM lParam)
+static int _us_DoShowHideFrameTitle(WPARAM wParam, LPARAM lParam)
{
if (_fCluiFramesModuleNotStarted)
return -1;
@@ -1433,7 +1433,7 @@ static int _us_DoShowHideFrameTitle(WPARAM wParam,LPARAM lParam)
//wparam = frameid
//lparam = -1 up ,1 down
-static int _us_DoMoveFrame(WPARAM wParam,LPARAM lParam)
+static int _us_DoMoveFrame(WPARAM wParam, LPARAM lParam)
{
int i,curpos,curalign,v,tmpval;
@@ -1488,19 +1488,19 @@ static int _us_DoMoveFrame(WPARAM wParam,LPARAM lParam)
return 0;
}
-static int _us_DoMoveFrameUp(WPARAM wParam,LPARAM lParam)
+static int _us_DoMoveFrameUp(WPARAM wParam, LPARAM lParam)
{
return CLUIFrames_MoveFrame(wParam,(LPARAM)+1);
}
-static int _us_DoMoveFrameDown(WPARAM wParam,LPARAM lParam)
+static int _us_DoMoveFrameDown(WPARAM wParam, LPARAM lParam)
{
return CLUIFrames_MoveFrame(wParam,(LPARAM)-1);
}
//wparam = frameid
//lparam = alignment
-static int _us_DoSetFrameAlign(WPARAM wParam,LPARAM lParam)
+static int _us_DoSetFrameAlign(WPARAM wParam, LPARAM lParam)
{
if (_fCluiFramesModuleNotStarted) return -1;
@@ -1509,21 +1509,21 @@ static int _us_DoSetFrameAlign(WPARAM wParam,LPARAM lParam)
return 0;
}
-static int _us_DoAlignFrameTop(WPARAM wParam,LPARAM lParam)
+static int _us_DoAlignFrameTop(WPARAM wParam, LPARAM lParam)
{
if (_fCluiFramesModuleNotStarted) return -1;
return CLUIFrames_SetFrameAlign(wParam,alTop);
}
-static int _us_DoAlignFrameBottom(WPARAM wParam,LPARAM lParam)
+static int _us_DoAlignFrameBottom(WPARAM wParam, LPARAM lParam)
{
if (_fCluiFramesModuleNotStarted) return -1;
return CLUIFrames_SetFrameAlign(wParam,alBottom);
}
-static int _us_DoAlignFrameClient(WPARAM wParam,LPARAM lParam)
+static int _us_DoAlignFrameClient(WPARAM wParam, LPARAM lParam)
{
if (_fCluiFramesModuleNotStarted) return -1;
@@ -1531,7 +1531,7 @@ static int _us_DoAlignFrameClient(WPARAM wParam,LPARAM lParam)
}
//wparam = frameid
-static int _us_DoLockFrame(WPARAM wParam,LPARAM lParam)
+static int _us_DoLockFrame(WPARAM wParam, LPARAM lParam)
{
if (_fCluiFramesModuleNotStarted) return -1;
@@ -1545,7 +1545,7 @@ static int _us_DoLockFrame(WPARAM wParam,LPARAM lParam)
}
//wparam = frameid
-static int _us_DoSetFrameBorder(WPARAM wParam,LPARAM lParam)
+static int _us_DoSetFrameBorder(WPARAM wParam, LPARAM lParam)
{
RECT rc;
int oldflags;
@@ -1571,7 +1571,7 @@ static int _us_DoSetFrameBorder(WPARAM wParam,LPARAM lParam)
}
//wparam = frameid
-static int _us_DoCollapseFrame(WPARAM wParam,LPARAM lParam)
+static int _us_DoCollapseFrame(WPARAM wParam, LPARAM lParam)
{
int FrameId;
@@ -1776,7 +1776,7 @@ static HFONT CLUILoadTitleBarFont()
//wparam = (CLISTFrame*)clfrm
-static int _us_DoAddFrame(WPARAM wParam,LPARAM lParam)
+static int _us_DoAddFrame(WPARAM wParam, LPARAM lParam)
{
int style,retval;
//char * CustomName = NULL;
@@ -1947,7 +1947,7 @@ static int _us_DoAddFrame(WPARAM wParam,LPARAM lParam)
return retval;
}
-static int _us_DoRemoveFrame(WPARAM wParam,LPARAM lParam)
+static int _us_DoRemoveFrame(WPARAM wParam, LPARAM lParam)
{
int pos;
if (_fCluiFramesModuleNotStarted) return -1;
@@ -2369,7 +2369,7 @@ int CLUIFrames_ApplyNewSizes(int mode)
return 0;
}
-static int _us_DoUpdateFrame(WPARAM wParam,LPARAM lParam)
+static int _us_DoUpdateFrame(WPARAM wParam, LPARAM lParam)
{
if (_fCluiFramesModuleNotStarted) return -1;
if (wParam == -1) { CLUIFramesOnClistResize((WPARAM)pcli->hwndContactList,0); return 0;}
@@ -2538,7 +2538,7 @@ int CheckFramesPos(RECT *wr)
return 0;
}
-int CLUIFramesOnClistResize(WPARAM wParam,LPARAM lParam)
+int CLUIFramesOnClistResize(WPARAM wParam, LPARAM lParam)
{
RECT nRect;
int tick;
@@ -2639,7 +2639,7 @@ int CLUIFramesOnClistResize(WPARAM wParam,LPARAM lParam)
return 0;
}
-int OnFrameTitleBarBackgroundChange(WPARAM wParam,LPARAM lParam)
+int OnFrameTitleBarBackgroundChange(WPARAM wParam, LPARAM lParam)
{
if (MirandaExiting()) return 0;
{
@@ -3389,7 +3389,7 @@ static int CLUIFrameResizeFloatingFrame(int framepos)
return 0;
};
-static int CLUIFrameOnMainMenuBuild(WPARAM wParam,LPARAM lParam)
+static int CLUIFrameOnMainMenuBuild(WPARAM wParam, LPARAM lParam)
{
if (MirandaExiting()) return 0;
CLUIFramesLoadMainMenu();
@@ -3668,7 +3668,7 @@ static HWND CreateContainerWindow(HWND parent,int x,int y,int width,int height)
};
-static int _us_DoSetFrameFloat(WPARAM wParam,LPARAM lParam)
+static int _us_DoSetFrameFloat(WPARAM wParam, LPARAM lParam)
{
HWND hwndtmp,hwndtooltiptmp;
@@ -3785,7 +3785,7 @@ static int _us_DoSetFrameFloat(WPARAM wParam,LPARAM lParam)
return 0;
}
-int CLUIFrameOnModulesLoad(WPARAM wParam,LPARAM lParam)
+int CLUIFrameOnModulesLoad(WPARAM wParam, LPARAM lParam)
{
/* HOOK */
CLUIFramesLoadMainMenu();
@@ -3793,7 +3793,7 @@ int CLUIFrameOnModulesLoad(WPARAM wParam,LPARAM lParam)
return 0;
}
-int CLUIFrameOnModulesUnload(WPARAM wParam,LPARAM lParam)
+int CLUIFrameOnModulesUnload(WPARAM wParam, LPARAM lParam)
{
g_CluiData.bSTATE = STATE_PREPEARETOEXIT;
diff --git a/plugins/Clist_modern/src/CLUIFrames/cluiframes.h b/plugins/Clist_modern/src/CLUIFrames/cluiframes.h
index 4e9f831250..d437c8ae03 100644
--- a/plugins/Clist_modern/src/CLUIFrames/cluiframes.h
+++ b/plugins/Clist_modern/src/CLUIFrames/cluiframes.h
@@ -27,7 +27,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
int LoadCLUIFramesModule(void);
int UnLoadCLUIFramesModule(void);
int CLUIFramesGetMinHeight();
-int CLUIFramesOnClistResize(WPARAM wParam,LPARAM lParam);
+int CLUIFramesOnClistResize(WPARAM wParam, LPARAM lParam);
int CLUIFrames_GetTotalHeight();
typedef struct tagProtocolData {
diff --git a/plugins/Clist_modern/src/CLUIFrames/framesmenu.cpp b/plugins/Clist_modern/src/CLUIFrames/framesmenu.cpp
index 46b17483e0..d500d29286 100644
--- a/plugins/Clist_modern/src/CLUIFrames/framesmenu.cpp
+++ b/plugins/Clist_modern/src/CLUIFrames/framesmenu.cpp
@@ -89,7 +89,7 @@ static INT_PTR ContextFrameMenuNotify(WPARAM wParam, LPARAM lParam)
return 0;
}
-static INT_PTR BuildContextFrameMenu(WPARAM wParam,LPARAM lParam)
+static INT_PTR BuildContextFrameMenu(WPARAM wParam, LPARAM lParam)
{
ListParam param = { 0 };
param.MenuObjectHandle = hFrameMenuObject;
diff --git a/plugins/Clist_modern/src/CLUIFrames/groupmenu.cpp b/plugins/Clist_modern/src/CLUIFrames/groupmenu.cpp
index 5773392e1a..a09df84b28 100644
--- a/plugins/Clist_modern/src/CLUIFrames/groupmenu.cpp
+++ b/plugins/Clist_modern/src/CLUIFrames/groupmenu.cpp
@@ -57,14 +57,14 @@ typedef struct
wparam = handle to the menu item returned by MS_CLIST_ADDCONTACTMENUITEM
return 0 on success.
*/
-static INT_PTR RemoveGroupMenuItem(WPARAM wParam,LPARAM lParam)
+static INT_PTR RemoveGroupMenuItem(WPARAM wParam, LPARAM lParam)
{
CallService(MO_REMOVEMENUITEM,wParam,0);
return 0;
}
-INT_PTR BuildGroupMenu(WPARAM wParam,LPARAM lParam)
+INT_PTR BuildGroupMenu(WPARAM wParam, LPARAM lParam)
{
ListParam param = { 0 };
param.MenuObjectHandle = hGroupMenuObject;
@@ -82,7 +82,7 @@ INT_PTR BuildGroupMenu(WPARAM wParam,LPARAM lParam)
return (INT_PTR)hMenu;
}
-static INT_PTR AddGroupMenuItem(WPARAM wParam,LPARAM lParam)
+static INT_PTR AddGroupMenuItem(WPARAM wParam, LPARAM lParam)
{
TMO_MenuItem tmi;
CLISTMENUITEM *mi = (CLISTMENUITEM*)lParam;
@@ -114,12 +114,12 @@ static INT_PTR AddGroupMenuItem(WPARAM wParam,LPARAM lParam)
return (INT_PTR)op.Handle;
}
-int GroupMenuCheckService(WPARAM wParam,LPARAM lParam) {
+int GroupMenuCheckService(WPARAM wParam, LPARAM lParam) {
//not used
return 0;
};
-INT_PTR GroupMenuonAddService(WPARAM wParam,LPARAM lParam) {
+INT_PTR GroupMenuonAddService(WPARAM wParam, LPARAM lParam) {
MENUITEMINFO *mii = (MENUITEMINFO* )wParam;
if (mii == NULL)
@@ -146,7 +146,7 @@ INT_PTR GroupMenuonAddService(WPARAM wParam,LPARAM lParam) {
//called with:
//wparam - ownerdata
//lparam - lparam from winproc
-INT_PTR GroupMenuExecService(WPARAM wParam,LPARAM lParam)
+INT_PTR GroupMenuExecService(WPARAM wParam, LPARAM lParam)
{
if (wParam != 0) {
lpGroupMenuExecParam mmep = (lpGroupMenuExecParam)wParam;
@@ -160,7 +160,7 @@ INT_PTR GroupMenuExecService(WPARAM wParam,LPARAM lParam)
return 1;
}
-INT_PTR FreeOwnerDataGroupMenu (WPARAM wParam,LPARAM lParam)
+INT_PTR FreeOwnerDataGroupMenu (WPARAM wParam, LPARAM lParam)
{
lpGroupMenuExecParam mmep = (lpGroupMenuExecParam)lParam;
if (mmep != NULL) {
@@ -171,7 +171,7 @@ INT_PTR FreeOwnerDataGroupMenu (WPARAM wParam,LPARAM lParam)
return 0;
}
-INT_PTR HideGroupsHelper(WPARAM wParam,LPARAM lParam)
+INT_PTR HideGroupsHelper(WPARAM wParam, LPARAM lParam)
{
int newVal = !(GetWindowLongPtr(pcli->hwndContactTree,GWL_STYLE)&CLS_HIDEEMPTYGROUPS);
db_set_b(NULL,"CList","HideEmptyGroups",(BYTE)newVal);
@@ -179,7 +179,7 @@ INT_PTR HideGroupsHelper(WPARAM wParam,LPARAM lParam)
return 0;
}
-INT_PTR UseGroupsHelper(WPARAM wParam,LPARAM lParam)
+INT_PTR UseGroupsHelper(WPARAM wParam, LPARAM lParam)
{
int newVal = !(GetWindowLongPtr(pcli->hwndContactTree,GWL_STYLE)&CLS_USEGROUPS);
db_set_b(NULL,"CList","UseGroups",(BYTE)newVal);
@@ -187,7 +187,7 @@ INT_PTR UseGroupsHelper(WPARAM wParam,LPARAM lParam)
return 0;
}
-INT_PTR HideOfflineRootHelper(WPARAM wParam,LPARAM lParam)
+INT_PTR HideOfflineRootHelper(WPARAM wParam, LPARAM lParam)
{
SendMessage(
(HWND)CallService(MS_CLUI_GETHWNDTREE, 0, 0),
@@ -197,7 +197,7 @@ INT_PTR HideOfflineRootHelper(WPARAM wParam,LPARAM lParam)
return 0;
}
-INT_PTR CreateGroupHelper(WPARAM wParam,LPARAM lParam)
+INT_PTR CreateGroupHelper(WPARAM wParam, LPARAM lParam)
{
SendMessage((HWND)CallService(MS_CLUI_GETHWNDTREE, 0, 0), CLM_SETHIDEEMPTYGROUPS, 0, 0);
SendMessage((HWND)CallService(MS_CLUI_GETHWNDTREE, 0, 0), CLM_SETUSEGROUPS, 1, 0);
@@ -205,7 +205,7 @@ INT_PTR CreateGroupHelper(WPARAM wParam,LPARAM lParam)
return 0;
};
-static int OnBuildGroupMenu(WPARAM wParam,LPARAM lParam)
+static int OnBuildGroupMenu(WPARAM wParam, LPARAM lParam)
{
if (MirandaExiting()) return 0;
@@ -226,7 +226,7 @@ static int OnBuildGroupMenu(WPARAM wParam,LPARAM lParam)
static IconItem iconItem = { "New Group", "NewGroup", IDI_NEWGROUP2 };
-int static OnIconLibIconChanged(WPARAM wParam,LPARAM lParam)
+int static OnIconLibIconChanged(WPARAM wParam, LPARAM lParam)
{
if (MirandaExiting()) return 0;
@@ -371,13 +371,13 @@ int Param1,Param2;
wparam = handle to the menu item returned by MS_CLIST_ADDCONTACTMENUITEM
return 0 on success.
*/
-static INT_PTR RemoveSubGroupMenuItem(WPARAM wParam,LPARAM lParam)
+static INT_PTR RemoveSubGroupMenuItem(WPARAM wParam, LPARAM lParam)
{
CallService(MO_REMOVEMENUITEM,wParam,0);
return 0;
}
-static int OnBuildSubGroupMenu(WPARAM wParam,LPARAM lParam)
+static int OnBuildSubGroupMenu(WPARAM wParam, LPARAM lParam)
{
BOOL gray1 = FALSE;
BOOL gray2 = FALSE;
@@ -404,7 +404,7 @@ static int OnBuildSubGroupMenu(WPARAM wParam,LPARAM lParam)
return 0;
}
-INT_PTR BuildSubGroupMenu(WPARAM wParam,LPARAM lParam)
+INT_PTR BuildSubGroupMenu(WPARAM wParam, LPARAM lParam)
{
ListParam param = { 0 };
param.MenuObjectHandle = hSubGroupMenuObject;
@@ -430,7 +430,7 @@ HMENU cliBuildGroupPopupMenu(ClcGroup *group)
return (HMENU)CallService(MS_CLIST_MENUBUILDSUBGROUP,(WPARAM)group,0);
}
-static INT_PTR AddSubGroupMenuItem(WPARAM wParam,LPARAM lParam)
+static INT_PTR AddSubGroupMenuItem(WPARAM wParam, LPARAM lParam)
{
TMO_MenuItem tmi;
CLISTMENUITEM *mi = (CLISTMENUITEM*)lParam;
@@ -462,7 +462,7 @@ static INT_PTR AddSubGroupMenuItem(WPARAM wParam,LPARAM lParam)
return (INT_PTR)op.Handle;
}
-INT_PTR SubGroupMenuCheckService(WPARAM wParam,LPARAM lParam)
+INT_PTR SubGroupMenuCheckService(WPARAM wParam, LPARAM lParam)
{
TCheckProcParam * CParam = (TCheckProcParam*)wParam;
if (CParam) {
@@ -473,7 +473,7 @@ INT_PTR SubGroupMenuCheckService(WPARAM wParam,LPARAM lParam)
return 1;
}
-INT_PTR SubGroupMenuonAddService(WPARAM wParam,LPARAM lParam)
+INT_PTR SubGroupMenuonAddService(WPARAM wParam, LPARAM lParam)
{
MENUITEMINFO *mii = (MENUITEMINFO* )wParam;
if (mii == NULL)
@@ -485,7 +485,7 @@ INT_PTR SubGroupMenuonAddService(WPARAM wParam,LPARAM lParam)
//called with:
//wparam - ownerdata
//lparam - lparam from winproc
-INT_PTR SubGroupMenuExecService(WPARAM wParam,LPARAM lParam)
+INT_PTR SubGroupMenuExecService(WPARAM wParam, LPARAM lParam)
{
if (wParam != 0) {
lpSubGroupMenuExecParam mmep = (lpSubGroupMenuExecParam)wParam;
@@ -499,7 +499,7 @@ INT_PTR SubGroupMenuExecService(WPARAM wParam,LPARAM lParam)
return 1;
}
-INT_PTR FreeOwnerDataSubGroupMenu (WPARAM wParam,LPARAM lParam)
+INT_PTR FreeOwnerDataSubGroupMenu (WPARAM wParam, LPARAM lParam)
{
lpSubGroupMenuExecParam mmep = (lpSubGroupMenuExecParam)lParam;
if (mmep != NULL){
@@ -512,7 +512,7 @@ INT_PTR FreeOwnerDataSubGroupMenu (WPARAM wParam,LPARAM lParam)
//wparam menu handle to pass to clc.c
//lparam WM_COMMAND HWND
-INT_PTR GroupMenuExecProxy(WPARAM wParam,LPARAM lParam)
+INT_PTR GroupMenuExecProxy(WPARAM wParam, LPARAM lParam)
{
SendMessage(lParam?(HWND)lParam:(HWND)pcli->hwndContactTree,WM_COMMAND,wParam,0);
return 0;
diff --git a/plugins/Clist_modern/src/hdr/modern_clc.h b/plugins/Clist_modern/src/hdr/modern_clc.h
index 5cffd61852..c9cc59fd75 100644
--- a/plugins/Clist_modern/src/hdr/modern_clc.h
+++ b/plugins/Clist_modern/src/hdr/modern_clc.h
@@ -413,7 +413,7 @@ void cli_SortCLC(HWND hwnd,ClcData *dat,int useInsertionSort);
int GetNewSelection(ClcGroup *group,int selection, int direction);
//clcmsgs.c
-LRESULT cli_ProcessExternalMessages(HWND hwnd,ClcData *dat,UINT msg,WPARAM wParam,LPARAM lParam);
+LRESULT cli_ProcessExternalMessages(HWND hwnd,ClcData *dat,UINT msg,WPARAM wParam, LPARAM lParam);
//clcutils.c
void cliRecalcScrollBar(HWND hwnd,ClcData *dat);
@@ -428,7 +428,7 @@ void LoadCLCOptions(HWND hwnd,ClcData *dat);
void CLCPaint_cliPaintClc(HWND hwnd,ClcData *dat,HDC hdc,RECT *rcPaint);
//clcopts.c
-int ClcOptInit(WPARAM wParam,LPARAM lParam);
+int ClcOptInit(WPARAM wParam, LPARAM lParam);
DWORD GetDefaultExStyle(void);
void GetFontSetting(int i,LOGFONT *lf,COLORREF *colour,BYTE *effect, COLORREF *eColour1,COLORREF *eColour2);
diff --git a/plugins/Clist_modern/src/hdr/modern_commonheaders.h b/plugins/Clist_modern/src/hdr/modern_commonheaders.h
index 320010f101..3e1f3bfec6 100644
--- a/plugins/Clist_modern/src/hdr/modern_commonheaders.h
+++ b/plugins/Clist_modern/src/hdr/modern_commonheaders.h
@@ -62,8 +62,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#define TRACET(str)
#endif
-#define SERVICE(serviceproc) static INT_PTR serviceproc(WPARAM wParam,LPARAM lParam)
-#define EVENTHOOK(eventhookproc) static int eventhookproc(WPARAM wParam,LPARAM lParam)
+#define SERVICE(serviceproc) static INT_PTR serviceproc(WPARAM wParam, LPARAM lParam)
+#define EVENTHOOK(eventhookproc) static int eventhookproc(WPARAM wParam, LPARAM lParam)
#define CLINTERFACE static
#include <windows.h>
diff --git a/plugins/Clist_modern/src/hdr/modern_commonprototypes.h b/plugins/Clist_modern/src/hdr/modern_commonprototypes.h
index e6998c3a95..4d2c7d4cb7 100644
--- a/plugins/Clist_modern/src/hdr/modern_commonprototypes.h
+++ b/plugins/Clist_modern/src/hdr/modern_commonprototypes.h
@@ -102,7 +102,7 @@ HANDLE RegisterIcolibIconHandle(char * szIcoID, char *szSectionName, char * sz
void CLUI_UpdateAeroGlass();
void CLUI_ChangeWindowMode();
BOOL CLUI_CheckOwnedByClui(HWND hwnd);
-INT_PTR CLUI_GetConnectingIconService(WPARAM wParam,LPARAM lParam);
+INT_PTR CLUI_GetConnectingIconService(WPARAM wParam, LPARAM lParam);
int CLUI_HideBehindEdge();
int CLUI_IconsChanged(WPARAM,LPARAM);
int CLUI_IsInMainWindow(HWND hwnd);
@@ -118,7 +118,7 @@ void CLUI_UpdateLayeredMode();
UINT_PTR CLUI_SafeSetTimer(HWND hwnd, int ID, int Timeout, TIMERPROC proc);
/* CLUIServices */
-int CLUIUnreadEmailCountChanged(WPARAM wParam,LPARAM lParam);
+int CLUIUnreadEmailCountChanged(WPARAM wParam, LPARAM lParam);
/* GDIPlus */
BOOL GDIPlus_AlphaBlend(HDC hdcDest,int nXOriginDest,int nYOriginDest,int nWidthDest,int nHeightDest,HDC hdcSrc,int nXOriginSrc,int nYOriginSrc,int nWidthSrc,int nHeightSrc, BLENDFUNCTION * blendFunction);
@@ -165,7 +165,7 @@ int ske_ReCreateBackImage(BOOL Erase,RECT *w);
int ske_RedrawCompleteWindow();
bool ske_ResetTextEffect(HDC);
bool ske_SelectTextEffect(HDC hdc, BYTE EffectID, DWORD FirstColor, DWORD SecondColor);
-INT_PTR ske_Service_DrawGlyph(WPARAM wParam,LPARAM lParam);
+INT_PTR ske_Service_DrawGlyph(WPARAM wParam, LPARAM lParam);
BOOL ske_SetRectOpaque(HDC memdc,RECT *fr, BOOL force = FALSE );
BOOL ske_SetRgnOpaque(HDC memdc,HRGN hrgn, BOOL force = FALSE );
BOOL ske_TextOut(HDC hdc, int x, int y, LPCTSTR lpString, int nCount);
@@ -182,12 +182,12 @@ __forceinline BOOL ske_DrawTextA(HDC hdc, char *lpString, int nCount, RECT *lpRe
/* CLUIFrames.c PROXIED */
int CLUIFrames_ActivateSubContainers(BOOL wParam);
-int CLUIFrames_OnClistResize_mod(WPARAM wParam,LPARAM lParam);
+int CLUIFrames_OnClistResize_mod(WPARAM wParam, LPARAM lParam);
int CLUIFrames_OnMoving( HWND, RECT *);
int CLUIFrames_OnShowHide( HWND hwnd, int mode );
int CLUIFrames_SetLayeredMode( BOOL fLayeredMode, HWND hwnd );
int CLUIFrames_SetParentForContainers( HWND parent );
-int CLUIFramesOnClistResize(WPARAM wParam,LPARAM lParam);
+int CLUIFramesOnClistResize(WPARAM wParam, LPARAM lParam);
FRAMEWND * FindFrameByItsHWND(HWND FrameHwnd); //cluiframes.c
@@ -199,7 +199,7 @@ int SetAlpha(BYTE Alpha);
/* others TODO: move above */
-int Docking_ProcessWindowMessage(WPARAM wParam,LPARAM lParam);
+int Docking_ProcessWindowMessage(WPARAM wParam, LPARAM lParam);
void DrawBackGround(HWND hwnd,HDC mhdc, HBITMAP hBmpBackground, COLORREF bkColour, DWORD backgroundBmpUse );
HRESULT BackgroundsLoadModule();
int BackgroundsUnloadModule();
@@ -215,7 +215,7 @@ DWORD mod_CalcHash(const char * a); /
HICON cliGetIconFromStatusMode(MCONTACT hContact, const char *szProto,int status); //clistmod.c
HICON GetMainStatusOverlay(int STATUS); //clc.c
int __fastcall CLVM_GetContactHiddenStatus(MCONTACT hContact, char *szStatus, ClcData *dat); //clcitems.c
-int BgStatusBarChange(WPARAM wParam,LPARAM lParam); //clcopts.c
+int BgStatusBarChange(WPARAM wParam, LPARAM lParam); //clcopts.c
int ClcDoProtoAck(MCONTACT wParam, ACKDATA *ack); //clc.c
int ModernSkinButtonDeleteAll(); //modernbutton.c
int GetContactCachedStatus(MCONTACT hContact); //clistsettings.c
@@ -226,10 +226,10 @@ int InitCustomMenus(void); //
int InitFramesMenus(void); //framesmenus.c
int LoadMoveToGroup(); //movetogroup.c
int LoadStatusBarData(); //modern_statusbar.c
-int MenuModulesLoaded(WPARAM wParam,LPARAM lParam); //clistmenu.c
-int MenuModulesShutdown(WPARAM wParam,LPARAM lParam); //clistmenu.c
-int MenuProcessCommand(WPARAM wParam,LPARAM lParam); //clistmenu.c
-int OnFrameTitleBarBackgroundChange(WPARAM wParam,LPARAM lParam); //cluiframes.c
+int MenuModulesLoaded(WPARAM wParam, LPARAM lParam); //clistmenu.c
+int MenuModulesShutdown(WPARAM wParam, LPARAM lParam); //clistmenu.c
+int MenuProcessCommand(WPARAM wParam, LPARAM lParam); //clistmenu.c
+int OnFrameTitleBarBackgroundChange(WPARAM wParam, LPARAM lParam); //cluiframes.c
int QueueAllFramesUpdating (BYTE); //cluiframes.c
int RecursiveDeleteMenu(HMENU hMenu); //clistmenus.c
int ModernSkinButtonRedrawAll(HDC hdc); //modern_button.c
@@ -238,10 +238,10 @@ int RestoreAllContactData(ClcData *dat); //c
int SkinSelector_DeleteMask(MODERNMASK *mm); //mod_skin_selector.c
int StoreAllContactData(ClcData *dat); //cache_func.c
-INT_PTR ToggleHideOffline(WPARAM wParam,LPARAM lParam); //contact.c
-INT_PTR ToggleGroups(WPARAM wParam,LPARAM lParam); //contact.c
-INT_PTR SetUseGroups(WPARAM wParam,LPARAM lParam); //contact.c
-INT_PTR ToggleSounds(WPARAM wParam,LPARAM lParam); //contact.c
+INT_PTR ToggleHideOffline(WPARAM wParam, LPARAM lParam); //contact.c
+INT_PTR ToggleGroups(WPARAM wParam, LPARAM lParam); //contact.c
+INT_PTR SetUseGroups(WPARAM wParam, LPARAM lParam); //contact.c
+INT_PTR ToggleSounds(WPARAM wParam, LPARAM lParam); //contact.c
void ClcOptionsChanged(); //clc.c
void Docking_GetMonitorRectFromWindow(HWND hWnd,RECT *rc); //Docking.c
void DrawAvatarImageWithGDIp(HDC hDestDC,int x, int y, DWORD width, DWORD height, HBITMAP hbmp, int x1, int y1, DWORD width1, DWORD height1,DWORD flag,BYTE alpha); //gdiplus.cpp
@@ -290,23 +290,23 @@ void cli_FreeContact( ClcContact* );
void cli_FreeGroup( ClcGroup* );
char* cli_GetGroupCountsText(ClcData *dat, ClcContact *contact);
void cli_ChangeContactIcon(MCONTACT hContact,int iIcon,int add);
-LRESULT cli_ProcessExternalMessages(HWND hwnd,ClcData *dat,UINT msg,WPARAM wParam,LPARAM lParam);
+LRESULT cli_ProcessExternalMessages(HWND hwnd,ClcData *dat,UINT msg,WPARAM wParam, LPARAM lParam);
struct CListEvent* cliCreateEvent( void );
struct 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(WPARAM wParam, LPARAM lParam);
BOOL CLUI__cliInvalidateRect(HWND hWnd, CONST RECT* lpRect,BOOL bErase );
int cliCompareContacts(const ClcContact *contact1,const ClcContact *contact2);
int cliFindItem(HWND hwnd, ClcData *dat, HANDLE hItem, ClcContact **contact, ClcGroup **subgroup, int *isVisible);
int cliTrayCalcChanged(const char *szChangedProto, int averageMode, int netProtoCount);
-int cliTrayIconPauseAutoHide(WPARAM wParam,LPARAM lParam);
+int cliTrayIconPauseAutoHide(WPARAM wParam, LPARAM lParam);
void cliCluiProtocolStatusChanged(int status,const char * proto);
HMENU cliBuildGroupPopupMenu(ClcGroup *group);
void cliInvalidateDisplayNameCacheEntry(MCONTACT hContact);
void cliCheckCacheItem(ClcCacheEntry *pdnce);
void cli_SaveStateAndRebuildList(HWND hwnd, ClcData *dat);
void CLUI_cli_LoadCluiGlobalOpts(void);
-INT_PTR cli_TrayIconProcessMessage(WPARAM wParam,LPARAM lParam);
+INT_PTR cli_TrayIconProcessMessage(WPARAM wParam, LPARAM lParam);
BOOL CLUI__cliInvalidateRect(HWND hWnd, CONST RECT* lpRect,BOOL bErase );
ClcContact* cliCreateClcContact( void );
diff --git a/plugins/Clist_modern/src/hdr/modern_skinengine.h b/plugins/Clist_modern/src/hdr/modern_skinengine.h
index 7811be127c..f920ba6072 100644
--- a/plugins/Clist_modern/src/hdr/modern_skinengine.h
+++ b/plugins/Clist_modern/src/hdr/modern_skinengine.h
@@ -139,7 +139,7 @@ private:
int ske_UnloadSkin(SKINOBJECTSLIST * Skin);
int ske_AddDescriptorToSkinObjectList (SKINOBJECTDESCRIPTOR *lpDescr, SKINOBJECTSLIST* Skin);
-INT_PTR ske_Service_DrawGlyph(WPARAM wParam,LPARAM lParam);
+INT_PTR ske_Service_DrawGlyph(WPARAM wParam, LPARAM lParam);
diff --git a/plugins/Clist_modern/src/hdr/modern_static_clui.h b/plugins/Clist_modern/src/hdr/modern_static_clui.h
index c57e9b408d..b381ba1d55 100644
--- a/plugins/Clist_modern/src/hdr/modern_static_clui.h
+++ b/plugins/Clist_modern/src/hdr/modern_static_clui.h
@@ -58,14 +58,14 @@ int ClcUnloadModule();
int ClcGetShortData(ClcData* pData, struct SHORTDATA *pShortData);
int ClcEnterDragToScroll(HWND hwnd, int Y);
-int CListMod_ContactListShutdownProc(WPARAM wParam,LPARAM lParam);
+int CListMod_ContactListShutdownProc(WPARAM wParam, LPARAM lParam);
int CListMod_HideWindow(HWND hwndContactList, int mode);
int CListSettings_GetCopyFromCache(ClcCacheEntry *pDest, DWORD flag);
int CListSettings_SetToCache(ClcCacheEntry *pSrc, DWORD flag);
int CLUIServices_LoadModule(void);
-INT_PTR CLUIServices_SortList(WPARAM wParam,LPARAM lParam);
+INT_PTR CLUIServices_SortList(WPARAM wParam, LPARAM lParam);
void Docking_GetMonitorRectFromWindow(HWND hWnd,RECT *rc);
@@ -100,7 +100,7 @@ int CLUI_SizingOnBorder(POINT pt, int size);
int CLUI_SmoothAlphaTransition(HWND hwnd, BYTE GoalAlpha, BOOL wParam);
int CLUI_TestCursorOnBorders();
-static int CLUI_CreateTimerForConnectingIcon(WPARAM wParam,LPARAM lParam);
+static int CLUI_CreateTimerForConnectingIcon(WPARAM wParam, LPARAM lParam);
static int CLUI_SmoothAlphaThreadTransition(HWND hwnd);
/* structs */
diff --git a/plugins/Clist_modern/src/hdr/modern_static_cluiframes_service.h b/plugins/Clist_modern/src/hdr/modern_static_cluiframes_service.h
index 7bfd947ced..fdcbe3192b 100644
--- a/plugins/Clist_modern/src/hdr/modern_static_cluiframes_service.h
+++ b/plugins/Clist_modern/src/hdr/modern_static_cluiframes_service.h
@@ -4,28 +4,28 @@
// TO BE INCLUDED ONLY TO modern_cluiframes.cpp
//////////////////////////////////////////////////////////////////////////
-static int _us_DoSetFramePaintProc(WPARAM wParam,LPARAM lParam);
-static int _us_DoAddFrame(WPARAM wParam,LPARAM lParam);
-static int _us_DoRemoveFrame(WPARAM wParam,LPARAM lParam);
-static int _us_DoSetFrameOptions(WPARAM wParam,LPARAM lParam);
-static INT_PTR _us_DoGetFrameOptions(WPARAM wParam,LPARAM lParam);
-static int _us_DoUpdateFrame(WPARAM wParam,LPARAM lParam);
-static int _us_DoShowHideFrameTitle(WPARAM wParam,LPARAM lParam);
-static int _us_DoShowTitles(WPARAM wParam,LPARAM lParam);
-static int _us_DoHideTitles(WPARAM wParam,LPARAM lParam);
-static int _us_DoShowHideFrame(WPARAM wParam,LPARAM lParam);
-static int _us_DoShowAllFrames(WPARAM wParam,LPARAM lParam);
-static int _us_DoLockFrame(WPARAM wParam,LPARAM lParam);
-static int _us_DoCollapseFrame(WPARAM wParam,LPARAM lParam);
-static int _us_DoSetFrameBorder(WPARAM wParam,LPARAM lParam);
-static int _us_DoSetFrameAlign(WPARAM wParam,LPARAM lParam);
-static int _us_DoMoveFrame(WPARAM wParam,LPARAM lParam);
-static int _us_DoMoveFrameUp(WPARAM wParam,LPARAM lParam);
-static int _us_DoMoveFrameDown(WPARAM wParam,LPARAM lParam);
-static int _us_DoAlignFrameTop(WPARAM wParam,LPARAM lParam);
-static int _us_DoAlignFrameClient(WPARAM wParam,LPARAM lParam);
-static int _us_DoAlignFrameBottom(WPARAM wParam,LPARAM lParam);
-static int _us_DoSetFrameFloat(WPARAM wParam,LPARAM lParam);
+static int _us_DoSetFramePaintProc(WPARAM wParam, LPARAM lParam);
+static int _us_DoAddFrame(WPARAM wParam, LPARAM lParam);
+static int _us_DoRemoveFrame(WPARAM wParam, LPARAM lParam);
+static int _us_DoSetFrameOptions(WPARAM wParam, LPARAM lParam);
+static INT_PTR _us_DoGetFrameOptions(WPARAM wParam, LPARAM lParam);
+static int _us_DoUpdateFrame(WPARAM wParam, LPARAM lParam);
+static int _us_DoShowHideFrameTitle(WPARAM wParam, LPARAM lParam);
+static int _us_DoShowTitles(WPARAM wParam, LPARAM lParam);
+static int _us_DoHideTitles(WPARAM wParam, LPARAM lParam);
+static int _us_DoShowHideFrame(WPARAM wParam, LPARAM lParam);
+static int _us_DoShowAllFrames(WPARAM wParam, LPARAM lParam);
+static int _us_DoLockFrame(WPARAM wParam, LPARAM lParam);
+static int _us_DoCollapseFrame(WPARAM wParam, LPARAM lParam);
+static int _us_DoSetFrameBorder(WPARAM wParam, LPARAM lParam);
+static int _us_DoSetFrameAlign(WPARAM wParam, LPARAM lParam);
+static int _us_DoMoveFrame(WPARAM wParam, LPARAM lParam);
+static int _us_DoMoveFrameUp(WPARAM wParam, LPARAM lParam);
+static int _us_DoMoveFrameDown(WPARAM wParam, LPARAM lParam);
+static int _us_DoAlignFrameTop(WPARAM wParam, LPARAM lParam);
+static int _us_DoAlignFrameClient(WPARAM wParam, LPARAM lParam);
+static int _us_DoAlignFrameBottom(WPARAM wParam, LPARAM lParam);
+static int _us_DoSetFrameFloat(WPARAM wParam, LPARAM lParam);
enum {
CFM_FIRST_MGS= WM_USER + 0x2FF,
@@ -92,70 +92,70 @@ BOOL CALLBACK ProcessCLUIFrameInternalMsg(HWND hwnd, UINT msg, WPARAM wParam, LP
return TRUE;
}
-static INT_PTR CLUIFrames_SetFramePaintProc(WPARAM wParam,LPARAM lParam)
+static INT_PTR CLUIFrames_SetFramePaintProc(WPARAM wParam, LPARAM lParam)
{ return ( pcli->hwndContactList ) ? SendMessage( pcli->hwndContactList, CFM_SETFRAMEPAINTPROC, wParam,lParam) : 0; }
-static INT_PTR CLUIFrames_AddFrame(WPARAM wParam,LPARAM lParam)
+static INT_PTR CLUIFrames_AddFrame(WPARAM wParam, LPARAM lParam)
{ return ( pcli->hwndContactList ) ? SendMessage( pcli->hwndContactList, CFM_ADDFRAME, wParam, lParam) : 0; }
-static INT_PTR CLUIFrames_RemoveFrame(WPARAM wParam,LPARAM lParam)
+static INT_PTR CLUIFrames_RemoveFrame(WPARAM wParam, LPARAM lParam)
{ return ( pcli->hwndContactList ) ? SendMessage( pcli->hwndContactList, CFM_REMOVEFRAME, wParam, lParam) : 0; }
-static INT_PTR CLUIFrames_SetFrameOptions(WPARAM wParam,LPARAM lParam)
+static INT_PTR CLUIFrames_SetFrameOptions(WPARAM wParam, LPARAM lParam)
{ return ( pcli->hwndContactList ) ? SendMessage( pcli->hwndContactList, CFM_SETFRAMEOPTIONS, wParam, lParam) : 0; }
-static INT_PTR CLUIFrames_GetFrameOptions(WPARAM wParam,LPARAM lParam)
+static INT_PTR CLUIFrames_GetFrameOptions(WPARAM wParam, LPARAM lParam)
{ return ( pcli->hwndContactList ) ? SendMessage( pcli->hwndContactList, CFM_GETFRAMEOPTIONS, wParam, lParam) : 0; }
-static INT_PTR CLUIFrames_UpdateFrame(WPARAM wParam,LPARAM lParam)
+static INT_PTR CLUIFrames_UpdateFrame(WPARAM wParam, LPARAM lParam)
{ return ( pcli->hwndContactList ) ? SendMessage( pcli->hwndContactList, CFM_UPDATEFRAME, wParam, lParam) : 0; }
-static INT_PTR CLUIFrames_ShowHideFrameTitle(WPARAM wParam,LPARAM lParam)
+static INT_PTR CLUIFrames_ShowHideFrameTitle(WPARAM wParam, LPARAM lParam)
{ return ( pcli->hwndContactList ) ? SendMessage( pcli->hwndContactList, CFM_SHOWHIDEFRAMETITLE, wParam, lParam) : 0; }
-static INT_PTR CLUIFrames_ShowTitles(WPARAM wParam,LPARAM lParam)
+static INT_PTR CLUIFrames_ShowTitles(WPARAM wParam, LPARAM lParam)
{ return ( pcli->hwndContactList ) ? SendMessage( pcli->hwndContactList, CFM_SHOWTITLES, wParam, lParam) : 0; }
-static INT_PTR CLUIFrames_HideTitles(WPARAM wParam,LPARAM lParam)
+static INT_PTR CLUIFrames_HideTitles(WPARAM wParam, LPARAM lParam)
{ return ( pcli->hwndContactList ) ? SendMessage( pcli->hwndContactList, CFM_HIDETITLES, wParam, lParam) : 0; }
-static INT_PTR CLUIFrames_ShowHideFrame(WPARAM wParam,LPARAM lParam)
+static INT_PTR CLUIFrames_ShowHideFrame(WPARAM wParam, LPARAM lParam)
{ return ( pcli->hwndContactList ) ? SendMessage( pcli->hwndContactList, CFM_SHOWHIDEFRAME, wParam, lParam) : 0; }
-static INT_PTR CLUIFrames_ShowAllFrames(WPARAM wParam,LPARAM lParam)
+static INT_PTR CLUIFrames_ShowAllFrames(WPARAM wParam, LPARAM lParam)
{ return ( pcli->hwndContactList ) ? SendMessage( pcli->hwndContactList, CFM_SHOWALL, wParam, lParam) : 0; }
-static INT_PTR CLUIFrames_LockFrame(WPARAM wParam,LPARAM lParam)
+static INT_PTR CLUIFrames_LockFrame(WPARAM wParam, LPARAM lParam)
{ return ( pcli->hwndContactList ) ? SendMessage( pcli->hwndContactList, CFM_LOCKFRAME, wParam, lParam) : 0; }
-static INT_PTR CLUIFrames_CollapseFrame(WPARAM wParam,LPARAM lParam)
+static INT_PTR CLUIFrames_CollapseFrame(WPARAM wParam, LPARAM lParam)
{ return ( pcli->hwndContactList ) ? SendMessage( pcli->hwndContactList, CFM_COLLAPSEFRAME, wParam, lParam) : 0; }
-static INT_PTR CLUIFrames_SetFrameBorder(WPARAM wParam,LPARAM lParam)
+static INT_PTR CLUIFrames_SetFrameBorder(WPARAM wParam, LPARAM lParam)
{ return ( pcli->hwndContactList ) ? SendMessage( pcli->hwndContactList, CFM_SETFRAMEBORDER, wParam, lParam) : 0; }
-static INT_PTR CLUIFrames_SetFrameAlign(WPARAM wParam,LPARAM lParam)
+static INT_PTR CLUIFrames_SetFrameAlign(WPARAM wParam, LPARAM lParam)
{ return ( pcli->hwndContactList ) ? SendMessage( pcli->hwndContactList, CFM_SETFRAMEALIGN, wParam, lParam) : 0; }
-static INT_PTR CLUIFrames_MoveFrame(WPARAM wParam,LPARAM lParam)
+static INT_PTR CLUIFrames_MoveFrame(WPARAM wParam, LPARAM lParam)
{ return ( pcli->hwndContactList ) ? SendMessage( pcli->hwndContactList, CFM_MOVEFRAME, wParam, lParam) : 0; }
-static INT_PTR CLUIFrames_MoveFrameUp(WPARAM wParam,LPARAM lParam)
+static INT_PTR CLUIFrames_MoveFrameUp(WPARAM wParam, LPARAM lParam)
{ return ( pcli->hwndContactList ) ? SendMessage( pcli->hwndContactList, CFM_MOVEFRAMEUP, wParam, lParam) : 0; }
-static INT_PTR CLUIFrames_MoveFrameDown(WPARAM wParam,LPARAM lParam)
+static INT_PTR CLUIFrames_MoveFrameDown(WPARAM wParam, LPARAM lParam)
{ return ( pcli->hwndContactList ) ? SendMessage( pcli->hwndContactList, CFM_MOVEFRAMEDOWN, wParam, lParam) : 0; }
-static INT_PTR CLUIFrames_AlignFrameTop(WPARAM wParam,LPARAM lParam)
+static INT_PTR CLUIFrames_AlignFrameTop(WPARAM wParam, LPARAM lParam)
{ return ( pcli->hwndContactList ) ? SendMessage( pcli->hwndContactList, CFM_ALIGNFRAMETOP, wParam, lParam) : 0; }
-static INT_PTR CLUIFrames_AlignFrameClient(WPARAM wParam,LPARAM lParam)
+static INT_PTR CLUIFrames_AlignFrameClient(WPARAM wParam, LPARAM lParam)
{ return ( pcli->hwndContactList ) ? SendMessage( pcli->hwndContactList, CFM_ALIGNFRAMEBOTTOM, wParam, lParam) : 0; }
-static INT_PTR CLUIFrames_AlignFrameBottom(WPARAM wParam,LPARAM lParam)
+static INT_PTR CLUIFrames_AlignFrameBottom(WPARAM wParam, LPARAM lParam)
{ return ( pcli->hwndContactList ) ? SendMessage( pcli->hwndContactList, CFM_ALIGNFRAMECLIENT, wParam, lParam) : 0; }
-static INT_PTR CLUIFrames_SetFrameFloat(WPARAM wParam,LPARAM lParam)
+static INT_PTR CLUIFrames_SetFrameFloat(WPARAM wParam, LPARAM lParam)
{ return ( pcli->hwndContactList ) ? SendMessage( pcli->hwndContactList, CFM_SETFRAMEFLOAT, wParam, lParam) : 0; }
static void CreateCluiFramesServices()
diff --git a/plugins/Clist_modern/src/modern_aniavatars.cpp b/plugins/Clist_modern/src/modern_aniavatars.cpp
index 03bd11a014..249a67f0ab 100644
--- a/plugins/Clist_modern/src/modern_aniavatars.cpp
+++ b/plugins/Clist_modern/src/modern_aniavatars.cpp
@@ -170,7 +170,7 @@ static LRESULT CALLBACK _AniAva_WndProc(HWND hwnd, UINT msg, WPARAM wParam, LPAR
/// IMPLEMENTATION
-int _AniAva_OnModulesUnload(WPARAM wParam,LPARAM lParam)
+int _AniAva_OnModulesUnload(WPARAM wParam, LPARAM lParam)
{
SetEvent(s_hExitEvent);
return 0;
diff --git a/plugins/Clist_modern/src/modern_clc.cpp b/plugins/Clist_modern/src/modern_clc.cpp
index ac75da25a4..74817ffe3f 100644
--- a/plugins/Clist_modern/src/modern_clc.cpp
+++ b/plugins/Clist_modern/src/modern_clc.cpp
@@ -36,8 +36,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include "m_modernopt.h"
-int ModernOptInit(WPARAM wParam,LPARAM lParam);
-int ModernSkinOptInit(WPARAM wParam,LPARAM lParam);
+int ModernOptInit(WPARAM wParam, LPARAM lParam);
+int ModernSkinOptInit(WPARAM wParam, LPARAM lParam);
/*
* Private module variables
@@ -57,9 +57,9 @@ static ClcContact *hitcontact = NULL;
HANDLE hSkinFolder;
TCHAR SkinsFolder[MAX_PATH];
-static int clcHookSmileyAddOptionsChanged(WPARAM wParam,LPARAM lParam);
+static int clcHookSmileyAddOptionsChanged(WPARAM wParam, LPARAM lParam);
static int clcHookIconsChanged(WPARAM wParam, LPARAM lParam);
-static int clcHookBkgndConfigChanged(WPARAM wParam,LPARAM lParam);
+static int clcHookBkgndConfigChanged(WPARAM wParam, LPARAM lParam);
static int clcProceedDragToScroll(HWND hwnd, int Y);
static int clcExitDragToScroll();
@@ -152,7 +152,7 @@ static int clcHookModulesLoaded(WPARAM wParam, LPARAM lParam)
return 0;
}
-static int clcHookSmileyAddOptionsChanged(WPARAM wParam,LPARAM lParam)
+static int clcHookSmileyAddOptionsChanged(WPARAM wParam, LPARAM lParam)
{
if (MirandaExiting()) return 0;
pcli->pfnClcBroadcast( CLM_AUTOREBUILD, 0, 0);
@@ -194,7 +194,7 @@ static int clcHookIconsChanged(WPARAM wParam, LPARAM lParam)
return 0;
}
-static int clcHookSettingChanged(WPARAM wParam,LPARAM lParam)
+static int clcHookSettingChanged(WPARAM wParam, LPARAM lParam)
{
if (MirandaExiting())
return 0;
@@ -267,7 +267,7 @@ static int clcHookSettingChanged(WPARAM wParam,LPARAM lParam)
return 0;
}
-static int clcHookDbEventAdded(WPARAM wParam,LPARAM lParam)
+static int clcHookDbEventAdded(WPARAM wParam, LPARAM lParam)
{
g_CluiData.t_now = time(NULL);
if (wParam && lParam) {
@@ -283,7 +283,7 @@ static int clcHookDbEventAdded(WPARAM wParam,LPARAM lParam)
return 0;
}
-static int clcHookBkgndConfigChanged(WPARAM wParam,LPARAM lParam)
+static int clcHookBkgndConfigChanged(WPARAM wParam, LPARAM lParam)
{
pcli->pfnClcOptionsChanged();
return 0;
@@ -1650,21 +1650,20 @@ static LRESULT clcOnIntmApparentModeChanged(ClcData *dat, HWND hwnd, UINT msg, W
return corecli.pfnContactListControlWndProc(hwnd, msg, wParam, lParam);
}
-static LRESULT clcOnIntmStatusMsgChanged(ClcData *dat, HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
+static LRESULT clcOnIntmStatusMsgChanged(ClcData *dat, HWND hwnd, UINT msg, WPARAM hContact, LPARAM lParam)
{
ClcContact *contact;
- MCONTACT hContact = wParam;
if (hContact == NULL || IsHContactInfo(hContact) || IsHContactGroup(hContact))
- return corecli.pfnContactListControlWndProc(hwnd, msg, wParam, lParam);
+ return corecli.pfnContactListControlWndProc(hwnd, msg, hContact, lParam);
if (!FindItem(hwnd,dat,hContact,&contact,NULL,NULL,FALSE))
- return corecli.pfnContactListControlWndProc(hwnd, msg, wParam, lParam);
+ return corecli.pfnContactListControlWndProc(hwnd, msg, hContact, lParam);
if (contact)//!IsBadWritePtr(contact, sizeof(ClcContact)))
{
Cache_GetText(dat,contact,1);
cliRecalcScrollBar(hwnd,dat);
PostMessage(hwnd,INTM_INVALIDATE, 0, 0);
}
- return corecli.pfnContactListControlWndProc(hwnd, msg, wParam, lParam);
+ return corecli.pfnContactListControlWndProc(hwnd, msg, hContact, lParam);
}
static LRESULT clcOnIntmNotOnListChanged(ClcData *dat, HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
diff --git a/plugins/Clist_modern/src/modern_clcmsgs.cpp b/plugins/Clist_modern/src/modern_clcmsgs.cpp
index d048f249a5..910776628d 100644
--- a/plugins/Clist_modern/src/modern_clcmsgs.cpp
+++ b/plugins/Clist_modern/src/modern_clcmsgs.cpp
@@ -28,7 +28,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
//processing of all the CLM_ messages incoming
-LRESULT cli_ProcessExternalMessages(HWND hwnd,ClcData *dat,UINT msg,WPARAM wParam,LPARAM lParam)
+LRESULT cli_ProcessExternalMessages(HWND hwnd,ClcData *dat,UINT msg,WPARAM wParam, LPARAM lParam)
{
ClcContact *contact;
ClcGroup *group;
diff --git a/plugins/Clist_modern/src/modern_clistmenus.cpp b/plugins/Clist_modern/src/modern_clistmenus.cpp
index c93d4982cb..24f14b2b03 100644
--- a/plugins/Clist_modern/src/modern_clistmenus.cpp
+++ b/plugins/Clist_modern/src/modern_clistmenus.cpp
@@ -33,7 +33,7 @@ int UnloadFavoriteContactMenu();
#pragma hdrstop
-INT_PTR CloseAction(WPARAM wParam,LPARAM lParam)
+INT_PTR CloseAction(WPARAM wParam, LPARAM lParam)
{
int k;
g_CluiData.bSTATE = STATE_PREPEARETOEXIT; // workaround for avatar service and other wich destroys service on OK_TOEXIT
@@ -92,7 +92,7 @@ static IconItem iconList[] =
{ LPGEN("Contact rate High"), "Rate4", IDI_FAVORITE_3 }
};
-static int FAV_OnContactMenuBuild(WPARAM wParam,LPARAM lParam)
+static int FAV_OnContactMenuBuild(WPARAM wParam, LPARAM lParam)
{
BYTE bContactRate = db_get_b(wParam, "CList", "Rate", 0);
if ( bContactRate > SIZEOF(rates)-1)
diff --git a/plugins/Clist_modern/src/modern_clistmod.cpp b/plugins/Clist_modern/src/modern_clistmod.cpp
index 943fde598e..89fea99c57 100644
--- a/plugins/Clist_modern/src/modern_clistmod.cpp
+++ b/plugins/Clist_modern/src/modern_clistmod.cpp
@@ -34,17 +34,17 @@ int OnLoadLangpack(WPARAM, LPARAM);
int CListMod_HideWindow(HWND hwndContactList, int mode);
void GroupMenus_Init(void);
-int AddMainMenuItem(WPARAM wParam,LPARAM lParam);
-int AddContactMenuItem(WPARAM wParam,LPARAM lParam);
+int AddMainMenuItem(WPARAM wParam, LPARAM lParam);
+int AddContactMenuItem(WPARAM wParam, LPARAM lParam);
void UninitCListEvents(void);
-int ContactAdded(WPARAM wParam,LPARAM lParam);
-int GetContactDisplayName(WPARAM wParam,LPARAM lParam);
-int CListOptInit(WPARAM wParam,LPARAM lParam);
-int SkinOptInit(WPARAM wParam,LPARAM lParam);
-int ModernSkinOptInit(WPARAM wParam,LPARAM lParam);
+int ContactAdded(WPARAM wParam, LPARAM lParam);
+int GetContactDisplayName(WPARAM wParam, LPARAM lParam);
+int CListOptInit(WPARAM wParam, LPARAM lParam);
+int SkinOptInit(WPARAM wParam, LPARAM lParam);
+int ModernSkinOptInit(WPARAM wParam, LPARAM lParam);
int EventsProcessContactDoubleClick(MCONTACT hContact);
-INT_PTR TrayIconPauseAutoHide(WPARAM wParam,LPARAM lParam);
+INT_PTR TrayIconPauseAutoHide(WPARAM wParam, LPARAM lParam);
void InitTrayMenus(void);
void UninitTrayMenu();
@@ -140,7 +140,7 @@ void UnLoadContactListModule() //unhooks noncritical events
UninitCustomMenus();
}
-int CListMod_ContactListShutdownProc(WPARAM wParam,LPARAM lParam)
+int CListMod_ContactListShutdownProc(WPARAM wParam, LPARAM lParam)
{
FreeDisplayNameCache();
return 0;
@@ -342,7 +342,7 @@ int GetWindowVisibleState(HWND hWnd, int iStepX, int iStepY)
BYTE g_bCalledFromShowHide = 0;
-int cliShowHide(WPARAM wParam,LPARAM lParam)
+int cliShowHide(WPARAM wParam, LPARAM lParam)
{
BOOL bShow = FALSE;
diff --git a/plugins/Clist_modern/src/modern_clistsettings.cpp b/plugins/Clist_modern/src/modern_clistsettings.cpp
index 97b18e1b7b..5db5e9857f 100644
--- a/plugins/Clist_modern/src/modern_clistsettings.cpp
+++ b/plugins/Clist_modern/src/modern_clistsettings.cpp
@@ -414,19 +414,17 @@ int GetContactCachedStatus(MCONTACT hContact)
return pdnce___GetStatus( cacheEntry );
}
-int ContactAdded(WPARAM wParam,LPARAM lParam)
+int ContactAdded(WPARAM hContact, LPARAM lParam)
{
if (!MirandaExiting()) {
- MCONTACT hContact = wParam;
cli_ChangeContactIcon(hContact,pcli->pfnIconFromStatusMode((char*)GetContactCachedProtocol(hContact),ID_STATUS_OFFLINE,hContact),1); ///by FYR
pcli->pfnSortContacts();
}
return 0;
}
-int ContactSettingChanged(WPARAM wParam,LPARAM lParam)
+int ContactSettingChanged(WPARAM hContact, LPARAM lParam)
{
- MCONTACT hContact = wParam;
if (MirandaExiting() || !pcli || !clistCache || hContact == NULL)
return 0;
@@ -467,7 +465,7 @@ int ContactSettingChanged(WPARAM wParam,LPARAM lParam)
if ((db_get_w(NULL,"CList","SecondLineType",0) == TEXT_STATUS_MESSAGE || db_get_w(NULL,"CList","ThirdLineType",0) == TEXT_STATUS_MESSAGE) && pdnce->hContact && pdnce->m_cache_cszProto)
amRequestAwayMsg(hContact);
- pcli->pfnClcBroadcast(INTM_STATUSCHANGED, wParam, 0);
+ pcli->pfnClcBroadcast(INTM_STATUSCHANGED, hContact, 0);
cli_ChangeContactIcon(hContact, pcli->pfnIconFromStatusMode(cws->szModule, cws->value.wVal, hContact), 0); //by FYR
pcli->pfnSortContacts();
}
@@ -494,7 +492,7 @@ int ContactSettingChanged(WPARAM wParam,LPARAM lParam)
else if (!strcmp(cws->szSetting,"Hidden")) {
InvalidateDNCEbyPointer(hContact,pdnce,cws->value.type);
if (cws->value.type == DBVT_DELETED || cws->value.bVal == 0) {
- char *szProto = GetContactProto(wParam);
+ char *szProto = GetContactProto(hContact);
cli_ChangeContactIcon(hContact,pcli->pfnIconFromStatusMode(szProto,
szProto == NULL ? ID_STATUS_OFFLINE : db_get_w(hContact,szProto,"Status",ID_STATUS_OFFLINE), hContact),1); //by FYR
}
diff --git a/plugins/Clist_modern/src/modern_clisttray.cpp b/plugins/Clist_modern/src/modern_clisttray.cpp
index 33be64eb1e..8a24bab33f 100644
--- a/plugins/Clist_modern/src/modern_clisttray.cpp
+++ b/plugins/Clist_modern/src/modern_clisttray.cpp
@@ -28,7 +28,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include "hdr/modern_commonprototypes.h"
#include "hdr/modern_statusbar.h"
-int cliShowHide(WPARAM wParam,LPARAM lParam);
+int cliShowHide(WPARAM wParam, LPARAM lParam);
int g_mutex_bOnTrayRightClick = 0;
BOOL g_bMultiConnectionMode = FALSE;
@@ -286,7 +286,7 @@ static VOID CALLBACK TrayIconAutoHideTimer(HWND hwnd,UINT message,UINT_PTR idEve
SetProcessWorkingSetSize(GetCurrentProcess(),-1,-1);
}
-int cliTrayIconPauseAutoHide(WPARAM wParam,LPARAM lParam)
+int cliTrayIconPauseAutoHide(WPARAM wParam, LPARAM lParam)
{
if ( db_get_b(NULL, "CList", "AutoHide", SETTING_AUTOHIDE_DEFAULT)) {
if (GetActiveWindow() != pcli->hwndContactList && GetWindow(GetParent(GetActiveWindow()),GW_OWNER) != pcli->hwndContactList) {
@@ -309,7 +309,7 @@ void DestroyTrayMenu(HMENU hMenu)
DestroyMenu(hMenu);
}
-INT_PTR cli_TrayIconProcessMessage(WPARAM wParam,LPARAM lParam)
+INT_PTR cli_TrayIconProcessMessage(WPARAM wParam, LPARAM lParam)
{
MSG *msg = (MSG*)wParam;
switch(msg->message) {
@@ -399,13 +399,13 @@ wparam = handle to the menu item returned by MS_CLIST_ADDCONTACTMENUITEM
return 0 on success.
*/
-static INT_PTR RemoveTrayMenuItem(WPARAM wParam,LPARAM lParam)
+static INT_PTR RemoveTrayMenuItem(WPARAM wParam, LPARAM lParam)
{
CallService(MO_REMOVEMENUITEM,wParam,0);
return 0;
}
-static INT_PTR BuildTrayMenu(WPARAM wParam,LPARAM lParam)
+static INT_PTR BuildTrayMenu(WPARAM wParam, LPARAM lParam)
{
HMENU hMenu = CreatePopupMenu();
int tick = GetTickCount();
@@ -420,7 +420,7 @@ static INT_PTR BuildTrayMenu(WPARAM wParam,LPARAM lParam)
return (INT_PTR)hMenu;
}
-static INT_PTR AddTrayMenuItem(WPARAM wParam,LPARAM lParam)
+static INT_PTR AddTrayMenuItem(WPARAM wParam, LPARAM lParam)
{
CLISTMENUITEM *mi = (CLISTMENUITEM*)lParam;
@@ -445,7 +445,7 @@ static INT_PTR AddTrayMenuItem(WPARAM wParam,LPARAM lParam)
return (INT_PTR)op.Handle;
}
-INT_PTR TrayMenuonAddService(WPARAM wParam,LPARAM lParam)
+INT_PTR TrayMenuonAddService(WPARAM wParam, LPARAM lParam)
{
MENUITEMINFO *mii = (MENUITEMINFO* )wParam;
if (mii == NULL)
@@ -474,7 +474,7 @@ INT_PTR TrayMenuonAddService(WPARAM wParam,LPARAM lParam)
//called with:
//wparam - ownerdata
//lparam - lparam from winproc
-INT_PTR TrayMenuExecService(WPARAM wParam,LPARAM lParam)
+INT_PTR TrayMenuExecService(WPARAM wParam, LPARAM lParam)
{
if (wParam != 0) {
lpTrayMenuExecParam mmep = (lpTrayMenuExecParam)wParam;
@@ -487,7 +487,7 @@ INT_PTR TrayMenuExecService(WPARAM wParam,LPARAM lParam)
return(1);
}
-INT_PTR FreeOwnerDataTrayMenu(WPARAM wParam,LPARAM lParam)
+INT_PTR FreeOwnerDataTrayMenu(WPARAM wParam, LPARAM lParam)
{
lpTrayMenuExecParam mmep = (lpTrayMenuExecParam)lParam;
if (mmep != NULL) {
diff --git a/plugins/Clist_modern/src/modern_clui.cpp b/plugins/Clist_modern/src/modern_clui.cpp
index 0887cff8b8..23c823c238 100644
--- a/plugins/Clist_modern/src/modern_clui.cpp
+++ b/plugins/Clist_modern/src/modern_clui.cpp
@@ -144,7 +144,7 @@ void CLUI::cliOnCreateClc(void)
m_pCLUI->CreateCluiFrames();
}
-int CLUI::OnEvent_ModulesLoaded(WPARAM wParam,LPARAM lParam)
+int CLUI::OnEvent_ModulesLoaded(WPARAM wParam, LPARAM lParam)
{
g_CluiData.bMetaAvail = ServiceExists(MS_MC_GETDEFAULTCONTACT) ? TRUE : FALSE;
setlocale(LC_ALL, ""); //fix for case insensitive comparing
@@ -167,7 +167,7 @@ int CLUI::OnEvent_ModulesLoaded(WPARAM wParam,LPARAM lParam)
return 0;
}
-int CLUI::OnEvent_FontReload(WPARAM wParam,LPARAM lParam)
+int CLUI::OnEvent_FontReload(WPARAM wParam, LPARAM lParam)
{
pcli->pfnClcBroadcast(INTM_RELOADOPTIONS, wParam, lParam);
@@ -218,7 +218,7 @@ int CLUI::OnEvent_ContactMenuPreBuild(WPARAM wParam, LPARAM lParam)
return 0;
}
-INT_PTR CLUI::Service_ShowMainMenu(WPARAM wParam,LPARAM lParam)
+INT_PTR CLUI::Service_ShowMainMenu(WPARAM wParam, LPARAM lParam)
{
HMENU hMenu = (HMENU)CallService(MS_CLIST_MENUGETMAIN, 0, 0);
@@ -228,7 +228,7 @@ INT_PTR CLUI::Service_ShowMainMenu(WPARAM wParam,LPARAM lParam)
return 0;
}
-INT_PTR CLUI::Service_ShowStatusMenu(WPARAM wParam,LPARAM lParam)
+INT_PTR CLUI::Service_ShowStatusMenu(WPARAM wParam, LPARAM lParam)
{
HMENU hMenu = (HMENU)CallService(MS_CLIST_MENUGETSTATUS, 0, 0);
@@ -238,23 +238,19 @@ INT_PTR CLUI::Service_ShowStatusMenu(WPARAM wParam,LPARAM lParam)
return 0;
}
-INT_PTR CLUI::Service_Menu_ShowContactAvatar(WPARAM wParam,LPARAM lParam)
+INT_PTR CLUI::Service_Menu_ShowContactAvatar(WPARAM hContact, LPARAM lParam)
{
- MCONTACT hContact = wParam;
-
db_set_b(hContact, "CList", "HideContactAvatar", 0);
- pcli->pfnClcBroadcast( INTM_AVATARCHANGED,wParam,0);
+ pcli->pfnClcBroadcast( INTM_AVATARCHANGED, hContact, 0);
return 0;
}
-INT_PTR CLUI::Service_Menu_HideContactAvatar(WPARAM wParam,LPARAM lParam)
+INT_PTR CLUI::Service_Menu_HideContactAvatar(WPARAM hContact, LPARAM lParam)
{
- MCONTACT hContact = wParam;
-
db_set_b(hContact, "CList", "HideContactAvatar", 1);
- pcli->pfnClcBroadcast( INTM_AVATARCHANGED,wParam,0);
+ pcli->pfnClcBroadcast( INTM_AVATARCHANGED, hContact, 0);
return 0;
}
@@ -1010,7 +1006,7 @@ static HICON CLUI_GetConnectingIconForProto(char *szAccoName, int idx)
return LoadSmallIcon(g_hInst, -IDI_ICQC1-idx);
}
-INT_PTR CLUI_GetConnectingIconService(WPARAM wParam,LPARAM lParam)
+INT_PTR CLUI_GetConnectingIconService(WPARAM wParam, LPARAM lParam)
{
HICON hIcon = NULL;
@@ -1036,7 +1032,7 @@ INT_PTR CLUI_GetConnectingIconService(WPARAM wParam,LPARAM lParam)
return NULL;
}
-static int CLUI_CreateTimerForConnectingIcon(WPARAM wParam,LPARAM lParam)
+static int CLUI_CreateTimerForConnectingIcon(WPARAM wParam, LPARAM lParam)
{
int status = (int)wParam;
char *szProto = (char*)lParam;
@@ -1295,7 +1291,7 @@ int CLUI_SyncGetShortData(WPARAM wParam, LPARAM lParam)
return ClcGetShortData(dat,(struct SHORTDATA *)lParam);
}
-int CLUI_IconsChanged(WPARAM wParam,LPARAM lParam)
+int CLUI_IconsChanged(WPARAM wParam, LPARAM lParam)
{
if (MirandaExiting())
return 0;
diff --git a/plugins/Clist_modern/src/modern_cluiservices.cpp b/plugins/Clist_modern/src/modern_cluiservices.cpp
index 69b5e6b247..84a56f3f6c 100644
--- a/plugins/Clist_modern/src/modern_cluiservices.cpp
+++ b/plugins/Clist_modern/src/modern_cluiservices.cpp
@@ -27,7 +27,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
INT_PTR CListTray_GetGlobalStatus(WPARAM wparam,LPARAM lparam);
-int CLUIUnreadEmailCountChanged(WPARAM wParam,LPARAM lParam)
+int CLUIUnreadEmailCountChanged(WPARAM wParam, LPARAM lParam)
{
CallService(MS_SKINENG_INVALIDATEFRAMEIMAGE, 0 ,0);
return 0;
@@ -40,7 +40,7 @@ void cliCluiProtocolStatusChanged(int status,const char * proto)
pcli->pfnTrayIconUpdateBase(proto);
}
-static INT_PTR MetaSupportCheck(WPARAM wParam,LPARAM lParam)
+static INT_PTR MetaSupportCheck(WPARAM wParam, LPARAM lParam)
{
return 1;
}
diff --git a/plugins/Clist_modern/src/modern_contact.cpp b/plugins/Clist_modern/src/modern_contact.cpp
index 9607ed864b..db1fe14218 100644
--- a/plugins/Clist_modern/src/modern_contact.cpp
+++ b/plugins/Clist_modern/src/modern_contact.cpp
@@ -163,12 +163,12 @@ int cliCompareContacts(const ClcContact *contact1,const ClcContact *contact2)
#undef SAFESTRING
-INT_PTR ToggleHideOffline(WPARAM wParam,LPARAM lParam)
+INT_PTR ToggleHideOffline(WPARAM wParam, LPARAM lParam)
{
return pcli->pfnSetHideOffline((WPARAM)-1,0);
}
-INT_PTR ToggleGroups(WPARAM wParam,LPARAM lParam)
+INT_PTR ToggleGroups(WPARAM wParam, LPARAM lParam)
{
db_set_b(NULL, "CList", "UseGroups",
(BYTE) !db_get_b(NULL, "CList", "UseGroups", SETTING_USEGROUPS_DEFAULT));
@@ -189,7 +189,7 @@ INT_PTR SetUseGroups(WPARAM wParam, LPARAM lParam)
return 0;
}
-INT_PTR ToggleSounds(WPARAM wParam,LPARAM lParam)
+INT_PTR ToggleSounds(WPARAM wParam, LPARAM lParam)
{
db_set_b(NULL, "Skin", "UseSound",
(BYTE) !db_get_b(NULL, "Skin", "UseSound", SETTING_ENABLESOUNDS_DEFAULT ));
diff --git a/plugins/Clist_modern/src/modern_docking.cpp b/plugins/Clist_modern/src/modern_docking.cpp
index 6b02a383d7..32aac83df5 100644
--- a/plugins/Clist_modern/src/modern_docking.cpp
+++ b/plugins/Clist_modern/src/modern_docking.cpp
@@ -94,12 +94,12 @@ static void Docking_AdjustPosition(HWND hwnd,RECT *rcDisplay,RECT *rc)
*rc = abd.rc;
}
-int Docking_IsDocked(WPARAM wParam,LPARAM lParam)
+int Docking_IsDocked(WPARAM wParam, LPARAM lParam)
{
return g_CluiData.fDocked;
}
-int Docking_ProcessWindowMessage(WPARAM wParam,LPARAM lParam)
+int Docking_ProcessWindowMessage(WPARAM wParam, LPARAM lParam)
{
APPBARDATA abd;
static int draggingTitle;
diff --git a/plugins/Clist_modern/src/modern_gettextasync.cpp b/plugins/Clist_modern/src/modern_gettextasync.cpp
index 32ab8042f8..316152c19e 100644
--- a/plugins/Clist_modern/src/modern_gettextasync.cpp
+++ b/plugins/Clist_modern/src/modern_gettextasync.cpp
@@ -164,7 +164,7 @@ void gtaRenewText(MCONTACT hContact)
gtaAddRequest(NULL,NULL, hContact);
}
-int gtaOnModulesUnload(WPARAM wParam,LPARAM lParam)
+int gtaOnModulesUnload(WPARAM wParam, LPARAM lParam)
{
SetEvent(hgtaWakeupEvent);
return 0;
diff --git a/plugins/Clist_modern/src/modern_keyboard.cpp b/plugins/Clist_modern/src/modern_keyboard.cpp
index 4cc0cb54f2..e6fd5d1f0e 100644
--- a/plugins/Clist_modern/src/modern_keyboard.cpp
+++ b/plugins/Clist_modern/src/modern_keyboard.cpp
@@ -27,13 +27,13 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
int InitSkinHotKeys(void);
-INT_PTR hkCloseMiranda(WPARAM wParam,LPARAM lParam)
+INT_PTR hkCloseMiranda(WPARAM wParam, LPARAM lParam)
{
CallService("CloseAction", 0, 0);
return 0;
}
-INT_PTR hkRestoreStatus(WPARAM wParam,LPARAM lParam)
+INT_PTR hkRestoreStatus(WPARAM wParam, LPARAM lParam)
{
int nStatus = db_get_w(NULL, "CList", "Status", ID_STATUS_OFFLINE);
CallService(MS_CLIST_SETSTATUSMODE, nStatus, 0);
diff --git a/plugins/Clist_modern/src/modern_skinengine.cpp b/plugins/Clist_modern/src/modern_skinengine.cpp
index 62eae4b80a..4336a30413 100644
--- a/plugins/Clist_modern/src/modern_skinengine.cpp
+++ b/plugins/Clist_modern/src/modern_skinengine.cpp
@@ -77,8 +77,8 @@ static LISTMODERNMASK *MainModernMaskList = NULL;
/* Private module procedures */
static BOOL ske_GetMaskBit(BYTE *line, int x);
-static INT_PTR ske_Service_AlphaTextOut(WPARAM wParam,LPARAM lParam);
-static INT_PTR ske_Service_DrawIconEx(WPARAM wParam,LPARAM lParam);
+static INT_PTR ske_Service_AlphaTextOut(WPARAM wParam, LPARAM lParam);
+static INT_PTR ske_Service_DrawIconEx(WPARAM wParam, LPARAM lParam);
static int ske_AlphaTextOut (HDC hDC, LPCTSTR lpString, int nCount, RECT *lpRect, UINT format, DWORD ARGBcolor);
static void ske_AddParseTextGlyphObject(char * szGlyphTextID,char * szDefineString,SKINOBJECTSLIST *Skin);
@@ -1550,7 +1550,7 @@ LPSKINOBJECTDESCRIPTOR ske_FindObjectByName(const char * szName, BYTE objType, S
// lParam - possible direct pointer to modern mask
//////////////////////////////////////////////////////////////////////////
-INT_PTR ske_Service_DrawGlyph(WPARAM wParam,LPARAM lParam)
+INT_PTR ske_Service_DrawGlyph(WPARAM wParam, LPARAM lParam)
{
LPSKINDRAWREQUEST preq;
LPSKINOBJECTDESCRIPTOR pgl;
@@ -2313,7 +2313,7 @@ BOOL ske_TextOut(HDC hdc, int x, int y, LPCTSTR lpString, int nCount)
return 1;
}
-static INT_PTR ske_Service_AlphaTextOut(WPARAM wParam,LPARAM lParam)
+static INT_PTR ske_Service_AlphaTextOut(WPARAM wParam, LPARAM lParam)
{
if (!wParam) return 0;
@@ -2904,7 +2904,7 @@ BOOL ske_ImageList_DrawEx( HIMAGELIST himl,int i,HDC hdcDst,int x,int y,int dx,i
return TRUE;
}
-static INT_PTR ske_Service_DrawIconEx(WPARAM wParam,LPARAM lParam)
+static INT_PTR ske_Service_DrawIconEx(WPARAM wParam, LPARAM lParam)
{
DrawIconFixParam *p = (DrawIconFixParam*)wParam;
if (!p)
diff --git a/plugins/Clist_modern/src/modern_statusbar.cpp b/plugins/Clist_modern/src/modern_statusbar.cpp
index 13d81b69cc..f8dabf6331 100644
--- a/plugins/Clist_modern/src/modern_statusbar.cpp
+++ b/plugins/Clist_modern/src/modern_statusbar.cpp
@@ -126,7 +126,7 @@ int LoadStatusBarData()
return 1;
}
-int BgStatusBarChange(WPARAM wParam,LPARAM lParam)
+int BgStatusBarChange(WPARAM wParam, LPARAM lParam)
{
if (MirandaExiting())
return 0;
@@ -612,7 +612,7 @@ static BOOL _ModernStatus_OnExtraIconClick(int protoIndex)
}
#define TOOLTIP_TOLERANCE 5
-LRESULT CALLBACK ModernStatusProc(HWND hwnd,UINT msg,WPARAM wParam,LPARAM lParam)
+LRESULT CALLBACK ModernStatusProc(HWND hwnd,UINT msg,WPARAM wParam, LPARAM lParam)
{
static POINT ptToolTipShow = {0};
switch (msg) {
diff --git a/plugins/Clist_mw/src/BkgrCfg.cpp b/plugins/Clist_mw/src/BkgrCfg.cpp
index 23fe520f98..8895bacbaa 100644
--- a/plugins/Clist_mw/src/BkgrCfg.cpp
+++ b/plugins/Clist_mw/src/BkgrCfg.cpp
@@ -248,7 +248,7 @@ static INT_PTR CALLBACK DlgProcBkgOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LP
return FALSE;
}
-static INT_PTR BkgrCfg_Register(WPARAM wParam,LPARAM lParam)
+static INT_PTR BkgrCfg_Register(WPARAM wParam, LPARAM lParam)
{
char *szSetting = (char *)wParam;
char *value, *tok;
@@ -271,7 +271,7 @@ static INT_PTR BkgrCfg_Register(WPARAM wParam,LPARAM lParam)
return 0;
}
-int OnOptionsInit(WPARAM wParam,LPARAM lParam)
+int OnOptionsInit(WPARAM wParam, LPARAM lParam)
{
OPTIONSDIALOGPAGE odp = { sizeof(odp) };
odp.hInstance = g_hInst;
diff --git a/plugins/Clist_mw/src/CLUIFrames/cluiframes.cpp b/plugins/Clist_mw/src/CLUIFrames/cluiframes.cpp
index e1844edc2c..b6b51de7c7 100644
--- a/plugins/Clist_mw/src/CLUIFrames/cluiframes.cpp
+++ b/plugins/Clist_mw/src/CLUIFrames/cluiframes.cpp
@@ -39,7 +39,7 @@ extern HINSTANCE g_hInst;
#define frame_menu_showtitlebar 3
#define frame_menu_floating 4
static int UpdateTBToolTip(int framepos);
-INT_PTR CLUIFrameSetFloat(WPARAM wParam,LPARAM lParam);
+INT_PTR CLUIFrameSetFloat(WPARAM wParam, LPARAM lParam);
int CLUIFrameResizeFloatingFrame(int framepos);
extern int InitFramesMenus(void);
int GapBetweenTitlebar;
@@ -719,12 +719,12 @@ HMENU CLUIFramesCreateMenuForFrame(int frameid,int root,int popuppos,HGENMENU (*
return 0;
}
-INT_PTR ModifyMItem(WPARAM wParam,LPARAM lParam)
+INT_PTR ModifyMItem(WPARAM wParam, LPARAM lParam)
{
return CallService(MS_CLIST_MODIFYMENUITEM, wParam, lParam);
}
-static int CLUIFramesModifyContextMenuForFrame(WPARAM wParam,LPARAM lParam)
+static int CLUIFramesModifyContextMenuForFrame(WPARAM wParam, LPARAM lParam)
{
lockfrm();
int pos = id2pos(wParam);
@@ -776,7 +776,7 @@ static int CLUIFramesModifyContextMenuForFrame(WPARAM wParam,LPARAM lParam)
return 0;
}
-INT_PTR CLUIFramesModifyMainMenuItems(WPARAM wParam,LPARAM lParam)
+INT_PTR CLUIFramesModifyMainMenuItems(WPARAM wParam, LPARAM lParam)
{
lockfrm();
@@ -829,7 +829,7 @@ INT_PTR CLUIFramesModifyMainMenuItems(WPARAM wParam,LPARAM lParam)
}
//hiword(wParam) = frameid,loword(wParam) = flag
-INT_PTR CLUIFramesGetFrameOptions(WPARAM wParam,LPARAM lParam)
+INT_PTR CLUIFramesGetFrameOptions(WPARAM wParam, LPARAM lParam)
{
if (FramesSysNotStarted) return 0;
@@ -896,7 +896,7 @@ INT_PTR CLUIFramesGetFrameOptions(WPARAM wParam,LPARAM lParam)
}
//hiword(wParam) = frameid,loword(wParam) = flag
-INT_PTR CLUIFramesSetFrameOptions(WPARAM wParam,LPARAM lParam)
+INT_PTR CLUIFramesSetFrameOptions(WPARAM wParam, LPARAM lParam)
{
lockfrm();
int pos = id2pos(HIWORD(wParam));
@@ -1024,7 +1024,7 @@ INT_PTR CLUIFramesSetFrameOptions(WPARAM wParam,LPARAM lParam)
}
//wparam = lparam = 0
-static INT_PTR CLUIFramesShowAll(WPARAM wParam,LPARAM lParam)
+static INT_PTR CLUIFramesShowAll(WPARAM wParam, LPARAM lParam)
{
for (int i=0;i<nFramescount;i++)
Frames[i].visible = TRUE;
@@ -1033,7 +1033,7 @@ static INT_PTR CLUIFramesShowAll(WPARAM wParam,LPARAM lParam)
}
//wparam = lparam = 0
-INT_PTR CLUIFramesShowAllTitleBars(WPARAM wParam,LPARAM lParam)
+INT_PTR CLUIFramesShowAllTitleBars(WPARAM wParam, LPARAM lParam)
{
for (int i=0;i<nFramescount;i++)
Frames[i].TitleBar.ShowTitleBar = TRUE;
@@ -1042,7 +1042,7 @@ INT_PTR CLUIFramesShowAllTitleBars(WPARAM wParam,LPARAM lParam)
}
//wparam = lparam = 0
-INT_PTR CLUIFramesHideAllTitleBars(WPARAM wParam,LPARAM lParam)
+INT_PTR CLUIFramesHideAllTitleBars(WPARAM wParam, LPARAM lParam)
{
for (int i=0;i<nFramescount;i++)
Frames[i].TitleBar.ShowTitleBar = FALSE;
@@ -1051,7 +1051,7 @@ INT_PTR CLUIFramesHideAllTitleBars(WPARAM wParam,LPARAM lParam)
}
//wparam = frameid
-INT_PTR CLUIFramesShowHideFrame(WPARAM wParam,LPARAM lParam)
+INT_PTR CLUIFramesShowHideFrame(WPARAM wParam, LPARAM lParam)
{
lockfrm();
int pos = id2pos(wParam);
@@ -1067,7 +1067,7 @@ INT_PTR CLUIFramesShowHideFrame(WPARAM wParam,LPARAM lParam)
}
//wparam = frameid
-INT_PTR CLUIFramesShowHideFrameTitleBar(WPARAM wParam,LPARAM lParam)
+INT_PTR CLUIFramesShowHideFrameTitleBar(WPARAM wParam, LPARAM lParam)
{
lockfrm();
int pos = id2pos(wParam);
@@ -1082,7 +1082,7 @@ INT_PTR CLUIFramesShowHideFrameTitleBar(WPARAM wParam,LPARAM lParam)
//wparam = frameid
//lparam = -1 up ,1 down
-INT_PTR CLUIFramesMoveUpDown(WPARAM wParam,LPARAM lParam)
+INT_PTR CLUIFramesMoveUpDown(WPARAM wParam, LPARAM lParam)
{
int pos,i,curpos,curalign,v,tmpval;
@@ -1141,30 +1141,30 @@ INT_PTR CLUIFramesMoveUpDown(WPARAM wParam,LPARAM lParam)
//wparam = frameid
//lparam = alignment
-INT_PTR CLUIFramesSetAlign(WPARAM wParam,LPARAM lParam)
+INT_PTR CLUIFramesSetAlign(WPARAM wParam, LPARAM lParam)
{
CLUIFramesSetFrameOptions(MAKEWPARAM(FO_ALIGN,wParam),lParam);
CLUIFramesOnClistResize((WPARAM)pcli->hwndContactList,0);
return 0;
}
-INT_PTR CLUIFramesSetAlignalTop(WPARAM wParam,LPARAM lParam)
+INT_PTR CLUIFramesSetAlignalTop(WPARAM wParam, LPARAM lParam)
{
return CLUIFramesSetAlign(wParam,alTop);
}
-INT_PTR CLUIFramesSetAlignalBottom(WPARAM wParam,LPARAM lParam)
+INT_PTR CLUIFramesSetAlignalBottom(WPARAM wParam, LPARAM lParam)
{
return CLUIFramesSetAlign(wParam,alBottom);
}
-INT_PTR CLUIFramesSetAlignalClient(WPARAM wParam,LPARAM lParam)
+INT_PTR CLUIFramesSetAlignalClient(WPARAM wParam, LPARAM lParam)
{
return CLUIFramesSetAlign(wParam,alClient);
}
//wparam = frameid
-INT_PTR CLUIFramesLockUnlockFrame(WPARAM wParam,LPARAM lParam)
+INT_PTR CLUIFramesLockUnlockFrame(WPARAM wParam, LPARAM lParam)
{
lockfrm();
int pos = id2pos(wParam);
@@ -1177,7 +1177,7 @@ INT_PTR CLUIFramesLockUnlockFrame(WPARAM wParam,LPARAM lParam)
}
//wparam = frameid
-INT_PTR CLUIFramesSetUnSetBorder(WPARAM wParam,LPARAM lParam)
+INT_PTR CLUIFramesSetUnSetBorder(WPARAM wParam, LPARAM lParam)
{
int oldflags;
@@ -1206,7 +1206,7 @@ INT_PTR CLUIFramesSetUnSetBorder(WPARAM wParam,LPARAM lParam)
}
//wparam = frameid
-INT_PTR CLUIFramesCollapseUnCollapseFrame(WPARAM wParam,LPARAM lParam)
+INT_PTR CLUIFramesCollapseUnCollapseFrame(WPARAM wParam, LPARAM lParam)
{
int FrameId;
@@ -1416,7 +1416,7 @@ static int UpdateTBToolTip(int framepos)
}
//wparam = (CLISTFrame*)clfrm
-INT_PTR CLUIFramesAddFrame(WPARAM wParam,LPARAM lParam)
+INT_PTR CLUIFramesAddFrame(WPARAM wParam, LPARAM lParam)
{
int style,retval;
CLISTFrame *clfrm = (CLISTFrame *)wParam;
@@ -1520,7 +1520,7 @@ INT_PTR CLUIFramesAddFrame(WPARAM wParam,LPARAM lParam)
return retval;
}
-static INT_PTR CLUIFramesRemoveFrame(WPARAM wParam,LPARAM lParam)
+static INT_PTR CLUIFramesRemoveFrame(WPARAM wParam, LPARAM lParam)
{
if (FramesSysNotStarted)
return -1;
@@ -1786,7 +1786,7 @@ int CLUIFramesResize(const RECT newsize)
return 0;
}
-INT_PTR CLUIFramesUpdateFrame(WPARAM wParam,LPARAM lParam)
+INT_PTR CLUIFramesUpdateFrame(WPARAM wParam, LPARAM lParam)
{
if (FramesSysNotStarted) return -1;
if (wParam == -1) { CLUIFramesOnClistResize((WPARAM)pcli->hwndContactList,0); return 0;}
@@ -1801,7 +1801,7 @@ INT_PTR CLUIFramesUpdateFrame(WPARAM wParam,LPARAM lParam)
return 0;
}
-int CLUIFramesOnClistResize(WPARAM wParam,LPARAM lParam)
+int CLUIFramesOnClistResize(WPARAM wParam, LPARAM lParam)
{
RECT nRect,rcStatus;
int tick,i;
@@ -1852,7 +1852,7 @@ static COLORREF bkColour;
static COLORREF SelBkColour;
boolean AlignCOLLIconToLeft; //will hide frame icon
-int OnFrameTitleBarBackgroundChange(WPARAM wParam,LPARAM lParam)
+int OnFrameTitleBarBackgroundChange(WPARAM wParam, LPARAM lParam)
{
DBVARIANT dbv;
@@ -2491,7 +2491,7 @@ int CLUIFrameResizeFloatingFrame(int framepos)
return 0;
}
-static int CLUIFrameOnMainMenuBuild(WPARAM wParam,LPARAM lParam)
+static int CLUIFrameOnMainMenuBuild(WPARAM wParam, LPARAM lParam)
{
CLUIFramesLoadMainMenu();
return 0;
@@ -2608,7 +2608,7 @@ static HWND CreateContainerWindow(HWND parent,int x,int y,int width,int height)
return(CreateWindowA("FramesContainer","aaaa",WS_POPUP|WS_THICKFRAME,x,y,width,height,parent,0,g_hInst,0));
}
-INT_PTR CLUIFrameSetFloat(WPARAM wParam,LPARAM lParam)
+INT_PTR CLUIFrameSetFloat(WPARAM wParam, LPARAM lParam)
{
HWND hwndtmp, hwndtooltiptmp;
FRAMEWND *frame;
@@ -2700,7 +2700,7 @@ INT_PTR CLUIFrameSetFloat(WPARAM wParam,LPARAM lParam)
return 0;
}
-static int CLUIFrameOnFontChange(WPARAM wParam,LPARAM lParam)
+static int CLUIFrameOnFontChange(WPARAM wParam, LPARAM lParam)
{
FontID fid = {0};
fid.cbSize = sizeof(fid);
@@ -2731,7 +2731,7 @@ static void CLUIRegisterFonts()
HookEvent(ME_FONT_RELOAD,CLUIFrameOnFontChange);
}
-static int CLUIFrameOnModulesLoad(WPARAM wParam,LPARAM lParam)
+static int CLUIFrameOnModulesLoad(WPARAM wParam, LPARAM lParam)
{
CLUIFramesLoadMainMenu();
CLUIFramesCreateMenuForFrame(-1,-1,000010000,Menu_AddContextFrameMenuItem);
@@ -2739,7 +2739,7 @@ static int CLUIFrameOnModulesLoad(WPARAM wParam,LPARAM lParam)
return 0;
}
-static int CLUIFrameOnModulesUnload(WPARAM wParam,LPARAM lParam)
+static int CLUIFrameOnModulesUnload(WPARAM wParam, LPARAM lParam)
{
CallService(MS_CLIST_REMOVECONTEXTFRAMEMENUITEM, ( LPARAM )contMIVisible, 0 );
CallService(MS_CLIST_REMOVECONTEXTFRAMEMENUITEM, ( LPARAM )contMITitle, 0 );
diff --git a/plugins/Clist_mw/src/CLUIFrames/cluiframes.h b/plugins/Clist_mw/src/CLUIFrames/cluiframes.h
index 2161b6623b..6f8b4a5f82 100644
--- a/plugins/Clist_mw/src/CLUIFrames/cluiframes.h
+++ b/plugins/Clist_mw/src/CLUIFrames/cluiframes.h
@@ -25,7 +25,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
int LoadCLUIFramesModule(void);
int UnLoadCLUIFramesModule(void);
int CLUIFramesGetMinHeight();
-int CLUIFramesOnClistResize(WPARAM wParam,LPARAM lParam);
+int CLUIFramesOnClistResize(WPARAM wParam, LPARAM lParam);
typedef struct tagProtocolData {
char *RealName;
diff --git a/plugins/Clist_mw/src/CLUIFrames/framesmenu.cpp b/plugins/Clist_mw/src/CLUIFrames/framesmenu.cpp
index 59c24463b8..da1ce57d05 100644
--- a/plugins/Clist_mw/src/CLUIFrames/framesmenu.cpp
+++ b/plugins/Clist_mw/src/CLUIFrames/framesmenu.cpp
@@ -88,7 +88,7 @@ static INT_PTR ContextFrameMenuNotify(WPARAM wParam, LPARAM lParam)
return 0;
}
-static INT_PTR BuildContextFrameMenu(WPARAM wParam,LPARAM lParam)
+static INT_PTR BuildContextFrameMenu(WPARAM wParam, LPARAM lParam)
{
ListParam param = { 0 };
param.MenuObjectHandle = hFrameMenuObject;
diff --git a/plugins/Clist_mw/src/CLUIFrames/statusbar.cpp b/plugins/Clist_mw/src/CLUIFrames/statusbar.cpp
index 2b82d539b4..975664458d 100644
--- a/plugins/Clist_mw/src/CLUIFrames/statusbar.cpp
+++ b/plugins/Clist_mw/src/CLUIFrames/statusbar.cpp
@@ -8,7 +8,7 @@ HANDLE hFrameHelperStatusBar;
void CluiProtocolStatusChanged(int parStatus, const char* szProto);
-INT_PTR GetConnectingIconService (WPARAM wParam,LPARAM lParam);
+INT_PTR GetConnectingIconService (WPARAM wParam, LPARAM lParam);
int RecreateStatusBar(HWND);
int UseOwnerDrawStatusBar;
diff --git a/plugins/Clist_mw/src/clc.cpp b/plugins/Clist_mw/src/clc.cpp
index 66a00dff3b..a4459348af 100644
--- a/plugins/Clist_mw/src/clc.cpp
+++ b/plugins/Clist_mw/src/clc.cpp
@@ -29,10 +29,10 @@ HIMAGELIST himlCListClc;
static HANDLE hSettingChanged1;
-int BgStatusBarChange(WPARAM wParam,LPARAM lParam);
+int BgStatusBarChange(WPARAM wParam, LPARAM lParam);
-int BgClcChange(WPARAM wParam,LPARAM lParam);
-int OnFrameTitleBarBackgroundChange(WPARAM wParam,LPARAM lParam);
+int BgClcChange(WPARAM wParam, LPARAM lParam);
+int OnFrameTitleBarBackgroundChange(WPARAM wParam, LPARAM lParam);
void InitDisplayNameCache(SortedList *list);
void FreeDisplayNameCache(SortedList *list);
@@ -109,7 +109,7 @@ static int ClcSettingChanged(WPARAM wParam, LPARAM lParam)
return 0;
}
-static int ClcModulesLoaded(WPARAM wParam,LPARAM lParam)
+static int ClcModulesLoaded(WPARAM wParam, LPARAM lParam)
{
CallService(MS_BACKGROUNDCONFIG_REGISTER,(WPARAM)(LPGEN("Status bar background")"/StatusBar"),0);
CallService(MS_BACKGROUNDCONFIG_REGISTER,(WPARAM)(LPGEN("List background")"/CLC"),0);
@@ -300,7 +300,7 @@ int LoadCLCModule(void)
/////////////////////////////////////////////////////////////////////////////////////////
-static INT_PTR CLUIGetCapsService(WPARAM wParam,LPARAM lParam)
+static INT_PTR CLUIGetCapsService(WPARAM wParam, LPARAM lParam)
{
switch (wParam) {
case CLUICAPS_FLAGS1:
diff --git a/plugins/Clist_mw/src/clc.h b/plugins/Clist_mw/src/clc.h
index d48f962476..841fb25576 100644
--- a/plugins/Clist_mw/src/clc.h
+++ b/plugins/Clist_mw/src/clc.h
@@ -100,7 +100,7 @@ int GetNewSelection(ClcGroup *group,int selection, int direction);
void SaveStateAndRebuildList(HWND hwnd,struct ClcData *dat);
//clcmsgs.c
-LRESULT ProcessExternalMessages(HWND hwnd,struct ClcData *dat,UINT msg,WPARAM wParam,LPARAM lParam);
+LRESULT ProcessExternalMessages(HWND hwnd,struct ClcData *dat,UINT msg,WPARAM wParam, LPARAM lParam);
//clcutils.c
void RecalcScrollBar(HWND hwnd,struct ClcData *dat);
@@ -113,7 +113,7 @@ void LoadClcOptions(HWND hwnd,struct ClcData *dat);
void PaintClc(HWND hwnd,struct ClcData *dat,HDC hdc,RECT *rcPaint);
//clcopts.c
-int ClcOptInit(WPARAM wParam,LPARAM lParam);
+int ClcOptInit(WPARAM wParam, LPARAM lParam);
//clcfiledrop.c
void InitFileDropping(void);
diff --git a/plugins/Clist_mw/src/clcopts.cpp b/plugins/Clist_mw/src/clcopts.cpp
index 2b6c874d20..5c3120e29d 100644
--- a/plugins/Clist_mw/src/clcopts.cpp
+++ b/plugins/Clist_mw/src/clcopts.cpp
@@ -36,20 +36,20 @@ static INT_PTR CALLBACK DlgProcClcBkgOpts(HWND hwndDlg, UINT msg, WPARAM wParam,
static INT_PTR CALLBACK DlgProcStatusBarBkgOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam);
int OnStatusBarBackgroundChange();
-int BgClcChange(WPARAM wParam,LPARAM lParam)
+int BgClcChange(WPARAM wParam, LPARAM lParam)
{
pcli->pfnClcOptionsChanged();
return 0;
}
-int BgStatusBarChange(WPARAM wParam,LPARAM lParam)
+int BgStatusBarChange(WPARAM wParam, LPARAM lParam)
{
pcli->pfnClcOptionsChanged();
OnStatusBarBackgroundChange();
return 0;
}
-int ClcOptInit(WPARAM wParam,LPARAM lParam)
+int ClcOptInit(WPARAM wParam, LPARAM lParam)
{
OPTIONSDIALOGPAGE odp = { sizeof(odp) };
odp.hInstance = g_hInst;
diff --git a/plugins/Clist_mw/src/clistmenus.cpp b/plugins/Clist_mw/src/clistmenus.cpp
index 4b7ee0b425..3cf09e3234 100644
--- a/plugins/Clist_mw/src/clistmenus.cpp
+++ b/plugins/Clist_mw/src/clistmenus.cpp
@@ -40,7 +40,7 @@ void DestroyTrayMenu(HMENU hMenu)
DestroyMenu(hMenu);
}
-INT_PTR CloseAction(WPARAM wParam,LPARAM lParam)
+INT_PTR CloseAction(WPARAM wParam, LPARAM lParam)
{
if ( CallService(MS_SYSTEM_OKTOEXIT,0,0))
DestroyWindow(pcli->hwndContactList);
diff --git a/plugins/Clist_mw/src/clistmod.cpp b/plugins/Clist_mw/src/clistmod.cpp
index 13720def98..ce81fee4bc 100644
--- a/plugins/Clist_mw/src/clistmod.cpp
+++ b/plugins/Clist_mw/src/clistmod.cpp
@@ -28,10 +28,10 @@ extern int DefaultImageListColorDepth;
int InitCustomMenus(void);
void UninitCustomMenus(void);
-int ContactSettingChanged(WPARAM wParam,LPARAM lParam);
-int CListOptInit(WPARAM wParam,LPARAM lParam);
-INT_PTR ContactChangeGroup(WPARAM wParam,LPARAM lParam);
-INT_PTR HotkeysProcessMessage(WPARAM wParam,LPARAM lParam) { return pcli->pfnHotkeysProcessMessage(wParam, lParam); }
+int ContactSettingChanged(WPARAM wParam, LPARAM lParam);
+int CListOptInit(WPARAM wParam, LPARAM lParam);
+INT_PTR ContactChangeGroup(WPARAM wParam, LPARAM lParam);
+INT_PTR HotkeysProcessMessage(WPARAM wParam, LPARAM lParam) { return pcli->pfnHotkeysProcessMessage(wParam, lParam); }
void InitTrayMenus(void);
HIMAGELIST hCListImages;
@@ -95,7 +95,7 @@ int ExtIconFromStatusMode(MCONTACT hContact, const char *szProto,int status)
/////////// End by FYR ////////
-static int ProtocolAck(WPARAM wParam,LPARAM lParam)
+static int ProtocolAck(WPARAM wParam, LPARAM lParam)
{
ACKDATA *ack = (ACKDATA*)lParam;
if (ack->type == ACKTYPE_AWAYMSG && ack->lParam) {
@@ -119,7 +119,7 @@ static INT_PTR GetStatusMode(WPARAM wParam, LPARAM lParam)
return pcli->currentDesiredStatusMode;
}
-static int ContactListShutdownProc(WPARAM wParam,LPARAM lParam)
+static int ContactListShutdownProc(WPARAM wParam, LPARAM lParam)
{
UnhookEvent(hProtoAckHook);
UninitCustomMenus();
diff --git a/plugins/Clist_mw/src/clistopts.cpp b/plugins/Clist_mw/src/clistopts.cpp
index cf834b6157..5166bf63af 100644
--- a/plugins/Clist_mw/src/clistopts.cpp
+++ b/plugins/Clist_mw/src/clistopts.cpp
@@ -32,7 +32,7 @@ void SortContacts(void);
static INT_PTR CALLBACK DlgProcGenOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam);
-int CListOptInit(WPARAM wParam,LPARAM lParam)
+int CListOptInit(WPARAM wParam, LPARAM lParam)
{
OPTIONSDIALOGPAGE odp = { sizeof(odp) };
odp.position = -1000000000;
diff --git a/plugins/Clist_mw/src/clistsettings.cpp b/plugins/Clist_mw/src/clistsettings.cpp
index f562742124..0bf9e3711a 100644
--- a/plugins/Clist_mw/src/clistsettings.cpp
+++ b/plugins/Clist_mw/src/clistsettings.cpp
@@ -257,10 +257,9 @@ int GetContactCachedStatus(MCONTACT hContact)
return 0;
}
-int ContactSettingChanged(WPARAM wParam,LPARAM lParam)
+int ContactSettingChanged(WPARAM hContact, LPARAM lParam)
{
DBCONTACTWRITESETTING *cws = (DBCONTACTWRITESETTING*)lParam;
- MCONTACT hContact = wParam;
// Early exit
if (hContact == NULL)
@@ -315,7 +314,7 @@ int ContactSettingChanged(WPARAM wParam,LPARAM lParam)
if ( !strcmp(cws->szSetting,"Hidden")) {
InvalidateDisplayNameCacheEntryByPDNE(hContact,pdnce,cws->value.type);
if (cws->value.type == DBVT_DELETED || cws->value.bVal == 0) {
- char *szProto = GetContactProto(wParam);
+ char *szProto = GetContactProto(hContact);
ChangeContactIcon(hContact,ExtIconFromStatusMode(hContact, szProto, szProto == NULL ? ID_STATUS_OFFLINE : db_get_w(hContact, szProto, "Status", ID_STATUS_OFFLINE)), 1); //by FYR
}
}
diff --git a/plugins/Clist_mw/src/clisttray.cpp b/plugins/Clist_mw/src/clisttray.cpp
index 8e5a309dee..03a3617ee8 100644
--- a/plugins/Clist_mw/src/clisttray.cpp
+++ b/plugins/Clist_mw/src/clisttray.cpp
@@ -28,10 +28,10 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#define TIM_CALLBACK (WM_USER+1857)
#define TIM_CREATE (WM_USER+1858)
-extern INT_PTR ( *saveTrayIconProcessMessage )(WPARAM wParam,LPARAM lParam);
+extern INT_PTR ( *saveTrayIconProcessMessage )(WPARAM wParam, LPARAM lParam);
void DestroyTrayMenu(HMENU hMenu);
-INT_PTR TrayIconProcessMessage(WPARAM wParam,LPARAM lParam)
+INT_PTR TrayIconProcessMessage(WPARAM wParam, LPARAM lParam)
{
MSG *msg = (MSG*)wParam;
switch(msg->message) {
@@ -83,13 +83,13 @@ typedef struct
wparam = handle to the menu item returned by MS_CLIST_ADDCONTACTMENUITEM
return 0 on success.
*/
-static INT_PTR RemoveTrayMenuItem(WPARAM wParam,LPARAM lParam)
+static INT_PTR RemoveTrayMenuItem(WPARAM wParam, LPARAM lParam)
{
CallService(MO_REMOVEMENUITEM,wParam,0);
return 0;
}
-static INT_PTR BuildTrayMenu(WPARAM wParam,LPARAM lParam)
+static INT_PTR BuildTrayMenu(WPARAM wParam, LPARAM lParam)
{
int tick;
HMENU hMenu;
@@ -109,7 +109,7 @@ static INT_PTR BuildTrayMenu(WPARAM wParam,LPARAM lParam)
return (INT_PTR)hMenu;
}
-static INT_PTR AddTrayMenuItem(WPARAM wParam,LPARAM lParam)
+static INT_PTR AddTrayMenuItem(WPARAM wParam, LPARAM lParam)
{
TMO_MenuItem tmi;
CLISTMENUITEM *mi = (CLISTMENUITEM*)lParam;
@@ -132,12 +132,12 @@ static INT_PTR AddTrayMenuItem(WPARAM wParam,LPARAM lParam)
return (INT_PTR)op.Handle;
}
-INT_PTR TrayMenuCheckService(WPARAM wParam,LPARAM lParam)
+INT_PTR TrayMenuCheckService(WPARAM wParam, LPARAM lParam)
{
return 0;
}
-INT_PTR TrayMenuonAddService(WPARAM wParam,LPARAM lParam)
+INT_PTR TrayMenuonAddService(WPARAM wParam, LPARAM lParam)
{
MENUITEMINFO *mii = (MENUITEMINFO* )wParam;
if (mii == NULL) return 0;
@@ -164,7 +164,7 @@ INT_PTR TrayMenuonAddService(WPARAM wParam,LPARAM lParam)
//called with:
//wparam - ownerdata
//lparam - lparam from winproc
-INT_PTR TrayMenuExecService(WPARAM wParam,LPARAM lParam)
+INT_PTR TrayMenuExecService(WPARAM wParam, LPARAM lParam)
{
if (wParam != 0)
{
@@ -179,7 +179,7 @@ INT_PTR TrayMenuExecService(WPARAM wParam,LPARAM lParam)
return(1);
}
-INT_PTR FreeOwnerDataTrayMenu (WPARAM wParam,LPARAM lParam)
+INT_PTR FreeOwnerDataTrayMenu (WPARAM wParam, LPARAM lParam)
{
lpTrayMenuExecParam mmep;
diff --git a/plugins/Clist_mw/src/clui.cpp b/plugins/Clist_mw/src/clui.cpp
index 4ed273132a..f7d929cce5 100644
--- a/plugins/Clist_mw/src/clui.cpp
+++ b/plugins/Clist_mw/src/clui.cpp
@@ -59,15 +59,15 @@ int CycleTimeInterval = 2000;
int CycleIconCount = 8;
int DefaultStep = 100;
-int CluiOptInit(WPARAM wParam,LPARAM lParam);
-int SortList(WPARAM wParam,LPARAM lParam);
+int CluiOptInit(WPARAM wParam, LPARAM lParam);
+int SortList(WPARAM wParam, LPARAM lParam);
void CluiProtocolStatusChanged(int parStatus, const char* szProto);
extern void ReloadExtraIcons();
extern HWND CreateStatusBarhWnd(HWND parent);
extern HANDLE CreateStatusBarFrame();
-extern int CLUIFramesUpdateFrame(WPARAM wParam,LPARAM lParam);
+extern int CLUIFramesUpdateFrame(WPARAM wParam, LPARAM lParam);
extern void DrawDataForStatusBar(LPDRAWITEMSTRUCT dis);
extern void InitGroupMenus();
extern int UseOwnerDrawStatusBar;
@@ -77,7 +77,7 @@ HICON GetConnectingIconForProto_DLL(char *szProto,int b);
void RegisterProtoIconsForAllProtoIconLib();
-static int CluiModulesLoaded(WPARAM wParam,LPARAM lParam)
+static int CluiModulesLoaded(WPARAM wParam, LPARAM lParam)
{
MENUITEMINFO mii = { sizeof(mii) };
mii.fMask = MIIM_SUBMENU;
@@ -278,7 +278,7 @@ HICON GetConnectingIconForProto(char *szProto,int b)
}
//wParam == szProto
-INT_PTR GetConnectingIconService(WPARAM wParam,LPARAM lParam)
+INT_PTR GetConnectingIconService(WPARAM wParam, LPARAM lParam)
{
int b;
ProtoTicks *pt = NULL;
@@ -299,7 +299,7 @@ INT_PTR GetConnectingIconService(WPARAM wParam,LPARAM lParam)
return (INT_PTR)hIcon;
}
-int CreateTimerForConnectingIcon(WPARAM wParam,LPARAM lParam)
+int CreateTimerForConnectingIcon(WPARAM wParam, LPARAM lParam)
{
int status = (int)wParam;
char *szProto = (char *)lParam;
@@ -334,7 +334,7 @@ int CreateTimerForConnectingIcon(WPARAM wParam,LPARAM lParam)
// Restore protocols to the last global status.
// Used to reconnect on restore after standby.
-int OnSettingChanging(WPARAM wParam,LPARAM lParam)
+int OnSettingChanging(WPARAM wParam, LPARAM lParam)
{
DBCONTACTWRITESETTING *dbcws = (DBCONTACTWRITESETTING *)lParam;
if (wParam == 0) {
diff --git a/plugins/Clist_mw/src/cluiopts.cpp b/plugins/Clist_mw/src/cluiopts.cpp
index 1e8aab4792..4669f576a6 100644
--- a/plugins/Clist_mw/src/cluiopts.cpp
+++ b/plugins/Clist_mw/src/cluiopts.cpp
@@ -33,7 +33,7 @@ extern int UseOwnerDrawStatusBar;
void CluiProtocolStatusChanged(int parStatus, const char* szProto);
int OnStatusBarBackgroundChange();
-int CluiOptInit(WPARAM wParam,LPARAM lParam)
+int CluiOptInit(WPARAM wParam, LPARAM lParam)
{
OPTIONSDIALOGPAGE odp = { sizeof(odp) };
odp.hInstance = g_hInst;
diff --git a/plugins/Clist_mw/src/contact.cpp b/plugins/Clist_mw/src/contact.cpp
index 695be8f1c9..1f24968256 100644
--- a/plugins/Clist_mw/src/contact.cpp
+++ b/plugins/Clist_mw/src/contact.cpp
@@ -165,16 +165,14 @@ void SortContacts(void)
sortByProto = db_get_b(NULL,"CList","SortByProto",SETTING_SORTBYPROTO_DEFAULT);
}
-INT_PTR ContactChangeGroup(WPARAM wParam,LPARAM lParam)
+INT_PTR ContactChangeGroup(WPARAM hContact, LPARAM lParam)
{
- MCONTACT hContact = wParam;
-
- CallService(MS_CLUI_CONTACTDELETED,wParam,0);
+ CallService(MS_CLUI_CONTACTDELETED, hContact, 0);
if ((HANDLE)lParam == NULL)
db_unset(hContact, "CList", "Group");
else
db_set_s(hContact, "CList", "Group", (char*)CallService(MS_CLIST_GROUPGETNAME2, lParam, (LPARAM)(int*)NULL));
- CallService(MS_CLUI_CONTACTADDED, wParam, ExtIconFromStatusMode(hContact, GetContactProto(hContact), GetContactStatus(hContact)));
+ CallService(MS_CLUI_CONTACTADDED, hContact, ExtIconFromStatusMode(hContact, GetContactProto(hContact), GetContactStatus(hContact)));
return 0;
}
diff --git a/plugins/Clist_mw/src/groupmenu.cpp b/plugins/Clist_mw/src/groupmenu.cpp
index cd64420626..e911a3f5f5 100644
--- a/plugins/Clist_mw/src/groupmenu.cpp
+++ b/plugins/Clist_mw/src/groupmenu.cpp
@@ -56,14 +56,14 @@ int Param1,Param2;
wparam = handle to the menu item returned by MS_CLIST_ADDCONTACTMENUITEM
return 0 on success.
*/
-static INT_PTR RemoveGroupMenuItem(WPARAM wParam,LPARAM lParam)
+static INT_PTR RemoveGroupMenuItem(WPARAM wParam, LPARAM lParam)
{
CallService(MO_REMOVEMENUITEM,wParam,0);
return 0;
}
-static INT_PTR BuildGroupMenu(WPARAM wParam,LPARAM lParam)
+static INT_PTR BuildGroupMenu(WPARAM wParam, LPARAM lParam)
{
int tick;
HMENU hMenu;
@@ -83,7 +83,7 @@ static INT_PTR BuildGroupMenu(WPARAM wParam,LPARAM lParam)
return (INT_PTR)hMenu;
}
-static INT_PTR AddGroupMenuItem(WPARAM wParam,LPARAM lParam)
+static INT_PTR AddGroupMenuItem(WPARAM wParam, LPARAM lParam)
{
TMO_MenuItem tmi;
CLISTMENUITEM *mi = (CLISTMENUITEM*)lParam;
@@ -118,12 +118,12 @@ static INT_PTR AddGroupMenuItem(WPARAM wParam,LPARAM lParam)
// return MENU_CUSTOMITEMMAIN|(mainMenuItem[mainItemCount-1].id);
}
-INT_PTR GroupMenuCheckService(WPARAM wParam,LPARAM lParam) {
+INT_PTR GroupMenuCheckService(WPARAM wParam, LPARAM lParam) {
//not used
return 0;
}
-INT_PTR GroupMenuonAddService(WPARAM wParam,LPARAM lParam) {
+INT_PTR GroupMenuonAddService(WPARAM wParam, LPARAM lParam) {
MENUITEMINFO *mii = (MENUITEMINFO* )wParam;
if (mii == NULL) return 0;
@@ -149,7 +149,7 @@ INT_PTR GroupMenuonAddService(WPARAM wParam,LPARAM lParam) {
//called with:
//wparam - ownerdata
//lparam - lparam from winproc
-INT_PTR GroupMenuExecService(WPARAM wParam,LPARAM lParam) {
+INT_PTR GroupMenuExecService(WPARAM wParam, LPARAM lParam) {
if (wParam != 0)
{
lpGroupMenuExecParam mmep = (lpGroupMenuExecParam)wParam;
@@ -167,7 +167,7 @@ INT_PTR GroupMenuExecService(WPARAM wParam,LPARAM lParam) {
return(1);
}
-INT_PTR FreeOwnerDataGroupMenu (WPARAM wParam,LPARAM lParam)
+INT_PTR FreeOwnerDataGroupMenu (WPARAM wParam, LPARAM lParam)
{
lpGroupMenuExecParam mmep = (lpGroupMenuExecParam)lParam;
if (mmep != NULL) {
@@ -177,7 +177,7 @@ INT_PTR FreeOwnerDataGroupMenu (WPARAM wParam,LPARAM lParam)
return 0;
}
-INT_PTR HideGroupsHelper(WPARAM wParam,LPARAM lParam)
+INT_PTR HideGroupsHelper(WPARAM wParam, LPARAM lParam)
{
int newVal = !(GetWindowLongPtr(pcli->hwndContactTree,GWL_STYLE)&CLS_HIDEEMPTYGROUPS);
db_set_b(NULL,"CList","HideEmptyGroups",(BYTE)newVal);
@@ -185,7 +185,7 @@ INT_PTR HideGroupsHelper(WPARAM wParam,LPARAM lParam)
return 0;
}
-INT_PTR UseGroupsHelper(WPARAM wParam,LPARAM lParam)
+INT_PTR UseGroupsHelper(WPARAM wParam, LPARAM lParam)
{
int newVal = !(GetWindowLongPtr(pcli->hwndContactTree,GWL_STYLE)&CLS_USEGROUPS);
db_set_b(NULL,"CList","UseGroups",(BYTE)newVal);
@@ -193,7 +193,7 @@ INT_PTR UseGroupsHelper(WPARAM wParam,LPARAM lParam)
return 0;
}
-INT_PTR HideOfflineRootHelper(WPARAM wParam,LPARAM lParam)
+INT_PTR HideOfflineRootHelper(WPARAM wParam, LPARAM lParam)
{
SendMessage(
pcli->hwndContactTree,
@@ -203,7 +203,7 @@ SendMessage(
return 0;
}
-static int OnBuildGroupMenu(WPARAM wParam,LPARAM lParam)
+static int OnBuildGroupMenu(WPARAM wParam, LPARAM lParam)
{
CLISTMENUITEM mi = { sizeof(mi) };
mi.flags = CMIM_FLAGS | ( db_get_b(NULL,"CList","HideOffline",SETTING_HIDEOFFLINE_DEFAULT)?CMIF_CHECKED:0);
@@ -220,7 +220,7 @@ static int OnBuildGroupMenu(WPARAM wParam,LPARAM lParam)
return 0;
}
-int static OnIconLibIconChanged(WPARAM wParam,LPARAM lParam)
+int static OnIconLibIconChanged(WPARAM wParam, LPARAM lParam)
{
HICON hicon = LoadIconFromExternalFile("clisticons.dll",2,TRUE,FALSE,"NewGroup","Contact list","New Group",-IDI_NEWGROUP,0);
NewGroupIconidx = ImageList_ReplaceIcon(hCListImages,NewGroupIconidx,hicon);
@@ -384,13 +384,13 @@ int Param1,Param2;
wparam = handle to the menu item returned by MS_CLIST_ADDCONTACTMENUITEM
return 0 on success.
*/
-static INT_PTR RemoveSubGroupMenuItem(WPARAM wParam,LPARAM lParam)
+static INT_PTR RemoveSubGroupMenuItem(WPARAM wParam, LPARAM lParam)
{
CallService(MO_REMOVEMENUITEM,wParam,0);
return 0;
}
-static int OnBuildSubGroupMenu(WPARAM wParam,LPARAM lParam)
+static int OnBuildSubGroupMenu(WPARAM wParam, LPARAM lParam)
{
ClcGroup *group = (ClcGroup *)wParam;
if (wParam == 0) return 0;
@@ -402,7 +402,7 @@ static int OnBuildSubGroupMenu(WPARAM wParam,LPARAM lParam)
return 0;
}
-static INT_PTR BuildSubGroupMenu(WPARAM wParam,LPARAM lParam)
+static INT_PTR BuildSubGroupMenu(WPARAM wParam, LPARAM lParam)
{
int tick;
HMENU hMenu;
@@ -423,7 +423,7 @@ static INT_PTR BuildSubGroupMenu(WPARAM wParam,LPARAM lParam)
return (INT_PTR)hMenu;
}
-static INT_PTR AddSubGroupMenuItem(WPARAM wParam,LPARAM lParam)
+static INT_PTR AddSubGroupMenuItem(WPARAM wParam, LPARAM lParam)
{
TMO_MenuItem tmi;
CLISTMENUITEM *mi = (CLISTMENUITEM*)lParam;
@@ -455,12 +455,12 @@ static INT_PTR AddSubGroupMenuItem(WPARAM wParam,LPARAM lParam)
return (INT_PTR)op.Handle;
}
-INT_PTR SubGroupMenuCheckService(WPARAM wParam,LPARAM lParam)
+INT_PTR SubGroupMenuCheckService(WPARAM wParam, LPARAM lParam)
{
return 0;
}
-INT_PTR SubGroupMenuonAddService(WPARAM wParam,LPARAM lParam)
+INT_PTR SubGroupMenuonAddService(WPARAM wParam, LPARAM lParam)
{
MENUITEMINFO *mii = (MENUITEMINFO* )wParam;
if (mii == NULL)
@@ -472,7 +472,7 @@ INT_PTR SubGroupMenuonAddService(WPARAM wParam,LPARAM lParam)
//called with:
//wparam - ownerdata
//lparam - lparam from winproc
-INT_PTR SubGroupMenuExecService(WPARAM wParam,LPARAM lParam)
+INT_PTR SubGroupMenuExecService(WPARAM wParam, LPARAM lParam)
{
if (wParam != 0) {
lpSubGroupMenuExecParam mmep = (lpSubGroupMenuExecParam)wParam;
@@ -487,7 +487,7 @@ INT_PTR SubGroupMenuExecService(WPARAM wParam,LPARAM lParam)
return 1;
}
-INT_PTR FreeOwnerDataSubGroupMenu (WPARAM wParam,LPARAM lParam)
+INT_PTR FreeOwnerDataSubGroupMenu (WPARAM wParam, LPARAM lParam)
{
lpSubGroupMenuExecParam mmep = (lpSubGroupMenuExecParam)lParam;
if (mmep != NULL) {
@@ -498,7 +498,7 @@ INT_PTR FreeOwnerDataSubGroupMenu (WPARAM wParam,LPARAM lParam)
}
//wparam menu handle to pass to clc.c
-INT_PTR GroupMenuExecProxy(WPARAM wParam,LPARAM lParam)
+INT_PTR GroupMenuExecProxy(WPARAM wParam, LPARAM lParam)
{
SendMessage(pcli->hwndContactTree,WM_COMMAND,wParam,0);
return 0;
diff --git a/plugins/Clist_mw/src/init.cpp b/plugins/Clist_mw/src/init.cpp
index 78b9f51a9a..dd509257b9 100644
--- a/plugins/Clist_mw/src/init.cpp
+++ b/plugins/Clist_mw/src/init.cpp
@@ -64,8 +64,8 @@ int AddInfoItemToGroup(ClcGroup *group,int flags,const TCHAR *pszText);
void ( *saveSortCLC )(HWND hwnd,struct ClcData *dat,int useInsertionSort);
void SortCLC(HWND hwnd,struct ClcData *dat,int useInsertionSort);
-INT_PTR ( *saveTrayIconProcessMessage )(WPARAM wParam,LPARAM lParam);
-INT_PTR TrayIconProcessMessage(WPARAM wParam,LPARAM lParam);
+INT_PTR ( *saveTrayIconProcessMessage )(WPARAM wParam, LPARAM lParam);
+INT_PTR TrayIconProcessMessage(WPARAM wParam, LPARAM lParam);
int (*saveIconFromStatusMode)(const char *szProto,int nStatus, MCONTACT hContact);
int cli_IconFromStatusMode(const char *szProto,int nStatus, MCONTACT hContact);
@@ -120,7 +120,7 @@ static int OnModulesLoaded(WPARAM wParam, LPARAM lParam)
return 0;
}
-INT_PTR SetDrawer(WPARAM wParam,LPARAM lParam)
+INT_PTR SetDrawer(WPARAM wParam, LPARAM lParam)
{
pDrawerServiceStruct DSS = (pDrawerServiceStruct)wParam;
if (DSS->cbSize != sizeof(*DSS)) return -1;
diff --git a/plugins/Clist_mw/src/keyboard.cpp b/plugins/Clist_mw/src/keyboard.cpp
index 58c406056d..bd8a438231 100644
--- a/plugins/Clist_mw/src/keyboard.cpp
+++ b/plugins/Clist_mw/src/keyboard.cpp
@@ -25,13 +25,13 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include "commonheaders.h"
#include <m_hotkeys.h>
-INT_PTR hkCloseMiranda(WPARAM wParam,LPARAM lParam)
+INT_PTR hkCloseMiranda(WPARAM wParam, LPARAM lParam)
{
CallService("CloseAction", 0, 0);
return 0;
}
-INT_PTR hkRestoreStatus(WPARAM wParam,LPARAM lParam)
+INT_PTR hkRestoreStatus(WPARAM wParam, LPARAM lParam)
{
int nStatus = db_get_w(NULL, "CList", "Status", ID_STATUS_OFFLINE);
CallService(MS_CLIST_SETSTATUSMODE, nStatus, 0);
diff --git a/plugins/ContactsPlus/src/main.cpp b/plugins/ContactsPlus/src/main.cpp
index 5c604e25a8..d8812192b9 100644
--- a/plugins/ContactsPlus/src/main.cpp
+++ b/plugins/ContactsPlus/src/main.cpp
@@ -57,9 +57,8 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
return TRUE;
}
-static int HookDBEventAdded(WPARAM wParam, LPARAM lParam)
+static int HookDBEventAdded(WPARAM hContact, LPARAM lParam)
{
- MCONTACT hContact = wParam;
HANDLE hDbEvent = (HANDLE)lParam;
//process the event
DBEVENTINFO dbe = { sizeof(dbe) };
@@ -115,9 +114,8 @@ static bool CheckContactsServiceSupport(const char* szProto)
return false;
}
-static int HookPreBuildContactMenu(WPARAM wParam, LPARAM lParam)
+static int HookPreBuildContactMenu(WPARAM hContact, LPARAM lParam)
{
- MCONTACT hContact = wParam;
char *szProto = GetContactProto(hContact);
int bVisible = FALSE;
diff --git a/plugins/DbEditorPP/src/main.cpp b/plugins/DbEditorPP/src/main.cpp
index d4201977a2..1e934e4ca7 100644
--- a/plugins/DbEditorPP/src/main.cpp
+++ b/plugins/DbEditorPP/src/main.cpp
@@ -53,10 +53,9 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
void settingChanged(HWND hwnd2Settings, MCONTACT hContact, char* module, char* setting);
-int DBSettingChanged(WPARAM wParam,LPARAM lParam)
+int DBSettingChanged(WPARAM hContact, LPARAM lParam)
{
DBCONTACTWRITESETTING *cws=(DBCONTACTWRITESETTING*)lParam;
- MCONTACT hContact = wParam;
char *setting;
SettingListInfo* info;
diff --git a/plugins/FTPFileYM/src/ftpfile.cpp b/plugins/FTPFileYM/src/ftpfile.cpp
index 4de26794e3..16c452c027 100644
--- a/plugins/FTPFileYM/src/ftpfile.cpp
+++ b/plugins/FTPFileYM/src/ftpfile.cpp
@@ -233,10 +233,9 @@ void PrebuildMainMenu()
Menu_ShowItem(hMainSubMenu[i], ftpList[i]->bEnabled);
}
-int TabsrmmButtonPressed(WPARAM wParam, LPARAM lParam)
+int TabsrmmButtonPressed(WPARAM hContact, LPARAM lParam)
{
CustomButtonClickData *cbc = (CustomButtonClickData *)lParam;
- MCONTACT hContact = wParam;
if (!strcmp(cbc->pszModule, MODULE) && cbc->dwButtonId == 1 && hContact)
{
@@ -361,9 +360,8 @@ INT_PTR ShowManagerService(WPARAM wParam, LPARAM lParam)
return 0;
}
-INT_PTR ContactMenuService(WPARAM wParam, LPARAM lParam)
+INT_PTR ContactMenuService(WPARAM hContact, LPARAM lParam)
{
- MCONTACT hContact = wParam;
int ftpNum = lParam & (1|2|4);
int mode = lParam & (UploadJob::FTP_RAWFILE | UploadJob::FTP_ZIPFILE | UploadJob::FTP_ZIPFOLDER);
return UploadFile(hContact, ftpNum, (UploadJob::EMode)mode);
diff --git a/plugins/FavContacts/src/contact_cache.cpp b/plugins/FavContacts/src/contact_cache.cpp
index ad43d99269..a42bf9b13a 100644
--- a/plugins/FavContacts/src/contact_cache.cpp
+++ b/plugins/FavContacts/src/contact_cache.cpp
@@ -1,8 +1,7 @@
#include "headers.h"
-int __cdecl CContactCache::OnDbEventAdded(WPARAM wParam, LPARAM lParam)
+int __cdecl CContactCache::OnDbEventAdded(WPARAM hContact, LPARAM lParam)
{
- MCONTACT hContact = wParam;
HANDLE hEvent = (HANDLE)lParam;
DBEVENTINFO dbei = {0};
diff --git a/plugins/FavContacts/src/main.cpp b/plugins/FavContacts/src/main.cpp
index 139b44463a..3abb180e40 100644
--- a/plugins/FavContacts/src/main.cpp
+++ b/plugins/FavContacts/src/main.cpp
@@ -935,12 +935,11 @@ int ProcessSrmmEvent( WPARAM wParam, LPARAM lParam )
return 0;
}
-int ProcessSrmmIconClick( WPARAM wParam, LPARAM lParam )
+int ProcessSrmmIconClick(WPARAM hContact, LPARAM lParam)
{
StatusIconClickData *sicd = (StatusIconClickData *)lParam;
if (lstrcmpA(sicd->szModule, "FavContacts")) return 0;
- MCONTACT hContact = wParam;
if (!hContact)
return 0;
diff --git a/plugins/FingerprintNG/src/fingerprint.cpp b/plugins/FingerprintNG/src/fingerprint.cpp
index 36ae676557..304d445002 100644
--- a/plugins/FingerprintNG/src/fingerprint.cpp
+++ b/plugins/FingerprintNG/src/fingerprint.cpp
@@ -836,9 +836,8 @@ static int OnIconsChanged(WPARAM wParam, LPARAM lParam)
* Try to get MirVer value from db for contact and if success calls ApplyFingerprintImage
*/
-int OnExtraImageApply(WPARAM wParam, LPARAM lParam)
+int OnExtraImageApply(WPARAM hContact, LPARAM lParam)
{
- MCONTACT hContact = wParam;
if (hContact == NULL)
return 0;
@@ -860,9 +859,8 @@ int OnExtraImageApply(WPARAM wParam, LPARAM lParam)
* if contact settings changed apply new image or remove it
*/
-static int OnContactSettingChanged(WPARAM wParam, LPARAM lParam)
+static int OnContactSettingChanged(WPARAM hContact, LPARAM lParam)
{
- MCONTACT hContact = wParam;
if (hContact == NULL)
return 0;
diff --git a/plugins/FloatingContacts/src/main.cpp b/plugins/FloatingContacts/src/main.cpp
index 31edc604ef..2bcc042554 100644
--- a/plugins/FloatingContacts/src/main.cpp
+++ b/plugins/FloatingContacts/src/main.cpp
@@ -134,9 +134,8 @@ static LPCTSTR s_fonts[FLT_FONTIDS] =
///////////////////////////////////////////////////////
// Hooked events
-static int OnContactDeleted(WPARAM wParam, LPARAM lParam)
+static int OnContactDeleted(WPARAM hContact, LPARAM lParam)
{
- MCONTACT hContact = wParam;
ThumbInfo *pThumb = thumbList.FindThumbByContact(hContact);
if (pThumb) {
pThumb->DeleteContactPos();
@@ -145,9 +144,8 @@ static int OnContactDeleted(WPARAM wParam, LPARAM lParam)
return 0;
}
-static int OnContactIconChanged(WPARAM wParam, LPARAM lParam)
+static int OnContactIconChanged(WPARAM hContact, LPARAM lParam)
{
- MCONTACT hContact = wParam;
ThumbInfo *pThumb = thumbList.FindThumbByContact(hContact);
if (pThumb) {
pThumb->RefreshContactIcon((int)lParam);
@@ -158,12 +156,11 @@ static int OnContactIconChanged(WPARAM wParam, LPARAM lParam)
return 0;
}
-static int OnContactDrag(WPARAM wParam, LPARAM lParam)
+static int OnContactDrag(WPARAM hContact, LPARAM lParam)
{
POINT pt;
GetCursorPos(&pt);
- MCONTACT hContact = wParam;
ThumbInfo *pThumb = thumbList.FindThumbByContact(hContact);
if (pThumb == NULL) {
int idStatus = GetContactStatus(hContact);
@@ -183,12 +180,11 @@ static int OnContactDrag(WPARAM wParam, LPARAM lParam)
return hNewContact != NULL;
}
-static int OnContactDrop(WPARAM wParam, LPARAM lParam)
+static int OnContactDrop(WPARAM hContact, LPARAM lParam)
{
RECT rcMiranda;
RECT rcThumb;
- MCONTACT hContact = wParam;
ThumbInfo *pThumb = thumbList.FindThumbByContact(hContact);
if (hNewContact == hContact && pThumb != NULL) {
@@ -202,9 +198,8 @@ static int OnContactDrop(WPARAM wParam, LPARAM lParam)
return 1;
}
-static int OnContactDragStop(WPARAM wParam, LPARAM lParam)
+static int OnContactDragStop(WPARAM hContact, LPARAM lParam)
{
- MCONTACT hContact = wParam;
ThumbInfo *pThumb = thumbList.FindThumbByContact(hContact);
if (pThumb != NULL && hNewContact == hContact) {
thumbList.RemoveThumb(pThumb);
@@ -226,9 +221,8 @@ static int OnSkinIconsChanged(WPARAM wParam, LPARAM lParam)
return 0;
}
-static int OnContactSettingChanged(WPARAM wParam, LPARAM lParam)
+static int OnContactSettingChanged(WPARAM hContact, LPARAM lParam)
{
- MCONTACT hContact = wParam;
ThumbInfo *pThumb = thumbList.FindThumbByContact(hContact);
int idStatus = ID_STATUS_OFFLINE;
BOOL bRefresh = TRUE;
@@ -717,9 +711,8 @@ static INT_PTR OnMainMenu_HideAll(WPARAM wParam, LPARAM lParam)
return 0;
}
-static INT_PTR OnContactMenu_Remove(WPARAM wParam, LPARAM lParam)
+static INT_PTR OnContactMenu_Remove(WPARAM hContact, LPARAM lParam)
{
- MCONTACT hContact = wParam;
ThumbInfo *pThumb = thumbList.FindThumbByContact(hContact);
if (pThumb) {
pThumb->DeleteContactPos();
diff --git a/plugins/HTTPServer/src/GuiElements.cpp b/plugins/HTTPServer/src/GuiElements.cpp
index 4443a1709b..7b21ed1e8e 100644
--- a/plugins/HTTPServer/src/GuiElements.cpp
+++ b/plugins/HTTPServer/src/GuiElements.cpp
@@ -1013,9 +1013,8 @@ void SendLinkToUser(WPARAM wParam, char *pszSrvPath) {
// Developer : KN, Houdini
/////////////////////////////////////////////////////////////////////
-static INT_PTR nShareNewFile(WPARAM wParam, LPARAM lParam) {
- MCONTACT hContact = wParam;
-
+static INT_PTR nShareNewFile(WPARAM hContact, LPARAM lParam)
+{
// used to be _MAX_PATH
// changed it since selecting multiple files requires a bigger buffer
char szNewFile[10000] = {0};
diff --git a/plugins/HistoryLinkListPlus/src/linklist.cpp b/plugins/HistoryLinkListPlus/src/linklist.cpp
index 40e22ff3f9..d6e9ace26f 100644
--- a/plugins/HistoryLinkListPlus/src/linklist.cpp
+++ b/plugins/HistoryLinkListPlus/src/linklist.cpp
@@ -121,9 +121,8 @@ int InitOptionsDlg(WPARAM wParam, LPARAM)
return 0;
}
-static INT_PTR LinkList_Main(WPARAM wParam, LPARAM)
+static INT_PTR LinkList_Main(WPARAM hContact, LPARAM)
{
- MCONTACT hContact = wParam;
HWND hWnd = WindowList_Find(hWindowList, hContact);
if ( hWnd != NULL ) {
int len;
diff --git a/plugins/HistorySweeperLight/src/main.cpp b/plugins/HistorySweeperLight/src/main.cpp
index 32e965599a..3634c40929 100644
--- a/plugins/HistorySweeperLight/src/main.cpp
+++ b/plugins/HistorySweeperLight/src/main.cpp
@@ -46,14 +46,14 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
return TRUE;
}
-int OnIconPressed(WPARAM wParam, LPARAM lParam)
+int OnIconPressed(WPARAM hContact, LPARAM lParam)
{
StatusIconClickData *sicd = (StatusIconClickData *)lParam;
if ( !(sicd->flags & MBCF_RIGHTBUTTON) && !lstrcmpA(sicd->szModule, ModuleName)
&& db_get_b(NULL, ModuleName, "ChangeInMW", 0))
{
- int nh = sicd->dwId; MCONTACT hContact = wParam;
+ int nh = sicd->dwId;
StatusIconData sid = { sizeof(sid) };
sid.szModule = ModuleName;
@@ -62,7 +62,7 @@ int OnIconPressed(WPARAM wParam, LPARAM lParam)
Srmm_ModifyIcon(hContact, &sid);
nh = (nh + 1) % 4;
- db_set_b(wParam, ModuleName, "SweepHistory", (BYTE)nh);
+ db_set_b(hContact, ModuleName, "SweepHistory", (BYTE)nh);
sid.dwId = nh;
sid.flags = 0;
diff --git a/plugins/IgnoreState/src/main.cpp b/plugins/IgnoreState/src/main.cpp
index 68f4701581..ebe32c0d36 100644
--- a/plugins/IgnoreState/src/main.cpp
+++ b/plugins/IgnoreState/src/main.cpp
@@ -147,10 +147,9 @@ int onModulesLoaded(WPARAM wParam,LPARAM lParam)
return 0;
}
-int onContactSettingChanged(WPARAM wParam,LPARAM lParam)
+int onContactSettingChanged(WPARAM hContact, LPARAM lParam)
{
DBCONTACTWRITESETTING *cws = (DBCONTACTWRITESETTING*)lParam;
- MCONTACT hContact = wParam;
if ( !lstrcmpA(cws->szModule, "Ignore") && !lstrcmpA(cws->szSetting, "Mask1"))
applyExtraImage(hContact);
diff --git a/plugins/KeyboardNotify/src/main.cpp b/plugins/KeyboardNotify/src/main.cpp
index f1f78731d3..ee716a6d73 100644
--- a/plugins/KeyboardNotify/src/main.cpp
+++ b/plugins/KeyboardNotify/src/main.cpp
@@ -425,9 +425,8 @@ BOOL checkXstatus(char *szProto)
// 'Pings' the FlashThread to keep the LEDs flashing.
-static int PluginMessageEventHook(WPARAM wParam, LPARAM lParam)
+static int PluginMessageEventHook(WPARAM hContact, LPARAM lParam)
{
- MCONTACT hContact = wParam;
HANDLE hEvent = (HANDLE)lParam;
//get DBEVENTINFO without pBlob
diff --git a/plugins/MirOTR/MirOTR/src/dbfilter.cpp b/plugins/MirOTR/MirOTR/src/dbfilter.cpp
index 333a49be06..674a4965de 100644
--- a/plugins/MirOTR/MirOTR/src/dbfilter.cpp
+++ b/plugins/MirOTR/MirOTR/src/dbfilter.cpp
@@ -43,17 +43,21 @@ VOID CALLBACK DeleteTimerProc(HWND hwnd, UINT uMsg, UINT_PTR idEvent, DWORD dwTi
// add prefix to sent messages
-int OnDatabaseEventPreAdd(WPARAM wParam, LPARAM lParam) {
- if (!options.prefix_messages || !lParam) return 0;
- MCONTACT hContact = wParam;
+int OnDatabaseEventPreAdd(WPARAM hContact, LPARAM lParam)
+{
+ if (!options.prefix_messages || !lParam)
+ return 0;
+
DBEVENTINFO *dbei = (DBEVENTINFO *)lParam;
if ((dbei->eventType != EVENTTYPE_MESSAGE) || !(dbei->flags & DBEF_SENT) || (dbei->flags & DBEF_OTR_PREFIXED))
return 0;
+
if(dbei->cbBlob == 0 || dbei->pBlob == 0)
return 0; // just to be safe
const char *proto = contact_get_proto(hContact);
- if (!proto ) return 0;
+ if (!proto)
+ return 0;
if (db_get_b(hContact, proto, "ChatRoom", 0) == 1)
return 0;
@@ -177,7 +181,7 @@ int OnDatabaseEventPreAdd(WPARAM wParam, LPARAM lParam) {
return 1;
}
- int OnDatabaseEventAdded(WPARAM wParam, LPARAM lParam)
+ int OnDatabaseEventAdded(WPARAM hContact, LPARAM lParam)
{
if (!options.delete_history) return 0;
@@ -191,7 +195,7 @@ int OnDatabaseEventPreAdd(WPARAM wParam, LPARAM lParam) {
info.pBlob = (PBYTE)mir_alloc(info.cbBlob);
if (!db_event_get((HANDLE)lParam, &info)) {
if(info.eventType == EVENTTYPE_MESSAGE) {
- MCONTACT hContact = wParam, hSub;
+ MCONTACT hSub;
if(options.bHaveMetaContacts && (hSub = (MCONTACT)CallService(MS_MC_GETMOSTONLINECONTACT, (WPARAM)hContact, 0)) != 0)
hContact = hSub;
@@ -293,10 +297,10 @@ int StatusModeChange(WPARAM wParam, LPARAM lParam) {
return 0;
}
-int OnContactSettingChanged(WPARAM wParam, LPARAM lParam) {
+int OnContactSettingChanged(WPARAM hContact, LPARAM lParam)
+{
DBCONTACTWRITESETTING *cws = (DBCONTACTWRITESETTING *)lParam;
if (!lParam || strcmp(cws->szSetting, "Status") != 0) return 0;
- MCONTACT hContact = wParam;
int status=0;
switch (cws->value.type){
case DBVT_WORD:
diff --git a/plugins/MirOTR/MirOTR/src/mirotrmenu.cpp b/plugins/MirOTR/MirOTR/src/mirotrmenu.cpp
index 9a8bb85475..2714a21e4f 100644
--- a/plugins/MirOTR/MirOTR/src/mirotrmenu.cpp
+++ b/plugins/MirOTR/MirOTR/src/mirotrmenu.cpp
@@ -47,13 +47,11 @@ static INT_PTR AddMirOTRMenuItem(WPARAM, LPARAM lParam)
return menuHandle;
}
-static INT_PTR BuildMirOTRMenu(WPARAM wParam, LPARAM)
+static INT_PTR BuildMirOTRMenu(WPARAM hContact, LPARAM)
{
- MCONTACT hContact = wParam;
-
ListParam param = { 0 };
param.MenuObjectHandle = hMirOTRMenuObject;
- param.wParam = (WPARAM)hContact;
+ param.wParam = hContact;
HMENU hMenu = CreatePopupMenu();
CallService(MO_BUILDMENU,(WPARAM)hMenu,(LPARAM)&param);
diff --git a/plugins/MirOTR/MirOTR/src/svcs_menu.cpp b/plugins/MirOTR/MirOTR/src/svcs_menu.cpp
index 2874d5f81a..5240337872 100644
--- a/plugins/MirOTR/MirOTR/src/svcs_menu.cpp
+++ b/plugins/MirOTR/MirOTR/src/svcs_menu.cpp
@@ -23,11 +23,11 @@ int StartOTR(MCONTACT hContact) {
return 0;
}
-INT_PTR SVC_StartOTR(WPARAM wParam, LPARAM lParam) {
- MCONTACT hContact = wParam, hSub;
- if(options.bHaveMetaContacts && (hSub = (MCONTACT)CallService(MS_MC_GETMOSTONLINECONTACT, (WPARAM)hContact, 0)) != 0) {
+INT_PTR SVC_StartOTR(WPARAM hContact, LPARAM lParam)
+{
+ MCONTACT hSub;
+ if(options.bHaveMetaContacts && (hSub = (MCONTACT)CallService(MS_MC_GETMOSTONLINECONTACT, (WPARAM)hContact, 0)) != 0)
hContact = hSub;
- }
if ( options.bHaveSecureIM && CallService("SecureIM/IsContactSecured", (WPARAM)hContact, 0) != 0 ) {
TCHAR msg[512];
@@ -35,22 +35,19 @@ INT_PTR SVC_StartOTR(WPARAM wParam, LPARAM lParam) {
ShowError(msg);
return 0;
}
-
+
TCHAR buff[512];
mir_sntprintf(buff, 512, TranslateT(LANG_SESSION_REQUEST_OTR), contact_get_nameT(hContact));
ShowMessage(hContact, buff);
- int res = StartOTR(hContact);
- if (res) return res;
-
- return 0;
+ return StartOTR(hContact);
}
-INT_PTR SVC_RefreshOTR(WPARAM wParam, LPARAM lParam) {
- MCONTACT hContact = wParam, hSub;
- if(options.bHaveMetaContacts && (hSub = (MCONTACT)CallService(MS_MC_GETMOSTONLINECONTACT, (WPARAM)hContact, 0)) != 0) {
+INT_PTR SVC_RefreshOTR(WPARAM hContact, LPARAM lParam)
+{
+ MCONTACT hSub;
+ if(options.bHaveMetaContacts && (hSub = (MCONTACT)CallService(MS_MC_GETMOSTONLINECONTACT, (WPARAM)hContact, 0)) != 0)
hContact = hSub;
- }
if ( options.bHaveSecureIM && CallService("SecureIM/IsContactSecured", (WPARAM)hContact, 0) != 0 ) {
TCHAR msg[512];
@@ -87,10 +84,8 @@ int otr_disconnect_contact(MCONTACT hContact)
return 0;
}
-INT_PTR SVC_StopOTR(WPARAM wParam, LPARAM lParam)
+INT_PTR SVC_StopOTR(WPARAM hContact, LPARAM lParam)
{
- MCONTACT hContact = wParam;
-
// prevent this filter from acting on injeceted messages for metas, when they are passed though the subcontact's proto send chain
if (otr_disconnect_contact(hContact)) return 0;
@@ -99,24 +94,26 @@ INT_PTR SVC_StopOTR(WPARAM wParam, LPARAM lParam)
TCHAR buff[512];
mir_sntprintf(buff, 512, TranslateT(LANG_SESSION_TERMINATED_OTR), contact_get_nameT(hContact));
ShowMessage(hContact, buff);
-
return 0;
}
-INT_PTR SVC_VerifyOTR(WPARAM wParam, LPARAM lParam) {
- MCONTACT hContact = wParam, hSub;
+INT_PTR SVC_VerifyOTR(WPARAM hContact, LPARAM lParam)
+{
+ MCONTACT hSub;
if(options.bHaveMetaContacts && (hSub = (MCONTACT)CallService(MS_MC_GETMOSTONLINECONTACT, (WPARAM)hContact, 0)) != 0)
hContact = hSub;
- ConnContext *context = otrl_context_find_miranda(otr_user_state, wParam);
- if (!context) return 1;
+ ConnContext *context = otrl_context_find_miranda(otr_user_state, hContact);
+ if (!context)
+ return 1;
+
//VerifyContextDialog(context);
SMPInitDialog(context);
return 0;
}
-INT_PTR SVC_ToggleHTMLOTR(WPARAM wParam, LPARAM lParam) {
- MCONTACT hContact = wParam;
+INT_PTR SVC_ToggleHTMLOTR(WPARAM hContact, LPARAM lParam)
+{
if (db_get_b(hContact, MODULENAME, "HTMLConv", 0))
db_set_b(hContact, MODULENAME, "HTMLConv", 0);
else
@@ -152,10 +149,8 @@ void InitMenu()
HookEvent(ME_CLIST_PREBUILDCONTACTMENU, SVC_PrebuildContactMenu);
}
-int SVC_PrebuildContactMenu(WPARAM wParam, LPARAM lParam)
+int SVC_PrebuildContactMenu(WPARAM hContact, LPARAM lParam)
{
- MCONTACT hContact = wParam;
-
CLISTMENUITEM mi = { sizeof(mi) };
mi.flags = CMIM_FLAGS | CMIF_NOTOFFLINE | CMIF_TCHAR;
diff --git a/plugins/MirOTR/MirOTR/src/svcs_srmm.cpp b/plugins/MirOTR/MirOTR/src/svcs_srmm.cpp
index a24bc5dec5..e07473eb15 100644
--- a/plugins/MirOTR/MirOTR/src/svcs_srmm.cpp
+++ b/plugins/MirOTR/MirOTR/src/svcs_srmm.cpp
@@ -3,9 +3,8 @@
HICON hIconNotSecure, hIconFinished, hIconPrivate, hIconUnverified;
BBButton OTRButton;
-int SVC_IconPressed(WPARAM wParam, LPARAM lParam)
+int SVC_IconPressed(WPARAM hContact, LPARAM lParam)
{
- MCONTACT hContact = wParam;
StatusIconClickData *sicd = (StatusIconClickData *)lParam;
if(sicd->cbSize < (int)sizeof(StatusIconClickData))
return 0;
diff --git a/plugins/NewEventNotify/src/main.cpp b/plugins/NewEventNotify/src/main.cpp
index 642a58fcda..440c997460 100644
--- a/plugins/NewEventNotify/src/main.cpp
+++ b/plugins/NewEventNotify/src/main.cpp
@@ -60,11 +60,8 @@ HANDLE hHookedDeletedEvent;
//wParam: contact-handle
//lParam: dbevent-handle
-int HookedNewEvent(WPARAM wParam, LPARAM lParam)
+int HookedNewEvent(WPARAM hContact, LPARAM lParam)
{
- MCONTACT hContact = wParam;
- PLUGIN_DATA* pdata;
-
//are popups currently enabled?
if (pluginOptions.bDisable)
return 0;
@@ -93,15 +90,14 @@ int HookedNewEvent(WPARAM wParam, LPARAM lParam)
if (dbe.flags & DBEF_SENT) {
// JK, only message event, do not influence others
if (pluginOptions.bHideSend && NumberPopupData(hContact, EVENTTYPE_MESSAGE) != -1) {
- pdata = PopupList[NumberPopupData(hContact, EVENTTYPE_MESSAGE)];
+ PLUGIN_DATA *pdata = PopupList[NumberPopupData(hContact, EVENTTYPE_MESSAGE)];
PopupAct(pdata->hWnd, MASK_DISMISS, pdata); // JK, only dismiss, i.e. do not kill event (e.g. file transfer)
}
return 0;
}
- //which status do we have, are we allowed to post popups?
- //UNDER CONSTRUCTION!!!
+ // which status do we have, are we allowed to post popups?
+ // UNDER CONSTRUCTION!!!
CallService(MS_CLIST_GETSTATUSMODE, 0, 0); /// TODO: JK: ????
-
if (dbe.eventType == EVENTTYPE_MESSAGE && (pluginOptions.bMsgWindowCheck && hContact && CheckMsgWnd(hContact)))
return 0;
diff --git a/plugins/NewXstatusNotify/src/main.cpp b/plugins/NewXstatusNotify/src/main.cpp
index 1bd318505a..5c7f5665cd 100644
--- a/plugins/NewXstatusNotify/src/main.cpp
+++ b/plugins/NewXstatusNotify/src/main.cpp
@@ -541,9 +541,8 @@ int ProcessStatus(DBCONTACTWRITESETTING *cws, MCONTACT hContact)
return 0;
}
-int ContactSettingChanged(WPARAM wParam, LPARAM lParam)
+int ContactSettingChanged(WPARAM hContact, LPARAM lParam)
{
- MCONTACT hContact = wParam;
if (hContact == NULL)
return 0;
@@ -747,11 +746,10 @@ void PlayChangeSound(MCONTACT hContact, WORD oldStatus, WORD newStatus)
SkinPlaySound(szSoundFile);
}
-int ContactStatusChanged(WPARAM wParam, LPARAM lParam)
+int ContactStatusChanged(WPARAM hContact, LPARAM lParam)
{
WORD oldStatus = LOWORD(lParam);
WORD newStatus = HIWORD(lParam);
- MCONTACT hContact = wParam;
bool bEnablePopup = true, bEnableSound = true;
char *hlpProto = GetContactProto(hContact);
diff --git a/plugins/NewsAggregator/Src/Services.cpp b/plugins/NewsAggregator/Src/Services.cpp
index 67a194ae3f..c2bdad8212 100644
--- a/plugins/NewsAggregator/Src/Services.cpp
+++ b/plugins/NewsAggregator/Src/Services.cpp
@@ -170,9 +170,8 @@ INT_PTR AddFeed(WPARAM wParam, LPARAM lParam)
return 0;
}
-INT_PTR ChangeFeed(WPARAM wParam, LPARAM lParam)
+INT_PTR ChangeFeed(WPARAM hContact, LPARAM lParam)
{
- MCONTACT hContact = wParam;
HWND hChangeFeedDlg = WindowList_Find(hChangeFeedDlgList, hContact);
if (!hChangeFeedDlg) {
hChangeFeedDlg = CreateDialogParam(hInst, MAKEINTRESOURCE(IDD_ADDFEED), NULL, DlgProcChangeFeedMenu, (LPARAM)hContact);
@@ -196,9 +195,8 @@ INT_PTR ExportFeeds(WPARAM wParam, LPARAM lParam)
return 0;
}
-INT_PTR CheckFeed(WPARAM wParam, LPARAM lParam)
+INT_PTR CheckFeed(WPARAM hContact, LPARAM lParam)
{
- MCONTACT hContact = wParam;
if(IsMyContact(hContact))
UpdateListAdd(hContact);
if ( !ThreadRunning)
diff --git a/plugins/NoHistory/src/dllmain.cpp b/plugins/NoHistory/src/dllmain.cpp
index 7258e4962e..6b13f688ea 100644
--- a/plugins/NoHistory/src/dllmain.cpp
+++ b/plugins/NoHistory/src/dllmain.cpp
@@ -112,9 +112,8 @@ void CALLBACK TimerProc(HWND hWnd, UINT uMsg, UINT_PTR idEvent, DWORD dwTime)
RemoveReadEvents();
}
-int OnDatabaseEventAdd(WPARAM wParam, LPARAM lParam)
+int OnDatabaseEventAdd(WPARAM hContact, LPARAM lParam)
{
- MCONTACT hContact = wParam;
HANDLE hDBEvent = (HANDLE)lParam;
// history not disabled for this contact
@@ -138,20 +137,16 @@ int OnDatabaseEventAdd(WPARAM wParam, LPARAM lParam)
return 0;
}
-INT_PTR ServiceClear(WPARAM wParam, LPARAM lParam)
+INT_PTR ServiceClear(WPARAM hContact, LPARAM lParam)
{
- if (MessageBox(0, TranslateT("This operation will PERMANENTLY REMOVE all history for this contact.\nAre you sure you want to do this?"), TranslateT("Clear History"), MB_YESNO | MB_ICONWARNING) == IDYES) {
- MCONTACT hContact = wParam;
+ if (MessageBox(0, TranslateT("This operation will PERMANENTLY REMOVE all history for this contact.\nAre you sure you want to do this?"), TranslateT("Clear History"), MB_YESNO | MB_ICONWARNING) == IDYES)
RemoveAllEvents(hContact);
- }
return 0;
}
-int PrebuildContactMenu(WPARAM wParam, LPARAM lParam)
+int PrebuildContactMenu(WPARAM hContact, LPARAM lParam)
{
- MCONTACT hContact = wParam;
-
bool remove = db_get_b(hContact, MODULE, DBSETTING_REMOVE, 0) != 0;
char *proto = GetContactProto(hContact);
bool chat_room = (proto && db_get_b(hContact, proto, "ChatRoom", 0) != 0);
@@ -170,10 +165,8 @@ int PrebuildContactMenu(WPARAM wParam, LPARAM lParam)
return 0;
}
-INT_PTR ServiceToggle(WPARAM wParam, LPARAM lParam)
+INT_PTR ServiceToggle(WPARAM hContact, LPARAM lParam)
{
- MCONTACT hContact = wParam;
-
int remove = db_get_b(hContact, MODULE, DBSETTING_REMOVE, 0) != 0;
remove = !remove;
db_set_b(hContact, MODULE, DBSETTING_REMOVE, remove != 0);
@@ -216,9 +209,8 @@ int WindowEvent(WPARAM wParam, LPARAM lParam)
return 0;
}
-int IconPressed(WPARAM wParam, LPARAM lParam)
+int IconPressed(WPARAM hContact, LPARAM lParam)
{
- MCONTACT hContact = wParam;
StatusIconClickData *sicd = (StatusIconClickData *)lParam;
if (sicd->cbSize < (int)sizeof(StatusIconClickData))
return 0;
diff --git a/plugins/Nudge/src/main.cpp b/plugins/Nudge/src/main.cpp
index a7a6bec972..c79da2dd8c 100644
--- a/plugins/Nudge/src/main.cpp
+++ b/plugins/Nudge/src/main.cpp
@@ -39,9 +39,8 @@ INT_PTR NudgeShowMenu(WPARAM wParam,LPARAM lParam)
return 0;
}
-INT_PTR NudgeSend(WPARAM wParam, LPARAM lParam)
+INT_PTR NudgeSend(WPARAM hContact, LPARAM lParam)
{
- MCONTACT hContact = wParam;
char *protoName = GetContactProto(hContact);
int diff = time(NULL) - db_get_dw(hContact, "Nudge", "LastSent", time(NULL) - 30);
if (diff < GlobalNudge.sendTimeSec) {
@@ -68,7 +67,7 @@ INT_PTR NudgeSend(WPARAM wParam, LPARAM lParam)
else if (DefaultNudge.showStatus)
Nudge_SentStatus(DefaultNudge, hContact);
- CallProtoService(protoName, PS_SEND_NUDGE, wParam, lParam);
+ CallProtoService(protoName, PS_SEND_NUDGE, hContact, lParam);
return 0;
}
@@ -79,9 +78,8 @@ void OpenContactList()
ShowWindow(hWnd, SW_SHOW);
}
-int NudgeReceived(WPARAM wParam, LPARAM lParam)
+int NudgeReceived(WPARAM hContact, LPARAM lParam)
{
- MCONTACT hContact = wParam;
char *protoName = GetContactProto(hContact);
DWORD currentTimestamp = time(NULL);
@@ -100,7 +98,7 @@ int NudgeReceived(WPARAM wParam, LPARAM lParam)
if (!strcmp(protoName, n->item.ProtocolName)) {
if (n->item.enabled) {
- if (n->item.useIgnoreSettings && CallService(MS_IGNORE_ISIGNORED, wParam, IGNOREEVENT_USERONLINE))
+ if (n->item.useIgnoreSettings && CallService(MS_IGNORE_ISIGNORED, hContact, IGNOREEVENT_USERONLINE))
return 0;
DWORD Status = CallProtoService(protoName, PS_GETSTATUS, 0, 0);
@@ -122,13 +120,13 @@ int NudgeReceived(WPARAM wParam, LPARAM lParam)
if (n->item.openContactList)
OpenContactList();
if (n->item.shakeClist)
- ShakeClist(wParam, lParam);
+ ShakeClist(hContact, lParam);
if (n->item.openMessageWindow)
- CallService(MS_MSG_SENDMESSAGET, wParam, 0);
+ CallService(MS_MSG_SENDMESSAGET, hContact, 0);
if (n->item.shakeChat)
- ShakeChat(wParam, lParam);
+ ShakeChat(hContact, lParam);
if (n->item.autoResend)
- mir_forkthread(AutoResendNudge, (void *)wParam);
+ mir_forkthread(AutoResendNudge, (void*)hContact);
SkinPlaySound(n->item.NudgeSoundname);
}
@@ -144,7 +142,7 @@ int NudgeReceived(WPARAM wParam, LPARAM lParam)
}
else {
if (DefaultNudge.enabled) {
- if (DefaultNudge.useIgnoreSettings && CallService(MS_IGNORE_ISIGNORED, wParam, IGNOREEVENT_USERONLINE))
+ if (DefaultNudge.useIgnoreSettings && CallService(MS_IGNORE_ISIGNORED, hContact, IGNOREEVENT_USERONLINE))
return 0;
DWORD Status = CallService(MS_CLIST_GETSTATUSMODE, 0, 0);
@@ -165,13 +163,13 @@ int NudgeReceived(WPARAM wParam, LPARAM lParam)
if (DefaultNudge.openContactList)
OpenContactList();
if (DefaultNudge.shakeClist)
- ShakeClist(wParam, lParam);
+ ShakeClist(hContact, lParam);
if (DefaultNudge.openMessageWindow)
- CallService(MS_MSG_SENDMESSAGET, wParam, 0);
+ CallService(MS_MSG_SENDMESSAGET, hContact, 0);
if (DefaultNudge.shakeChat)
- ShakeChat(wParam, lParam);
+ ShakeChat(hContact, lParam);
if (DefaultNudge.autoResend)
- mir_forkthread(AutoResendNudge, (void *)wParam);
+ mir_forkthread(AutoResendNudge, (void*)hContact);
SkinPlaySound(DefaultNudge.NudgeSoundname);
}
diff --git a/plugins/PasteIt/src/PasteIt.cpp b/plugins/PasteIt/src/PasteIt.cpp
index 5400e88502..05f28e0421 100644
--- a/plugins/PasteIt/src/PasteIt.cpp
+++ b/plugins/PasteIt/src/PasteIt.cpp
@@ -209,10 +209,9 @@ void PasteIt(MCONTACT hContact, int mode)
}
}
-int TabsrmmButtonPressed(WPARAM wParam, LPARAM lParam)
+int TabsrmmButtonPressed(WPARAM hContact, LPARAM lParam)
{
CustomButtonClickData *cbc = (CustomButtonClickData *)lParam;
- MCONTACT hContact = wParam;
if (!strcmp(cbc->pszModule, MODULE) && cbc->dwButtonId == 1 && hContact)
{
@@ -282,14 +281,12 @@ int PrebuildContactMenu(WPARAM wParam, LPARAM lParam)
return 0;
}
-INT_PTR ContactMenuService(WPARAM wParam, LPARAM lParam)
+INT_PTR ContactMenuService(WPARAM hContact, LPARAM lParam)
{
if(lParam >= DEF_PAGES_START)
Options::instance->SetDefWeb(lParam - DEF_PAGES_START);
- else {
- MCONTACT hContact = wParam;
+ else
PasteIt(hContact, lParam);
- }
return 0;
}
diff --git a/plugins/Popup/src/srmm_menu.cpp b/plugins/Popup/src/srmm_menu.cpp
index 64fe37d1ba..e41ee130ce 100644
--- a/plugins/Popup/src/srmm_menu.cpp
+++ b/plugins/Popup/src/srmm_menu.cpp
@@ -67,13 +67,12 @@ static int SrmmMenu_ProcessEvent(WPARAM, LPARAM lParam)
return 0;
}
-static int SrmmMenu_ProcessIconClick(WPARAM wParam, LPARAM lParam)
+static int SrmmMenu_ProcessIconClick(WPARAM hContact, LPARAM lParam)
{
StatusIconClickData *sicd = (StatusIconClickData *)lParam;
if (lstrcmpA(sicd->szModule, MODULNAME))
return 0;
- MCONTACT hContact = wParam;
if (!hContact)
return 0;
diff --git a/plugins/RecentContacts/src/RecentContacts.cpp b/plugins/RecentContacts/src/RecentContacts.cpp
index ae096f95e3..46493dd74a 100644
--- a/plugins/RecentContacts/src/RecentContacts.cpp
+++ b/plugins/RecentContacts/src/RecentContacts.cpp
@@ -512,10 +512,9 @@ int OnModulesLoaded(WPARAM wParam, LPARAM lParam)
return 0;
}
-INT_PTR ToggleIgnore (WPARAM wParam, LPARAM lParam)
+INT_PTR ToggleIgnore (WPARAM hContact, LPARAM lParam)
{
- if (wParam != NULL) {
- MCONTACT hContact = wParam;
+ if (hContact != NULL) {
int state = db_get_b(hContact, dbLastUC_ModuleName, dbLastUC_IgnoreContact, 0) == 0 ? 1 : 0 ;
db_set_b(hContact, dbLastUC_ModuleName, dbLastUC_IgnoreContact, state);
return state;
diff --git a/plugins/SMS/src/receive.cpp b/plugins/SMS/src/receive.cpp
index 855123d961..6ab752776a 100644
--- a/plugins/SMS/src/receive.cpp
+++ b/plugins/SMS/src/receive.cpp
@@ -207,11 +207,10 @@ int handleAckSMS(WPARAM wParam,LPARAM lParam)
}
//Handles new SMS messages added to the database
-int handleNewMessage(WPARAM wParam, LPARAM lParam)
+int handleNewMessage(WPARAM hContact, LPARAM lParam)
{
char szServiceFunction[MAX_PATH], *pszServiceFunctionName;
TCHAR szToolTip[MAX_PATH];
- MCONTACT hContact = wParam;
HANDLE hDbEvent = (HANDLE)lParam;
DBEVENTINFO dbei = { sizeof(dbei) };
diff --git a/plugins/Scriver/src/msgs.cpp b/plugins/Scriver/src/msgs.cpp
index fb812e2589..175e2fae32 100644
--- a/plugins/Scriver/src/msgs.cpp
+++ b/plugins/Scriver/src/msgs.cpp
@@ -89,28 +89,28 @@ static INT_PTR ReadMessageCommand(WPARAM wParam, LPARAM lParam)
return 0;
}
-static int MessageEventAdded(WPARAM wParam, LPARAM lParam)
+static int MessageEventAdded(WPARAM hContact, LPARAM lParam)
{
DBEVENTINFO dbei = { sizeof(dbei) };
db_event_get((HANDLE)lParam, &dbei);
if (dbei.eventType == EVENTTYPE_MESSAGE && (dbei.flags & DBEF_READ))
return 0;
- HWND hwnd = WindowList_Find(g_dat.hMessageWindowList, wParam);
+ HWND hwnd = WindowList_Find(g_dat.hMessageWindowList, hContact);
if (hwnd)
- SendMessage(hwnd, HM_DBEVENTADDED, wParam, lParam);
+ SendMessage(hwnd, HM_DBEVENTADDED, hContact, lParam);
if (dbei.flags & DBEF_SENT || !DbEventIsMessageOrCustom(&dbei))
return 0;
- CallServiceSync(MS_CLIST_REMOVEEVENT, wParam, (LPARAM)1);
+ CallServiceSync(MS_CLIST_REMOVEEVENT, hContact, (LPARAM)1);
/* does a window for the contact exist? */
if (hwnd == NULL) {
/* new message */
SkinPlaySound("AlertMsg");
- if (IsAutoPopup(wParam)) {
+ if (IsAutoPopup(hContact)) {
NewMessageWindowLParam newData = { 0 };
- newData.hContact = wParam;
+ newData.hContact = hContact;
HWND hParent = GetParentWindow(newData.hContact, FALSE);
newData.flags = NMWLP_INCOMING;
CreateDialogParam(g_hInst, MAKEINTRESOURCE(IDD_MSG), hParent, DlgProcMessage, (LPARAM)&newData);
@@ -118,12 +118,12 @@ static int MessageEventAdded(WPARAM wParam, LPARAM lParam)
}
}
if (hwnd == NULL || !IsWindowVisible(GetParent(hwnd))) {
- TCHAR *contactName = (TCHAR*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, wParam, GCDNF_TCHAR);
+ TCHAR *contactName = (TCHAR*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, hContact, GCDNF_TCHAR);
TCHAR toolTip[256];
CLISTEVENT cle = { sizeof(cle) };
cle.flags = CLEF_TCHAR;
- cle.hContact = wParam;
+ cle.hContact = hContact;
cle.hDbEvent = (HANDLE)lParam;
cle.hIcon = LoadSkinnedIcon(SKINICON_EVENT_MESSAGE);
cle.pszService = "SRMsg/ReadMessage";
@@ -134,17 +134,17 @@ static int MessageEventAdded(WPARAM wParam, LPARAM lParam)
return 0;
}
-static INT_PTR SendMessageCommandW(WPARAM wParam, LPARAM lParam)
+static INT_PTR SendMessageCommandW(WPARAM hContact, LPARAM lParam)
{
/* does the MCONTACT's protocol support IM messages? */
- char *szProto = GetContactProto(wParam);
+ char *szProto = GetContactProto(hContact);
if (szProto == NULL)
return 1; /* unknown contact */
if (!CallProtoService(szProto, PS_GETCAPS, PFLAGNUM_1, 0) & PF1_IMSEND)
return 1;
- HWND hwnd = WindowList_Find(g_dat.hMessageWindowList, wParam);
+ HWND hwnd = WindowList_Find(g_dat.hMessageWindowList, hContact);
if (hwnd != NULL) {
if (lParam) {
HWND hEdit = GetDlgItem(hwnd, IDC_MESSAGE);
@@ -155,7 +155,7 @@ static INT_PTR SendMessageCommandW(WPARAM wParam, LPARAM lParam)
}
else {
NewMessageWindowLParam newData = { 0 };
- newData.hContact = wParam;
+ newData.hContact = hContact;
newData.szInitialText = (const char *) lParam;
newData.isWchar = 1;
HWND hParent = GetParentWindow(newData.hContact, FALSE);
@@ -164,9 +164,9 @@ static INT_PTR SendMessageCommandW(WPARAM wParam, LPARAM lParam)
return 0;
}
-static INT_PTR SendMessageCommand(WPARAM wParam, LPARAM lParam)
+static INT_PTR SendMessageCommand(WPARAM hContact, LPARAM lParam)
{
- char *szProto = GetContactProto(wParam);
+ char *szProto = GetContactProto(hContact);
//logInfo("Show message window for: %s (%s)", CallService(MS_CLIST_GETCONTACTDISPLAYNAME, wParam, 0), szProto);
if (szProto) {
/* does the MCONTACT's protocol support IM messages? */
@@ -176,7 +176,7 @@ static INT_PTR SendMessageCommand(WPARAM wParam, LPARAM lParam)
else /* unknown contact */
return 1;
- HWND hwnd = WindowList_Find(g_dat.hMessageWindowList, wParam);
+ HWND hwnd = WindowList_Find(g_dat.hMessageWindowList, hContact);
if (hwnd != NULL) {
if (lParam) {
HWND hEdit = GetDlgItem(hwnd, IDC_MESSAGE);
@@ -187,7 +187,7 @@ static INT_PTR SendMessageCommand(WPARAM wParam, LPARAM lParam)
}
else {
NewMessageWindowLParam newData = { 0 };
- newData.hContact = wParam;
+ newData.hContact = hContact;
newData.szInitialText = (const char *)lParam;
HWND hParent = GetParentWindow(newData.hContact, FALSE);
CreateDialogParam(g_hInst, MAKEINTRESOURCE(IDD_MSG), hParent, DlgProcMessage, (LPARAM)& newData);
@@ -203,20 +203,20 @@ static INT_PTR TypingMessageCommand(WPARAM wParam, LPARAM lParam)
return 0;
}
-static int TypingMessage(WPARAM wParam, LPARAM lParam)
+static int TypingMessage(WPARAM hContact, LPARAM lParam)
{
if (!(g_dat.flags2 & SMF2_SHOWTYPING))
return 0;
SkinPlaySound((lParam) ? "TNStart" : "TNStop");
- HWND hwnd = WindowList_Find(g_dat.hMessageWindowList, wParam);
+ HWND hwnd = WindowList_Find(g_dat.hMessageWindowList, hContact);
if (hwnd)
SendMessage(hwnd, DM_TYPING, 0, lParam);
else if (lParam && (g_dat.flags2 & SMF2_SHOWTYPINGTRAY)) {
TCHAR szTip[256];
- mir_sntprintf(szTip, SIZEOF(szTip), TranslateT("%s is typing a message"), (TCHAR *) CallService(MS_CLIST_GETCONTACTDISPLAYNAME, wParam, GCDNF_TCHAR));
+ mir_sntprintf(szTip, SIZEOF(szTip), TranslateT("%s is typing a message"), (TCHAR *) CallService(MS_CLIST_GETCONTACTDISPLAYNAME, hContact, GCDNF_TCHAR));
if ( ServiceExists(MS_CLIST_SYSTRAY_NOTIFY) && !(g_dat.flags2 & SMF2_SHOWTYPINGCLIST)) {
MIRANDASYSTRAYNOTIFY tn;
tn.szProto = NULL;
@@ -228,17 +228,15 @@ static int TypingMessage(WPARAM wParam, LPARAM lParam)
CallService(MS_CLIST_SYSTRAY_NOTIFY, 0, (LPARAM)& tn);
}
else {
- CLISTEVENT cle = {0};
-
- cle.cbSize = sizeof(cle);
- cle.hContact = wParam;
+ CLISTEVENT cle = { sizeof(cle) };
+ cle.hContact = hContact;
cle.hDbEvent = (HANDLE)1;
cle.flags = CLEF_ONLYAFEW | CLEF_TCHAR;
cle.hIcon = GetCachedIcon("scriver_TYPING");
cle.pszService = "SRMsg/TypingMessage";
cle.ptszTooltip = szTip;
- CallServiceSync(MS_CLIST_REMOVEEVENT, wParam, (LPARAM)1);
- CallServiceSync(MS_CLIST_ADDEVENT, wParam, (LPARAM)& cle);
+ CallServiceSync(MS_CLIST_REMOVEEVENT, hContact, 1);
+ CallServiceSync(MS_CLIST_ADDEVENT, hContact, (LPARAM)&cle);
}
}
return 0;
@@ -352,9 +350,8 @@ static INT_PTR SetStatusText(WPARAM wParam, LPARAM lParam)
return 0;
}
-static int PrebuildContactMenu(WPARAM wParam, LPARAM lParam)
+static int PrebuildContactMenu(WPARAM hContact, LPARAM lParam)
{
- MCONTACT hContact = wParam;
if (hContact == 0)
return 0;
diff --git a/plugins/Scriver/src/statusicon.cpp b/plugins/Scriver/src/statusicon.cpp
index dd370470e7..43fade35d8 100644
--- a/plugins/Scriver/src/statusicon.cpp
+++ b/plugins/Scriver/src/statusicon.cpp
@@ -59,9 +59,8 @@ void CheckStatusIconClick(MCONTACT hContact, HWND hwndFrom, POINT pt, RECT r, in
NotifyEventHooks(hHookIconPressedEvt, (WPARAM)hContact, (LPARAM)&sicd);
}
-static int OnSrmmIconChanged(WPARAM wParam, LPARAM)
+static int OnSrmmIconChanged(WPARAM hContact, LPARAM)
{
- MCONTACT hContact = wParam;
if (hContact == NULL)
WindowList_Broadcast(g_dat.hParentWindowList, DM_STATUSICONCHANGE, 0, 0);
else {
diff --git a/plugins/SecureIM/src/svcs_clist.cpp b/plugins/SecureIM/src/svcs_clist.cpp
index 7af74df185..c12a4d1162 100644
--- a/plugins/SecureIM/src/svcs_clist.cpp
+++ b/plugins/SecureIM/src/svcs_clist.cpp
@@ -1,9 +1,8 @@
#include "commonheaders.h"
-int __cdecl onContactSettingChanged(WPARAM wParam,LPARAM lParam) {
-
- MCONTACT hContact = wParam;
+int __cdecl onContactSettingChanged(WPARAM hContact, LPARAM lParam)
+{
DBCONTACTWRITESETTING *cws=(DBCONTACTWRITESETTING*)lParam;
if (!hContact || strcmp(cws->szSetting,"Status")) return 0;
@@ -65,9 +64,8 @@ int __cdecl onExtraImageApplying(WPARAM wParam, LPARAM)
return 0;
}
-int __cdecl onRebuildContactMenu(WPARAM wParam,LPARAM lParam)
+int __cdecl onRebuildContactMenu(WPARAM hContact,LPARAM lParam)
{
- MCONTACT hContact = wParam;
BOOL bMC = isProtoMetaContacts(hContact);
if (bMC ) hContact = getMostOnline(hContact); // âîçüìåì òîò, ÷åðåç êîòîðûé ïîéäåò ñîîáùåíèå
pUinKey ptr = getUinKey(hContact);
diff --git a/plugins/SecureIM/src/svcs_srmm.cpp b/plugins/SecureIM/src/svcs_srmm.cpp
index 5abc86a7e1..de0b384350 100644
--- a/plugins/SecureIM/src/svcs_srmm.cpp
+++ b/plugins/SecureIM/src/svcs_srmm.cpp
@@ -9,9 +9,8 @@ int __cdecl onWindowEvent(WPARAM, LPARAM lParam)
return 0;
}
-int __cdecl onIconPressed(WPARAM wParam, LPARAM lParam)
+int __cdecl onIconPressed(WPARAM hContact, LPARAM lParam)
{
- MCONTACT hContact = wParam;
if (isProtoMetaContacts(hContact))
hContact = getMostOnline(hContact); // âîçüìåì òîò, ÷åðåç êîòîðûé ïîéäåò ñîîáùåíèå
@@ -21,9 +20,9 @@ int __cdecl onIconPressed(WPARAM wParam, LPARAM lParam)
if (!isContactPGP(hContact) && !isContactGPG(hContact) && !isChatRoom(hContact)) {
if (isContactSecured(hContact) & SECURED)
- Service_DisableIM(wParam,0);
+ Service_DisableIM(hContact, 0);
else
- Service_CreateIM(wParam,0);
+ Service_CreateIM(hContact, 0);
}
return 0;
diff --git a/plugins/SimpleAR/src/Main.cpp b/plugins/SimpleAR/src/Main.cpp
index 9e2d3b3759..ec16743b2f 100644
--- a/plugins/SimpleAR/src/Main.cpp
+++ b/plugins/SimpleAR/src/Main.cpp
@@ -181,9 +181,8 @@ TCHAR* StrReplace (TCHAR* Search, TCHAR* Replace, TCHAR* Resource)
return Resource;
}
-INT addEvent(WPARAM wParam, LPARAM lParam)
+INT addEvent(WPARAM hContact, LPARAM lParam)
{
- MCONTACT hContact = wParam;
HANDLE hDBEvent = (HANDLE)lParam;
BOOL fEnabled = db_get_b(NULL, protocolname, KEY_ENABLED, 1);
diff --git a/plugins/SmileyAdd/src/services.cpp b/plugins/SmileyAdd/src/services.cpp
index 84062d5de1..1c404a7c50 100644
--- a/plugins/SmileyAdd/src/services.cpp
+++ b/plugins/SmileyAdd/src/services.cpp
@@ -354,11 +354,9 @@ INT_PTR RegisterPack(WPARAM, LPARAM lParam)
return TRUE;
}
-INT_PTR CustomCatMenu(WPARAM wParam, LPARAM lParam)
+INT_PTR CustomCatMenu(WPARAM hContact, LPARAM lParam)
{
- const MCONTACT hContact = wParam;
- if (lParam != 0)
- {
+ if (lParam != 0) {
SmileyCategoryType* smct = g_SmileyCategories.GetSmileyCategory((unsigned)lParam - 3);
if (smct != NULL)
opt.WriteContactCategory(hContact, smct->GetName());
@@ -538,16 +536,16 @@ int AccountListChanged(WPARAM wParam, LPARAM lParam)
return 0;
}
-int DbSettingChanged(WPARAM wParam, LPARAM lParam)
+int DbSettingChanged(WPARAM hContact, LPARAM lParam)
{
- MCONTACT hContact = wParam;
- DBCONTACTWRITESETTING* cws = (DBCONTACTWRITESETTING*)lParam;
+ if (hContact == NULL)
+ return 0;
- if (hContact == NULL) return 0;
- if (cws->value.type == DBVT_DELETED) return 0;
+ DBCONTACTWRITESETTING* cws = (DBCONTACTWRITESETTING*)lParam;
+ if (cws->value.type == DBVT_DELETED)
+ return 0;
- if (strcmp(cws->szSetting, "Transport") == 0)
- {
+ if (strcmp(cws->szSetting, "Transport") == 0) {
CMString catname(_T("Standard"));
SmileyCategoryType *smc = g_SmileyCategories.GetSmileyCategory(catname);
if (smc != NULL)
diff --git a/plugins/SpellChecker/src/utils.cpp b/plugins/SpellChecker/src/utils.cpp
index c57261cc1a..7da98ecd97 100644
--- a/plugins/SpellChecker/src/utils.cpp
+++ b/plugins/SpellChecker/src/utils.cpp
@@ -1400,13 +1400,12 @@ int MsgWindowEvent(WPARAM wParam, LPARAM lParam)
}
-int IconPressed(WPARAM wParam, LPARAM lParam)
+int IconPressed(WPARAM hContact, LPARAM lParam)
{
StatusIconClickData *sicd = (StatusIconClickData *) lParam;
if (sicd == NULL || strcmp(sicd->szModule, MODULE_NAME) != 0)
return 0;
- MCONTACT hContact = wParam;
if (hContact == NULL)
return 0;
diff --git a/plugins/StopSpamMod/src/stopspam.cpp b/plugins/StopSpamMod/src/stopspam.cpp
index 3849ef8379..1025a1cf49 100755
--- a/plugins/StopSpamMod/src/stopspam.cpp
+++ b/plugins/StopSpamMod/src/stopspam.cpp
@@ -23,10 +23,8 @@ MIRANDA_HOOK_EVENT(ME_DB_CONTACT_ADDED, w, l)
return 0;
}
-
-MIRANDA_HOOK_EVENT(ME_DB_EVENT_ADDED, wParam, lParam)
+MIRANDA_HOOK_EVENT(ME_DB_EVENT_ADDED, hContact, lParam)
{
- MCONTACT hContact = wParam;
HANDLE hDbEvent = (HANDLE)lParam;
DBEVENTINFO dbei = { sizeof(dbei) };
diff --git a/plugins/StopSpamPlus/src/services.cpp b/plugins/StopSpamPlus/src/services.cpp
index 917393d4a8..83c53c3e21 100644
--- a/plugins/StopSpamPlus/src/services.cpp
+++ b/plugins/StopSpamPlus/src/services.cpp
@@ -1,20 +1,21 @@
#include "headers.h"
-INT_PTR IsContactPassed(WPARAM wParam, LPARAM /*lParam*/)
+INT_PTR IsContactPassed(WPARAM hContact, LPARAM /*lParam*/)
{
- MCONTACT hContact = wParam;
- std::string proto = GetContactProto(hContact);
-
- if ( !plSets->ProtoDisabled( proto.c_str()))
+ char *szProto = GetContactProto(hContact);
+ if (szProto == NULL)
return CS_PASSED;
- if ( db_get_b(hContact, pluginName, answeredSetting, 0))
+ if (!plSets->ProtoDisabled(szProto))
return CS_PASSED;
- if ( !db_get_b(hContact, "CList", "NotOnList", 0) && db_get_w( hContact, proto.c_str(), "SrvGroupId", -1 ) != 1)
+ if (db_get_b(hContact, pluginName, answeredSetting, 0))
return CS_PASSED;
- if ( IsExistMyMessage(hContact))
+ if (!db_get_b(hContact, "CList", "NotOnList", 0) && db_get_w(hContact, szProto, "SrvGroupId", -1) != 1)
+ return CS_PASSED;
+
+ if (IsExistMyMessage(hContact))
return CS_PASSED;
return CS_NOTPASSED;
@@ -26,12 +27,12 @@ INT_PTR RemoveTempContacts(WPARAM wParam,LPARAM lParam)
MCONTACT hNext = db_find_next(hContact);
ptrT szGroup( db_get_tsa( hContact, "CList", "Group"));
- if ( db_get_b(hContact, "CList", "NotOnList", 0) || db_get_b(hContact, "CList", "Hidden", 0 ) || (szGroup != NULL && (_tcsstr(szGroup, _T("Not In List")) || _tcsstr(szGroup, TranslateT("Not In List"))))) {
+ if (db_get_b(hContact, "CList", "NotOnList", 0) || db_get_b(hContact, "CList", "Hidden", 0) || (szGroup != NULL && (_tcsstr(szGroup, _T("Not In List")) || _tcsstr(szGroup, TranslateT("Not In List"))))) {
char *szProto = GetContactProto(hContact);
if (szProto != NULL) {
// Check if protocol uses server side lists
DWORD caps = CallProtoService(szProto, PS_GETCAPS, PFLAGNUM_1, 0);
- if ( caps & PF1_SERVERCLIST ) {
+ if (caps & PF1_SERVERCLIST) {
int status = CallProtoService(szProto, PS_GETSTATUS, 0, 0);
if (status == ID_STATUS_OFFLINE || (status >= ID_STATUS_CONNECTING && status < ID_STATUS_CONNECTING + MAX_CONNECT_RETRIES))
// Set a flag so we remember to delete the contact when the protocol goes online the next time
diff --git a/plugins/TabSRMM/src/generic_msghandlers.cpp b/plugins/TabSRMM/src/generic_msghandlers.cpp
index d607e38931..bf347b89e3 100644
--- a/plugins/TabSRMM/src/generic_msghandlers.cpp
+++ b/plugins/TabSRMM/src/generic_msghandlers.cpp
@@ -1893,9 +1893,8 @@ void TSAPI DM_UpdateTitle(TWindowData *dat, WPARAM wParam, LPARAM lParam)
static HANDLE hHookIconPressedEvt;
-static int OnSrmmIconChanged(WPARAM wParam, LPARAM)
+static int OnSrmmIconChanged(WPARAM hContact, LPARAM)
{
- MCONTACT hContact = wParam;
if (hContact == NULL)
M.BroadcastMessage(DM_STATUSICONCHANGE, 0, 0);
else {
diff --git a/plugins/TabSRMM/src/mim.cpp b/plugins/TabSRMM/src/mim.cpp
index 8b069edb8b..be9b230e48 100644
--- a/plugins/TabSRMM/src/mim.cpp
+++ b/plugins/TabSRMM/src/mim.cpp
@@ -329,13 +329,12 @@ void CMimAPI::InitAPI()
* hook subscriber function for incoming message typing events
*/
-int CMimAPI::TypingMessage(WPARAM wParam, LPARAM lParam)
+int CMimAPI::TypingMessage(WPARAM hContact, LPARAM lParam)
{
HWND hwnd = 0;
int issplit = 1, foundWin = 0, preTyping = 0;
BOOL fShowOnClist = TRUE;
- MCONTACT hContact = wParam;
if (hContact) {
if ((hwnd = M.FindWindow(hContact)) && M.GetByte(SRMSGMOD, SRMSGSET_SHOWTYPING, SRMSGDEFSET_SHOWTYPING))
preTyping = SendMessage(hwnd, DM_TYPING, 0, lParam);
@@ -407,14 +406,14 @@ int CMimAPI::TypingMessage(WPARAM wParam, LPARAM lParam)
}
if (fShowOnClist) {
CLISTEVENT cle = { sizeof(cle) };
- cle.hContact = wParam;
+ cle.hContact = hContact;
cle.hDbEvent = (HANDLE)1;
cle.flags = CLEF_ONLYAFEW | CLEF_TCHAR;
cle.hIcon = PluginConfig.g_buttonBarIcons[ICON_DEFAULT_TYPING];
cle.pszService = "SRMsg/TypingMessage";
cle.ptszTooltip = szTip;
- CallServiceSync(MS_CLIST_REMOVEEVENT, wParam, (LPARAM)1);
- CallServiceSync(MS_CLIST_ADDEVENT, wParam, (LPARAM)&cle);
+ CallServiceSync(MS_CLIST_REMOVEEVENT, hContact, (LPARAM)1);
+ CallServiceSync(MS_CLIST_ADDEVENT, hContact, (LPARAM)&cle);
}
}
}
@@ -466,9 +465,8 @@ int CMimAPI::ProtoAck(WPARAM wParam, LPARAM lParam)
return 0;
}
-int CMimAPI::PrebuildContactMenu(WPARAM wParam, LPARAM lParam)
+int CMimAPI::PrebuildContactMenu(WPARAM hContact, LPARAM lParam)
{
- MCONTACT hContact = wParam;
if (hContact == NULL)
return NULL;
@@ -512,7 +510,7 @@ int CMimAPI::DispatchNewEvent(WPARAM wParam, LPARAM lParam)
* if a session is already created, it just does nothing and DispatchNewEvent() will take care.
*/
-int CMimAPI::MessageEventAdded(WPARAM wParam, LPARAM lParam)
+int CMimAPI::MessageEventAdded(WPARAM hContact, LPARAM lParam)
{
BYTE bAutoPopup = FALSE, bAutoCreate = FALSE, bAutoContainer = FALSE, bAllowAutoCreate = 0;
TCHAR szName[CONTAINER_NAMELEN + 1];
@@ -522,7 +520,6 @@ int CMimAPI::MessageEventAdded(WPARAM wParam, LPARAM lParam)
DBEVENTINFO dbei = { sizeof(dbei) };
db_event_get(hDbEvent, &dbei);
- MCONTACT hContact = wParam;
HWND hwnd = M.FindWindow(hContact);
BOOL isCustomEvent = IsCustomEvent(dbei.eventType);
@@ -530,7 +527,7 @@ int CMimAPI::MessageEventAdded(WPARAM wParam, LPARAM lParam)
if ((dbei.flags & (DBEF_READ | DBEF_SENT)) || (isCustomEvent && !isShownCustomEvent))
return 0;
- CallServiceSync(MS_CLIST_REMOVEEVENT, wParam, 1);
+ CallServiceSync(MS_CLIST_REMOVEEVENT, hContact, 1);
if (hwnd) {
TContainerData *pTargetContainer = 0;
@@ -614,7 +611,7 @@ int CMimAPI::MessageEventAdded(WPARAM wParam, LPARAM lParam)
else {
char *szProto = GetContactProto(hContact);
if (PluginConfig.g_MetaContactsAvail && szProto && !strcmp(szProto, (char *)CallService(MS_MC_GETPROTOCOLNAME, 0, 0))) {
- MCONTACT hSubconttact = (MCONTACT)CallService(MS_MC_GETMOSTONLINECONTACT, wParam, 0);
+ MCONTACT hSubconttact = (MCONTACT)CallService(MS_MC_GETMOSTONLINECONTACT, hContact, 0);
szProto = GetContactProto(hSubconttact);
}
if (szProto) {
diff --git a/plugins/TabSRMM/src/msgs.cpp b/plugins/TabSRMM/src/msgs.cpp
index a64a8661b4..98dde21f3b 100644
--- a/plugins/TabSRMM/src/msgs.cpp
+++ b/plugins/TabSRMM/src/msgs.cpp
@@ -294,9 +294,8 @@ static INT_PTR ReadMessageCommand(WPARAM, LPARAM lParam)
* for filling the message input box with a passed message
*/
-INT_PTR SendMessageCommand_W(WPARAM wParam, LPARAM lParam)
+INT_PTR SendMessageCommand_W(WPARAM hContact, LPARAM lParam)
{
- MCONTACT hContact = wParam;
TNewWindowData newData = { 0 };
int isSplit = 1;
@@ -309,9 +308,9 @@ INT_PTR SendMessageCommand_W(WPARAM wParam, LPARAM lParam)
wchar_t *tszText = (wchar_t *)mir_alloc((iLen + 1) * sizeof(wchar_t));
wcsncpy(tszText, (wchar_t *)lParam, iLen + 1);
tszText[iLen] = 0;
- PostMessage(PluginConfig.g_hwndHotkeyHandler, DM_SENDMESSAGECOMMANDW, wParam, (LPARAM)tszText);
- } else
- PostMessage(PluginConfig.g_hwndHotkeyHandler, DM_SENDMESSAGECOMMANDW, wParam, 0);
+ PostMessage(PluginConfig.g_hwndHotkeyHandler, DM_SENDMESSAGECOMMANDW, hContact, (LPARAM)tszText);
+ }
+ else PostMessage(PluginConfig.g_hwndHotkeyHandler, DM_SENDMESSAGECOMMANDW, hContact, 0);
return 0;
}
@@ -353,9 +352,8 @@ INT_PTR SendMessageCommand_W(WPARAM wParam, LPARAM lParam)
* contacts handle must be passed in wParam.
*/
-INT_PTR SendMessageCommand(WPARAM wParam, LPARAM lParam)
+INT_PTR SendMessageCommand(WPARAM hContact, LPARAM lParam)
{
- MCONTACT hContact = wParam;
TNewWindowData newData = { 0 };
int isSplit = 1;
@@ -365,9 +363,9 @@ INT_PTR SendMessageCommand(WPARAM wParam, LPARAM lParam)
char *szText = (char *)mir_alloc(iLen + 1);
strncpy(szText, (char *)lParam, iLen + 1);
szText[iLen] = 0;
- PostMessage(PluginConfig.g_hwndHotkeyHandler, DM_SENDMESSAGECOMMAND, wParam, (LPARAM)szText);
+ PostMessage(PluginConfig.g_hwndHotkeyHandler, DM_SENDMESSAGECOMMAND, hContact, (LPARAM)szText);
} else
- PostMessage(PluginConfig.g_hwndHotkeyHandler, DM_SENDMESSAGECOMMAND, wParam, 0);
+ PostMessage(PluginConfig.g_hwndHotkeyHandler, DM_SENDMESSAGECOMMAND, hContact, 0);
return 0;
}
@@ -389,9 +387,10 @@ INT_PTR SendMessageCommand(WPARAM wParam, LPARAM lParam)
SendMessageA(hEdit, EM_REPLACESEL, FALSE, (LPARAM)(char *) lParam);
}
SendMessage(hwnd, DM_ACTIVATEME, 0, 0); // ask the message window about its parent...
- } else {
+ }
+ else {
TCHAR szName[CONTAINER_NAMELEN + 1];
- GetContainerNameForContact(wParam, szName, CONTAINER_NAMELEN);
+ GetContainerNameForContact(hContact, szName, CONTAINER_NAMELEN);
TContainerData *pContainer = FindContainerByName(szName);
if (pContainer == NULL)
pContainer = CreateContainer(szName, FALSE, hContact);
diff --git a/plugins/TipperYM/src/message_pump.cpp b/plugins/TipperYM/src/message_pump.cpp
index d5917579cb..c7609c6f50 100644
--- a/plugins/TipperYM/src/message_pump.cpp
+++ b/plugins/TipperYM/src/message_pump.cpp
@@ -321,27 +321,24 @@ int HideTipHook(WPARAM wParam, LPARAM lParam)
int ProtoAck(WPARAM wParam, LPARAM lParam)
{
- ACKDATA *ack = (ACKDATA *)lParam;
+ ACKDATA *ack = (ACKDATA*)lParam;
if (ack->result != ACKRESULT_SUCCESS)
return 0;
if (ack->type == ACKTYPE_AWAYMSG) {
- TCHAR* tszMsg = ( TCHAR* )ack->lParam;
- if ( lstrlen(tszMsg))
+ TCHAR *tszMsg = (TCHAR*)ack->lParam;
+ if (lstrlen(tszMsg))
PostMPMessage(MUM_GOTSTATUS, (WPARAM)ack->hContact, (LPARAM)mir_tstrdup(tszMsg));
}
else if (ack->type == ICQACKTYPE_XSTATUS_RESPONSE)
- {
PostMPMessage(MUM_GOTXSTATUS, (WPARAM)ack->hContact, 0);
- }
return 0;
}
-int AvatarChanged(WPARAM wParam, LPARAM lParam)
+int AvatarChanged(WPARAM hContact, LPARAM lParam)
{
- MCONTACT hContact = wParam;
- PostMPMessage(MUM_GOTAVATAR, (WPARAM)hContact, 0);
+ PostMPMessage(MUM_GOTAVATAR, hContact, 0);
return 0;
}
diff --git a/plugins/TooltipNotify/src/TooltipNotify.cpp b/plugins/TooltipNotify/src/TooltipNotify.cpp
index daba6e6b4c..304833d981 100644
--- a/plugins/TooltipNotify/src/TooltipNotify.cpp
+++ b/plugins/TooltipNotify/src/TooltipNotify.cpp
@@ -154,25 +154,21 @@ int CTooltipNotify::ModulesLoaded(WPARAM wParam, LPARAM lParam)
}
-int CTooltipNotify::ProtoContactIsTyping(WPARAM wParam, LPARAM lParam)
+int CTooltipNotify::ProtoContactIsTyping(WPARAM hContact, LPARAM lParam)
{
if (!m_sOptions.bTyping) return 0;
- if (lParam>0)
- {
+ if (lParam > 0) {
STooltipData *pTooltipData = new STooltipData;
pTooltipData->uiTimeout = lParam*1000;
- pTooltipData->hContact = wParam;
+ pTooltipData->hContact = hContact;
pTooltipData->iStatus = ID_TTNTF_STATUS_TYPING;
EndNotifyAll();
SkinPlaySound(SND_TYPING);
BeginNotify(pTooltipData);
}
- else
- {
- EndNotifyAll();
- }
+ else EndNotifyAll();
return 0;
}
@@ -208,11 +204,11 @@ int CTooltipNotify::ProtoAck(WPARAM wParam, LPARAM lParam)
return 0;
}
-int CTooltipNotify::ContactSettingChanged(WPARAM wParam, LPARAM lParam)
+int CTooltipNotify::ContactSettingChanged(WPARAM hContact, LPARAM lParam)
{
DBCONTACTWRITESETTING *cws = (DBCONTACTWRITESETTING*)lParam;
- MCONTACT hContact = wParam;
- if(hContact==NULL) return 0;
+ if (!hContact)
+ return 0;
bool idle = false;
if (lstrcmpA(cws->szSetting,"Status")==0)
@@ -221,25 +217,21 @@ int CTooltipNotify::ContactSettingChanged(WPARAM wParam, LPARAM lParam)
idle = true;
else return 0;
- if(db_get_b(hContact, "CList", "Hidden", 0)) return 0;
+ if(db_get_b(hContact, "CList", "Hidden", 0))
+ return 0;
const char *pszProto = cws->szModule;
if (db_get_b(NULL, MODULENAME, pszProto, ProtoUserBit|ProtoIntBit) != (ProtoUserBit|ProtoIntBit))
- {
return 0;
- }
if (db_get_b(hContact, "CList", "NotOnList", 0) && m_sOptions.bIgnoreUnknown)
- {
return 0;
- }
if (db_get_b(hContact, MODULENAME, CONTACT_IGNORE_TTNOTIFY, m_sOptions.bIgnoreNew))
- {
return 0;
- }
- if (idle && !m_sOptions.bIdle) return 0;
+ if (idle && !m_sOptions.bIdle)
+ return 0;
WORD wNewStatus = cws->value.wVal;
switch(wNewStatus)
diff --git a/plugins/UserInfoEx/src/ex_import/svc_ExImport.cpp b/plugins/UserInfoEx/src/ex_import/svc_ExImport.cpp
index 40e20e4606..bd6011c4d2 100644
--- a/plugins/UserInfoEx/src/ex_import/svc_ExImport.cpp
+++ b/plugins/UserInfoEx/src/ex_import/svc_ExImport.cpp
@@ -229,20 +229,20 @@ INT_PTR svcExIm_MainImport_Service(WPARAM wParam, LPARAM lParam)
/*********************************
* Ex/import Contact (ContactMenu)
*********************************/
-INT_PTR svcExIm_ContactExport_Service(WPARAM wParam, LPARAM lParam)
+INT_PTR svcExIm_ContactExport_Service(WPARAM hContact, LPARAM lParam)
{
ExImParam ExIm;
ZeroMemory(&ExIm, sizeof(ExIm));
- ExIm.hContact = wParam;
+ ExIm.hContact = hContact;
ExIm.Typ = EXIM_CONTACT;
return SvcExImport_Export(&ExIm, (HWND)lParam);
}
-INT_PTR svcExIm_ContactImport_Service(WPARAM wParam, LPARAM lParam)
+INT_PTR svcExIm_ContactImport_Service(WPARAM hContact, LPARAM lParam)
{
ExImParam ExIm;
ZeroMemory(&ExIm, sizeof(ExIm));
- ExIm.hContact = wParam;
+ ExIm.hContact = hContact;
ExIm.Typ = EXIM_CONTACT;
return SvcExImport_Import(&ExIm, (HWND)lParam);
}
diff --git a/plugins/UserInfoEx/src/svc_reminder.cpp b/plugins/UserInfoEx/src/svc_reminder.cpp
index 200ded8715..491a26685a 100644
--- a/plugins/UserInfoEx/src/svc_reminder.cpp
+++ b/plugins/UserInfoEx/src/svc_reminder.cpp
@@ -725,9 +725,8 @@ static INT_PTR CheckService(WPARAM, LPARAM)
* return: 0
**/
-static INT_PTR BackupBirthdayService(WPARAM wParam, LPARAM lParam)
+static INT_PTR BackupBirthdayService(WPARAM hContact, LPARAM lParam)
{
- MCONTACT hContact = wParam;
MAnnivDate mdb;
if (hContact) {
diff --git a/plugins/Variables/src/contact.cpp b/plugins/Variables/src/contact.cpp
index 244f0fcfc0..ff139c7e93 100644
--- a/plugins/Variables/src/contact.cpp
+++ b/plugins/Variables/src/contact.cpp
@@ -350,10 +350,9 @@ int getContactFromString(CONTACTSINFO *ci)
}
/* keep cache consistent */
-static int contactSettingChanged(WPARAM wParam, LPARAM lParam)
+static int contactSettingChanged(WPARAM hContact, LPARAM lParam)
{
DBCONTACTWRITESETTING *dbw = (DBCONTACTWRITESETTING*)lParam;
- MCONTACT hContact = wParam;
mir_cslock lck(csContactCache);
for (int i=0; i < cacheSize; i++) {
diff --git a/plugins/WhenWasIt/src/services.cpp b/plugins/WhenWasIt/src/services.cpp
index 7843247755..23acc4efd6 100644
--- a/plugins/WhenWasIt/src/services.cpp
+++ b/plugins/WhenWasIt/src/services.cpp
@@ -167,13 +167,12 @@ INT_PTR ShowListService(WPARAM wParam, LPARAM lParam)
return 0;
}
-INT_PTR AddBirthdayService(WPARAM wParam, LPARAM lParam)
+INT_PTR AddBirthdayService(WPARAM hContact, LPARAM lParam)
{
- MCONTACT hContact = wParam;
HWND hWnd = WindowList_Find(hAddBirthdayWndsList, hContact);
- if ( !hWnd) {
+ if (!hWnd)
hWnd = CreateDialogParam(hInstance, MAKEINTRESOURCE(IDD_ADD_BIRTHDAY), NULL, DlgProcAddBirthday, (LPARAM) hContact);
- }
+
return ShowWindow(hWnd, SW_SHOW);
}
diff --git a/protocols/AimOscar/src/links.cpp b/protocols/AimOscar/src/links.cpp
index 0286e3af93..538f9e3d6d 100644
--- a/protocols/AimOscar/src/links.cpp
+++ b/protocols/AimOscar/src/links.cpp
@@ -58,7 +58,7 @@ static TCHAR* url_decode(TCHAR* str)
return str;
}
-static INT_PTR ServiceParseAimLink(WPARAM /*wParam*/,LPARAM lParam)
+static INT_PTR ServiceParseAimLink(WPARAM,LPARAM lParam)
{
if (lParam == 0) return 1; /* sanity check */
diff --git a/protocols/AimOscar/src/services.cpp b/protocols/AimOscar/src/services.cpp
index 24d9b1e33f..e21396f34c 100644
--- a/protocols/AimOscar/src/services.cpp
+++ b/protocols/AimOscar/src/services.cpp
@@ -26,7 +26,7 @@ INT_PTR CAimProto::GetMyAwayMsg(WPARAM wParam,LPARAM lParam)
return (lParam & SGMA_UNICODE) ? (INT_PTR)mir_utf8decodeW(*msgptr) : (INT_PTR)mir_utf8decodeA(*msgptr);
}
-int CAimProto::OnIdleChanged(WPARAM /*wParam*/, LPARAM lParam)
+int CAimProto::OnIdleChanged(WPARAM, LPARAM lParam)
{
if (state != 1)
{
@@ -99,7 +99,7 @@ INT_PTR CAimProto::GetProfile(WPARAM wParam, LPARAM lParam)
return 0;
}
-INT_PTR CAimProto::GetHTMLAwayMsg(WPARAM wParam, LPARAM /*lParam*/)
+INT_PTR CAimProto::GetHTMLAwayMsg(WPARAM wParam, LPARAM)
{
if (state != 1)
return 0;
@@ -113,13 +113,12 @@ INT_PTR CAimProto::GetHTMLAwayMsg(WPARAM wParam, LPARAM /*lParam*/)
return 0;
}
-int CAimProto::OnDbSettingChanged(WPARAM wParam,LPARAM lParam)
+int CAimProto::OnDbSettingChanged(WPARAM hContact, LPARAM lParam)
{
DBCONTACTWRITESETTING *cws = (DBCONTACTWRITESETTING*)lParam;
- if (strcmp(cws->szModule, MOD_KEY_CL) == 0 && state == 1 && wParam)
+ if (strcmp(cws->szModule, MOD_KEY_CL) == 0 && state == 1 && hContact)
{
- MCONTACT hContact = wParam;
if (strcmp(cws->szSetting, AIM_KEY_NL) == 0)
{
if (cws->value.type == DBVT_DELETED)
@@ -165,12 +164,10 @@ int CAimProto::OnDbSettingChanged(WPARAM wParam,LPARAM lParam)
return 0;
}
-int CAimProto::OnContactDeleted(WPARAM wParam,LPARAM /*lParam*/)
+int CAimProto::OnContactDeleted(WPARAM hContact, LPARAM)
{
if (state != 1) return 0;
- MCONTACT hContact = wParam;
-
if (db_get_b(hContact, MOD_KEY_CL, AIM_KEY_NL, 0))
return 0;
@@ -199,33 +196,27 @@ int CAimProto::OnContactDeleted(WPARAM wParam,LPARAM /*lParam*/)
}
-int CAimProto::OnGroupChange(WPARAM wParam,LPARAM lParam)
+int CAimProto::OnGroupChange(WPARAM hContact,LPARAM lParam)
{
if (state != 1 || !getByte(AIM_KEY_MG, 1)) return 0;
- MCONTACT hContact = wParam;
CLISTGROUPCHANGE* grpchg = (CLISTGROUPCHANGE*)lParam;
- if (hContact == NULL)
- {
- if (grpchg->pszNewName == NULL && grpchg->pszOldName != NULL)
- {
+ if (hContact == NULL) {
+ if (grpchg->pszNewName == NULL && grpchg->pszOldName != NULL) {
char* szOldName = mir_utf8encodeT(grpchg->pszOldName);
unsigned short group_id = group_list.find_id(szOldName);
- if (group_id)
- {
+ if (group_id) {
aim_delete_contact(hServerConn, seqno, szOldName, 0, group_id, 1, false);
group_list.remove_by_id(group_id);
update_server_group("", 0);
}
mir_free(szOldName);
}
- else if (grpchg->pszNewName != NULL && grpchg->pszOldName != NULL)
- {
+ else if (grpchg->pszNewName != NULL && grpchg->pszOldName != NULL) {
char* szOldName = mir_utf8encodeT(grpchg->pszOldName);
unsigned short group_id = group_list.find_id(szOldName);
- if (group_id)
- {
+ if (group_id) {
char* szNewName = mir_utf8encodeT(grpchg->pszNewName);
update_server_group(szNewName, group_id);
mir_free(szNewName);
@@ -233,63 +224,54 @@ int CAimProto::OnGroupChange(WPARAM wParam,LPARAM lParam)
mir_free(szOldName);
}
}
- else
- {
- if (is_my_contact(hContact) && getBuddyId(hContact, 1) && !db_get_b(hContact, MOD_KEY_CL, AIM_KEY_NL, 0))
- {
- if (grpchg->pszNewName)
- {
+ else {
+ if (is_my_contact(hContact) && getBuddyId(hContact, 1) && !db_get_b(hContact, MOD_KEY_CL, AIM_KEY_NL, 0)) {
+ if (grpchg->pszNewName) {
char* szNewName = mir_utf8encodeT(grpchg->pszNewName);
add_contact_to_group(hContact, szNewName);
mir_free(szNewName);
}
- else
- add_contact_to_group(hContact, AIM_DEFAULT_GROUP);
+ else add_contact_to_group(hContact, AIM_DEFAULT_GROUP);
}
}
return 0;
}
-INT_PTR CAimProto::AddToServerList(WPARAM wParam, LPARAM /*lParam*/)
+INT_PTR CAimProto::AddToServerList(WPARAM hContact, LPARAM)
{
if (state != 1) return 0;
- MCONTACT hContact = wParam;
DBVARIANT dbv;
- if (!db_get_utf(hContact, MOD_KEY_CL, OTH_KEY_GP, &dbv) && dbv.pszVal[0])
- {
+ if (!db_get_utf(hContact, MOD_KEY_CL, OTH_KEY_GP, &dbv) && dbv.pszVal[0]) {
add_contact_to_group(hContact, dbv.pszVal);
db_free(&dbv);
}
- else
- add_contact_to_group(hContact, AIM_DEFAULT_GROUP);
+ else add_contact_to_group(hContact, AIM_DEFAULT_GROUP);
return 0;
}
-INT_PTR CAimProto::BlockBuddy(WPARAM wParam, LPARAM /*lParam*/)
+INT_PTR CAimProto::BlockBuddy(WPARAM hContact, LPARAM)
{
- if (state != 1) return 0;
+ if (state != 1)
+ return 0;
- MCONTACT hContact = wParam;
unsigned short item_id;
DBVARIANT dbv;
- if (getString(hContact, AIM_KEY_SN, &dbv)) return 0;
+ if (getString(hContact, AIM_KEY_SN, &dbv))
+ return 0;
- switch(pd_mode)
- {
+ switch(pd_mode) {
case 1:
pd_mode = 4;
aim_set_pd_info(hServerConn, seqno);
case 4:
item_id = block_list.find_id(dbv.pszVal);
- if (item_id != 0)
- {
+ if (item_id != 0) {
block_list.remove_by_id(item_id);
aim_delete_contact(hServerConn, seqno, dbv.pszVal, item_id, 0, 3, false);
}
- else
- {
+ else {
item_id = block_list.add(dbv.pszVal);
aim_add_contact(hServerConn, seqno, dbv.pszVal, item_id, 0, 3, false);
}
@@ -301,13 +283,11 @@ INT_PTR CAimProto::BlockBuddy(WPARAM wParam, LPARAM /*lParam*/)
case 3:
item_id = allow_list.find_id(dbv.pszVal);
- if (item_id != 0)
- {
+ if (item_id != 0) {
allow_list.remove_by_id(item_id);
aim_delete_contact(hServerConn, seqno, dbv.pszVal, item_id, 0, 2, false);
}
- else
- {
+ else {
item_id = allow_list.add(dbv.pszVal);
aim_add_contact(hServerConn, seqno, dbv.pszVal, item_id, 0, 2);
}
@@ -318,18 +298,16 @@ INT_PTR CAimProto::BlockBuddy(WPARAM wParam, LPARAM /*lParam*/)
return 0;
}
- INT_PTR CAimProto::JoinChatUI(WPARAM /*wParam*/, LPARAM /*lParam*/)
+ INT_PTR CAimProto::JoinChatUI(WPARAM, LPARAM)
{
DialogBoxParam(hInstance, MAKEINTRESOURCE(IDD_CHAT), NULL, join_chat_dialog, LPARAM(this));
return 0;
}
-INT_PTR CAimProto::OnJoinChat(WPARAM wParam, LPARAM /*lParam*/)
+INT_PTR CAimProto::OnJoinChat(WPARAM hContact, LPARAM)
{
if (state != 1) return 0;
- MCONTACT hContact = wParam;
-
DBVARIANT dbv;
if (!getString(hContact, "ChatRoomID", &dbv))
{
@@ -340,7 +318,7 @@ INT_PTR CAimProto::OnJoinChat(WPARAM wParam, LPARAM /*lParam*/)
return 0;
}
-INT_PTR CAimProto::OnLeaveChat(WPARAM wParam, LPARAM /*lParam*/)
+INT_PTR CAimProto::OnLeaveChat(WPARAM wParam, LPARAM)
{
if (state != 1) return 0;
@@ -355,13 +333,13 @@ INT_PTR CAimProto::OnLeaveChat(WPARAM wParam, LPARAM /*lParam*/)
return 0;
}
-INT_PTR CAimProto::InstantIdle(WPARAM /*wParam*/, LPARAM /*lParam*/)
+INT_PTR CAimProto::InstantIdle(WPARAM, LPARAM)
{
DialogBoxParam(hInstance, MAKEINTRESOURCE(IDD_IDLE), NULL, instant_idle_dialog, LPARAM(this));
return 0;
}
-INT_PTR CAimProto::ManageAccount(WPARAM /*wParam*/, LPARAM /*lParam*/)
+INT_PTR CAimProto::ManageAccount(WPARAM, LPARAM)
{
ShellExecuteA(NULL, "open", "https://my.screenname.aol.com", NULL, NULL, SW_SHOW);
return 0;
diff --git a/protocols/AimOscar/src/theme.cpp b/protocols/AimOscar/src/theme.cpp
index d8c052591c..b3470d8ec9 100644
--- a/protocols/AimOscar/src/theme.cpp
+++ b/protocols/AimOscar/src/theme.cpp
@@ -177,9 +177,8 @@ void InitExtraIcons(void)
/////////////////////////////////////////////////////////////////////////////////////////
// OnPreBuildContactMenu
-int CAimProto::OnPreBuildContactMenu(WPARAM wParam,LPARAM /*lParam*/)
+int CAimProto::OnPreBuildContactMenu(WPARAM hContact, LPARAM)
{
- MCONTACT hContact = wParam;
bool bIsChatRoom = isChatRoom(hContact);
//see if we should add the html away message context menu items
diff --git a/protocols/AimOscar/src/ui.cpp b/protocols/AimOscar/src/ui.cpp
index fbcf065d70..5e5a4fd7f5 100644
--- a/protocols/AimOscar/src/ui.cpp
+++ b/protocols/AimOscar/src/ui.cpp
@@ -766,7 +766,7 @@ int CAimProto::OnUserInfoInit(WPARAM wParam,LPARAM lParam)
return 0;
}
-INT_PTR CAimProto::EditProfile(WPARAM /*wParam*/, LPARAM /*lParam*/)
+INT_PTR CAimProto::EditProfile(WPARAM, LPARAM)
{
DialogBoxParam(hInstance, MAKEINTRESOURCE(IDD_AIM), NULL, userinfo_dialog, LPARAM(this));
return 0;
diff --git a/protocols/FacebookRM/src/chat.cpp b/protocols/FacebookRM/src/chat.cpp
index 99d4e96610..e2a553cbcc 100644
--- a/protocols/FacebookRM/src/chat.cpp
+++ b/protocols/FacebookRM/src/chat.cpp
@@ -246,10 +246,8 @@ void FacebookProto::AddChat(const TCHAR *tid, const TCHAR *tname)
CallServiceSync(MS_GC_EVENT,SESSION_ONLINE, reinterpret_cast<LPARAM>(&gce));
}
-INT_PTR FacebookProto::OnJoinChat(WPARAM wParam,LPARAM suppress)
+INT_PTR FacebookProto::OnJoinChat(WPARAM hContact, LPARAM suppress)
{
- MCONTACT hContact = wParam;
-
// TODO: load info from server + old history,...
ptrT idT( getTStringA(hContact, "ChatRoomID"));
diff --git a/protocols/GTalkExt/src/avatar.cpp b/protocols/GTalkExt/src/avatar.cpp
index 4755c3da0a..e3ded257f1 100644
--- a/protocols/GTalkExt/src/avatar.cpp
+++ b/protocols/GTalkExt/src/avatar.cpp
@@ -105,13 +105,13 @@ VOID CALLBACK CallSetAvatar(PVOID lpParameter, BOOLEAN TimerOrWaitFired)
}
}
-int AvaChanged(WPARAM wParam, LPARAM lParam)
+int AvaChanged(WPARAM hContact, LPARAM lParam)
{
- if (!lParam && db_get_b(wParam, SHORT_PLUGIN_NAME, PSEUDOCONTACT_FLAG, 0)) {
+ if (!lParam && db_get_b(hContact, SHORT_PLUGIN_NAME, PSEUDOCONTACT_FLAG, 0)) {
BOOL enqueued = FALSE;
AVACHANGED *ach = (AVACHANGED*)malloc(sizeof(AVACHANGED));
__try {
- ach->hContact = wParam;
+ ach->hContact = hContact;
enqueued = CreateTimerQueueTimer(&ach->hTimer, NULL, CallSetAvatar, ach, SET_AVATAR_INTERVAL, 0, WT_EXECUTEONLYONCE);
}
__finally {
diff --git a/protocols/GTalkExt/src/handlers.cpp b/protocols/GTalkExt/src/handlers.cpp
index 8e31d7bf89..96ac5e94e6 100644
--- a/protocols/GTalkExt/src/handlers.cpp
+++ b/protocols/GTalkExt/src/handlers.cpp
@@ -424,10 +424,9 @@ int OnExtListInit(WPARAM wParam, LPARAM lParam)
// for our pseudo contact only our own popups are allowed
// 0 = allowed, 1 = disallowed
-int OnFilterPopup(WPARAM wParam, LPARAM lParam)
+int OnFilterPopup(WPARAM hContact, LPARAM lParam)
{
- MCONTACT hContact = wParam;
- if ( !db_get_b(hContact, SHORT_PLUGIN_NAME, PSEUDOCONTACT_FLAG, 0))
+ if (!db_get_b(hContact, SHORT_PLUGIN_NAME, PSEUDOCONTACT_FLAG, 0))
return 0;
return (lParam != (LPARAM)&PopupProc);
diff --git a/protocols/Gadu-Gadu/src/core.cpp b/protocols/Gadu-Gadu/src/core.cpp
index 886c8b2493..b768be5271 100644
--- a/protocols/Gadu-Gadu/src/core.cpp
+++ b/protocols/Gadu-Gadu/src/core.cpp
@@ -1270,9 +1270,8 @@ void GGPROTO::broadcastnewstatus(int newStatus)
////////////////////////////////////////////////////////////
// When contact is deleted
-int GGPROTO::contactdeleted(WPARAM wParam, LPARAM lParam)
+int GGPROTO::contactdeleted(WPARAM hContact, LPARAM lParam)
{
- MCONTACT hContact = wParam;
uin_t uin = (uin_t)getDword(hContact, GG_KEY_UIN, 0);
// Terminate conference if contact is deleted
@@ -1324,10 +1323,9 @@ static TCHAR* sttSettingToTchar( DBVARIANT* value )
return NULL;
}
-int GGPROTO::dbsettingchanged(WPARAM wParam, LPARAM lParam)
+int GGPROTO::dbsettingchanged(WPARAM hContact, LPARAM lParam)
{
DBCONTACTWRITESETTING *cws = (DBCONTACTWRITESETTING *) lParam;
- MCONTACT hContact = wParam;
char *szProto = NULL;
debugLogA("dbsettingchanged(): fired. szModule=%s szSetting=%s", cws->szModule, cws->szSetting);
diff --git a/protocols/Gadu-Gadu/src/gg.cpp b/protocols/Gadu-Gadu/src/gg.cpp
index 46d93a75b8..6cdb929f0f 100644
--- a/protocols/Gadu-Gadu/src/gg.cpp
+++ b/protocols/Gadu-Gadu/src/gg.cpp
@@ -211,9 +211,8 @@ static GGPROTO* gg_getprotoinstance(MCONTACT hContact)
//////////////////////////////////////////////////////////
// Handles PrebuildContactMenu event
-static int gg_prebuildcontactmenu(WPARAM wParam, LPARAM lParam)
+static int gg_prebuildcontactmenu(WPARAM hContact, LPARAM lParam)
{
- const MCONTACT hContact = wParam;
GGPROTO* gg = gg_getprotoinstance(hContact);
if (gg == NULL)
return 0;
@@ -230,9 +229,8 @@ static int gg_prebuildcontactmenu(WPARAM wParam, LPARAM lParam)
//////////////////////////////////////////////////////////
// Contact block service function
-INT_PTR GGPROTO::blockuser(WPARAM wParam, LPARAM lParam)
+INT_PTR GGPROTO::blockuser(WPARAM hContact, LPARAM lParam)
{
- const MCONTACT hContact = wParam;
setByte(hContact, GG_KEY_BLOCK, !getByte(hContact, GG_KEY_BLOCK, 0));
notifyuser(hContact, 1);
return 0;
diff --git a/protocols/Gadu-Gadu/src/image.cpp b/protocols/Gadu-Gadu/src/image.cpp
index 5c874800db..951ca3bbf0 100644
--- a/protocols/Gadu-Gadu/src/image.cpp
+++ b/protocols/Gadu-Gadu/src/image.cpp
@@ -1171,9 +1171,8 @@ BOOL GGPROTO::img_sendonrequest(gg_event* e)
////////////////////////////////////////////////////////////////////////////
// Send Image : Run (Thread and main)
-INT_PTR GGPROTO::img_sendimg(WPARAM wParam, LPARAM lParam)
+INT_PTR GGPROTO::img_sendimg(WPARAM hContact, LPARAM lParam)
{
- MCONTACT hContact = wParam;
GGIMAGEDLGDATA *dat = NULL;
gg_EnterCriticalSection(&img_mutex, "img_sendimg", 64, "img_mutex", 1);
diff --git a/protocols/Gadu-Gadu/src/services.cpp b/protocols/Gadu-Gadu/src/services.cpp
index 67afbfcf27..5abefd614f 100644
--- a/protocols/Gadu-Gadu/src/services.cpp
+++ b/protocols/Gadu-Gadu/src/services.cpp
@@ -380,9 +380,8 @@ INT_PTR GGPROTO::get_acc_mgr_gui(WPARAM wParam, LPARAM lParam)
// leaves (terminates) conference
// registered as ProtoService PS_LEAVECHAT
-INT_PTR GGPROTO::leavechat(WPARAM wParam, LPARAM lParam)
+INT_PTR GGPROTO::leavechat(WPARAM hContact, LPARAM lParam)
{
- MCONTACT hContact = wParam;
if (hContact)
CallService(MS_DB_CONTACT_DELETE, (WPARAM)hContact, 0);
diff --git a/protocols/IRCG/src/services.cpp b/protocols/IRCG/src/services.cpp
index b4b680b455..1b922570d8 100644
--- a/protocols/IRCG/src/services.cpp
+++ b/protocols/IRCG/src/services.cpp
@@ -931,10 +931,9 @@ int __cdecl CIrcProto::OnPreShutdown(WPARAM, LPARAM)
return 0;
}
-int __cdecl CIrcProto::OnMenuPreBuild(WPARAM wParam, LPARAM)
+int __cdecl CIrcProto::OnMenuPreBuild(WPARAM hContact, LPARAM)
{
DBVARIANT dbv;
- MCONTACT hContact = wParam;
if (hContact == NULL)
return 0;
@@ -976,9 +975,8 @@ int __cdecl CIrcProto::OnMenuPreBuild(WPARAM wParam, LPARAM)
return 0;
}
-int __cdecl CIrcProto::OnDbSettingChanged(WPARAM wParam, LPARAM lParam)
+int __cdecl CIrcProto::OnDbSettingChanged(WPARAM hContact, LPARAM lParam)
{
- MCONTACT hContact = wParam;
if (hContact == NULL || !IsConnected())
return 0;
diff --git a/protocols/IcqOscarJ/src/icq_menu.cpp b/protocols/IcqOscarJ/src/icq_menu.cpp
index b23bed9fd5..473629a4d3 100644
--- a/protocols/IcqOscarJ/src/icq_menu.cpp
+++ b/protocols/IcqOscarJ/src/icq_menu.cpp
@@ -175,9 +175,8 @@ void g_MenuUninit(void)
}
-INT_PTR CIcqProto::OpenWebProfile(WPARAM wParam, LPARAM lParam)
+INT_PTR CIcqProto::OpenWebProfile(WPARAM hContact, LPARAM lParam)
{
- MCONTACT hContact = wParam;
DWORD dwUin = getContactUin(hContact);
char url[256];
mir_snprintf(url, sizeof(url), "http://www.icq.com/people/%d",dwUin);
@@ -185,9 +184,8 @@ INT_PTR CIcqProto::OpenWebProfile(WPARAM wParam, LPARAM lParam)
}
-int CIcqProto::OnPreBuildContactMenu(WPARAM wParam, LPARAM)
+int CIcqProto::OnPreBuildContactMenu(WPARAM hContact, LPARAM)
{
- MCONTACT hContact = wParam;
if (hContact == NULL)
return 0;
diff --git a/protocols/IcqOscarJ/src/icq_servlist.cpp b/protocols/IcqOscarJ/src/icq_servlist.cpp
index 71745e80a6..dd0bdaa3ee 100644
--- a/protocols/IcqOscarJ/src/icq_servlist.cpp
+++ b/protocols/IcqOscarJ/src/icq_servlist.cpp
@@ -2618,24 +2618,21 @@ int CIcqProto::ServListDbSettingChanged(WPARAM wParam, LPARAM lParam)
}
-int CIcqProto::ServListDbContactDeleted(WPARAM wParam, LPARAM lParam)
+int CIcqProto::ServListDbContactDeleted(WPARAM hContact, LPARAM lParam)
{
#ifdef _DEBUG
- debugLogA("DB-Events: Contact %x deleted.", wParam);
+ debugLogA("DB-Events: Contact %x deleted.", hContact);
#endif
- DeleteFromContactsCache(wParam);
+ DeleteFromContactsCache(hContact);
if ( !icqOnline() && m_bSsiEnabled)
- { // contact was deleted only locally - retrieve full list on next connect
- setWord(wParam, "SrvRecordCount", 0);
- }
+ // contact was deleted only locally - retrieve full list on next connect
+ setWord(hContact, "SrvRecordCount", 0);
if ( !icqOnline() || !m_bSsiEnabled)
return 0;
- MCONTACT hContact = wParam;
-
// we need all server contacts on local buddy list
DWORD dwUIN;
uid_str szUID;
@@ -2672,9 +2669,8 @@ int CIcqProto::ServListDbContactDeleted(WPARAM wParam, LPARAM lParam)
}
-int CIcqProto::ServListCListGroupChange(WPARAM wParam, LPARAM lParam)
+int CIcqProto::ServListCListGroupChange(WPARAM hContact, LPARAM lParam)
{
- MCONTACT hContact = wParam;
CLISTGROUPCHANGE *grpchg = (CLISTGROUPCHANGE*)lParam;
if (!icqOnline() || !m_bSsiEnabled || bIsSyncingCL)
diff --git a/protocols/IcqOscarJ/src/icq_xstatus.cpp b/protocols/IcqOscarJ/src/icq_xstatus.cpp
index 4f14141bc0..07490019c1 100644
--- a/protocols/IcqOscarJ/src/icq_xstatus.cpp
+++ b/protocols/IcqOscarJ/src/icq_xstatus.cpp
@@ -907,12 +907,12 @@ void InitXStatusIcons()
memset(hXStatusCListIcons, -1, sizeof(hXStatusCListIcons));
}
-INT_PTR CIcqProto::ShowXStatusDetails(WPARAM wParam, LPARAM lParam)
+INT_PTR CIcqProto::ShowXStatusDetails(WPARAM hContact, LPARAM lParam)
{
InitXStatusData init;
init.ppro = this;
init.bAction = 1; // retrieve
- init.hContact = wParam;
+ init.hContact = hContact;
CreateDialogParam(hInst, MAKEINTRESOURCE(IDD_SETXSTATUS), NULL, SetXStatusDlgProc, (LPARAM)&init);
return 0;
@@ -968,14 +968,14 @@ INT_PTR CIcqProto::SetXStatusEx(WPARAM wParam, LPARAM lParam)
return 0; // Success
}
-INT_PTR CIcqProto::GetXStatusEx(WPARAM wParam, LPARAM lParam)
+INT_PTR CIcqProto::GetXStatusEx(WPARAM hContact, LPARAM lParam)
{
- CUSTOM_STATUS *pData = (CUSTOM_STATUS*)lParam;
- MCONTACT hContact = wParam;
-
- if (!m_bXStatusEnabled && !m_bMoodsEnabled) return 1;
+ if (!m_bXStatusEnabled && !m_bMoodsEnabled)
+ return 1;
- if (pData->cbSize < sizeof(CUSTOM_STATUS)) return 1; // Failure
+ CUSTOM_STATUS *pData = (CUSTOM_STATUS*)lParam;
+ if (pData->cbSize < sizeof(CUSTOM_STATUS))
+ return 1; // Failure
// fill status member
if (pData->flags & CSSF_MASK_STATUS)
@@ -1086,10 +1086,8 @@ INT_PTR CIcqProto::GetXStatusIcon(WPARAM wParam, LPARAM lParam)
return 0;
}
-INT_PTR CIcqProto::RequestXStatusDetails(WPARAM wParam, LPARAM lParam)
+INT_PTR CIcqProto::RequestXStatusDetails(WPARAM hContact, LPARAM lParam)
{
- MCONTACT hContact = wParam;
-
if (!m_bXStatusEnabled)
return 0;
diff --git a/protocols/IcqOscarJ/src/icqosc_svcs.cpp b/protocols/IcqOscarJ/src/icqosc_svcs.cpp
index d70f103374..c261468d5c 100644
--- a/protocols/IcqOscarJ/src/icqosc_svcs.cpp
+++ b/protocols/IcqOscarJ/src/icqosc_svcs.cpp
@@ -710,11 +710,10 @@ INT_PTR __cdecl CIcqProto::IcqAddCapability(WPARAM wParam, LPARAM lParam)
}
-INT_PTR __cdecl CIcqProto::IcqCheckCapability(WPARAM wParam, LPARAM lParam)
+INT_PTR __cdecl CIcqProto::IcqCheckCapability(WPARAM hContact, LPARAM lParam)
{
int res = 0;
DBVARIANT dbvariant;
- MCONTACT hContact = wParam;
ICQ_CUSTOMCAP *icqCustomCap = (ICQ_CUSTOMCAP *)lParam;
db_get(hContact, m_szModuleName, "CapBuf", &dbvariant);
diff --git a/protocols/JabberG/src/jabber_adhoc.cpp b/protocols/JabberG/src/jabber_adhoc.cpp
index 052f2d9692..0c745d950c 100644
--- a/protocols/JabberG/src/jabber_adhoc.cpp
+++ b/protocols/JabberG/src/jabber_adhoc.cpp
@@ -508,14 +508,13 @@ static INT_PTR CALLBACK JabberAdHoc_CommandDlgProc(HWND hwndDlg, UINT msg, WPARA
return FALSE;
}
-int __cdecl CJabberProto::ContactMenuRunCommands(WPARAM wParam, LPARAM lParam)
+int __cdecl CJabberProto::ContactMenuRunCommands(WPARAM hContact, LPARAM lParam)
{
- MCONTACT hContact = wParam;
int res = -1;
if ((hContact != NULL || lParam != 0) && m_bJabberOnline) {
ptrT szJid(getTStringA(hContact, "jid"));
- if (wParam && szJid != NULL) {
+ if (hContact && szJid != NULL) {
JABBER_LIST_ITEM *item = NULL;
int selected = 0;
TCHAR jid[JABBER_MAX_JID_LEN];
diff --git a/protocols/JabberG/src/jabber_events.cpp b/protocols/JabberG/src/jabber_events.cpp
index 594224512b..86bb7689f0 100644
--- a/protocols/JabberG/src/jabber_events.cpp
+++ b/protocols/JabberG/src/jabber_events.cpp
@@ -31,12 +31,11 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
/////////////////////////////////////////////////////////////////////////////////////////
// OnContactDeleted - processes a contact deletion
-int CJabberProto::OnContactDeleted(WPARAM wParam, LPARAM)
+int CJabberProto::OnContactDeleted(WPARAM hContact, LPARAM)
{
if (!m_bJabberOnline) // should never happen
return 0;
- MCONTACT hContact = wParam;
ptrT jid(getTStringA(hContact, isChatRoom(hContact) ? "ChatRoomID" : "jid"));
if (jid == NULL)
return 0;
@@ -157,9 +156,8 @@ void __cdecl CJabberProto::OnAddContactForever(DBCONTACTWRITESETTING *cws, MCONT
db_unset(hContact, "CList", "Hidden");
}
-int __cdecl CJabberProto::OnDbSettingChanged(WPARAM wParam, LPARAM lParam)
+int __cdecl CJabberProto::OnDbSettingChanged(WPARAM hContact, LPARAM lParam)
{
- MCONTACT hContact = wParam;
if (hContact == NULL || !m_bJabberOnline)
return 0;
diff --git a/protocols/JabberG/src/jabber_groupchat.cpp b/protocols/JabberG/src/jabber_groupchat.cpp
index 0e8d20f019..7c58fd7c30 100644
--- a/protocols/JabberG/src/jabber_groupchat.cpp
+++ b/protocols/JabberG/src/jabber_groupchat.cpp
@@ -183,9 +183,8 @@ INT_PTR __cdecl CJabberProto::OnMenuHandleJoinGroupchat(WPARAM, LPARAM)
return 0;
}
-INT_PTR __cdecl CJabberProto::OnJoinChat(WPARAM wParam, LPARAM)
+INT_PTR __cdecl CJabberProto::OnJoinChat(WPARAM hContact, LPARAM)
{
- MCONTACT hContact = wParam;
ptrT jid( getTStringA(hContact, "ChatRoomID"));
if (jid == NULL)
return 0;
@@ -208,9 +207,8 @@ INT_PTR __cdecl CJabberProto::OnJoinChat(WPARAM wParam, LPARAM)
return 0;
}
-INT_PTR __cdecl CJabberProto::OnLeaveChat(WPARAM wParam, LPARAM)
+INT_PTR __cdecl CJabberProto::OnLeaveChat(WPARAM hContact, LPARAM)
{
- MCONTACT hContact = wParam;
ptrT jid(getTStringA(hContact, "ChatRoomID"));
if (jid != NULL) {
if (getWord(hContact, "Status", 0) != ID_STATUS_OFFLINE) {
diff --git a/protocols/JabberG/src/jabber_icolib.cpp b/protocols/JabberG/src/jabber_icolib.cpp
index b535cb0d47..c57c42dc90 100644
--- a/protocols/JabberG/src/jabber_icolib.cpp
+++ b/protocols/JabberG/src/jabber_icolib.cpp
@@ -391,9 +391,8 @@ int CJabberProto::OnReloadIcons(WPARAM, LPARAM)
// if imagelist require advanced painting status overlay(like xStatus)
// index should be shifted to HIWORD, LOWORD should be 0
-INT_PTR __cdecl CJabberProto::JGetAdvancedStatusIcon(WPARAM wParam, LPARAM)
+INT_PTR __cdecl CJabberProto::JGetAdvancedStatusIcon(WPARAM hContact, LPARAM)
{
- MCONTACT hContact = wParam;
if (!hContact)
return -1;
diff --git a/protocols/JabberG/src/jabber_menu.cpp b/protocols/JabberG/src/jabber_menu.cpp
index 066a03f2a1..f1d507f208 100644
--- a/protocols/JabberG/src/jabber_menu.cpp
+++ b/protocols/JabberG/src/jabber_menu.cpp
@@ -345,9 +345,8 @@ void g_MenuUninit(void)
/////////////////////////////////////////////////////////////////////////////////////////
// contact menu services
-int CJabberProto::OnPrebuildContactMenu(WPARAM wParam, LPARAM)
+int CJabberProto::OnPrebuildContactMenu(WPARAM hContact, LPARAM)
{
- MCONTACT hContact = wParam;
if (hContact == NULL)
return 0;
@@ -477,9 +476,8 @@ int CJabberProto::OnPrebuildContactMenu(WPARAM wParam, LPARAM)
return 0;
}
-INT_PTR __cdecl CJabberProto::OnMenuConvertChatContact(WPARAM wParam, LPARAM)
+INT_PTR __cdecl CJabberProto::OnMenuConvertChatContact(WPARAM hContact, LPARAM)
{
- MCONTACT hContact = wParam;
BYTE bIsChatRoom = isChatRoom(hContact);
const char *szSetting = (bIsChatRoom) ? "ChatRoomID" : "jid";
@@ -492,9 +490,8 @@ INT_PTR __cdecl CJabberProto::OnMenuConvertChatContact(WPARAM wParam, LPARAM)
return 0;
}
-INT_PTR __cdecl CJabberProto::OnMenuRosterAdd(WPARAM wParam, LPARAM)
+INT_PTR __cdecl CJabberProto::OnMenuRosterAdd(WPARAM hContact, LPARAM)
{
- MCONTACT hContact = wParam;
if (!hContact)
return 0; // we do not add ourself to the roster. (buggy situation - should not happen)
@@ -522,9 +519,8 @@ INT_PTR __cdecl CJabberProto::OnMenuRosterAdd(WPARAM wParam, LPARAM)
return 0;
}
-INT_PTR __cdecl CJabberProto::OnMenuHandleRequestAuth(WPARAM wParam, LPARAM)
+INT_PTR __cdecl CJabberProto::OnMenuHandleRequestAuth(WPARAM hContact, LPARAM)
{
- MCONTACT hContact = wParam;
if (hContact != NULL && m_bJabberOnline) {
ptrT jid(getTStringA(hContact, "jid"));
if (jid != NULL)
@@ -533,9 +529,8 @@ INT_PTR __cdecl CJabberProto::OnMenuHandleRequestAuth(WPARAM wParam, LPARAM)
return 0;
}
-INT_PTR __cdecl CJabberProto::OnMenuHandleGrantAuth(WPARAM wParam, LPARAM)
+INT_PTR __cdecl CJabberProto::OnMenuHandleGrantAuth(WPARAM hContact, LPARAM)
{
- MCONTACT hContact = wParam;
if (hContact != NULL && m_bJabberOnline) {
ptrT jid(getTStringA(hContact, "jid"));
if (jid != NULL)
@@ -544,9 +539,8 @@ INT_PTR __cdecl CJabberProto::OnMenuHandleGrantAuth(WPARAM wParam, LPARAM)
return 0;
}
-INT_PTR __cdecl CJabberProto::OnMenuRevokeAuth(WPARAM wParam, LPARAM)
+INT_PTR __cdecl CJabberProto::OnMenuRevokeAuth(WPARAM hContact, LPARAM)
{
- MCONTACT hContact = wParam;
if (hContact != NULL && m_bJabberOnline) {
ptrT jid(getTStringA(hContact, "jid"));
if (jid != NULL)
@@ -555,9 +549,8 @@ INT_PTR __cdecl CJabberProto::OnMenuRevokeAuth(WPARAM wParam, LPARAM)
return 0;
}
-INT_PTR __cdecl CJabberProto::OnMenuTransportLogin(WPARAM wParam, LPARAM)
+INT_PTR __cdecl CJabberProto::OnMenuTransportLogin(WPARAM hContact, LPARAM)
{
- MCONTACT hContact = wParam;
if (!getByte(hContact, "IsTransport", 0))
return 0;
@@ -571,9 +564,8 @@ INT_PTR __cdecl CJabberProto::OnMenuTransportLogin(WPARAM wParam, LPARAM)
return 0;
}
-INT_PTR __cdecl CJabberProto::OnMenuTransportResolve(WPARAM wParam, LPARAM)
+INT_PTR __cdecl CJabberProto::OnMenuTransportResolve(WPARAM hContact, LPARAM)
{
- MCONTACT hContact = wParam;
if (!getByte(hContact, "IsTransport", 0))
return 0;
@@ -583,9 +575,8 @@ INT_PTR __cdecl CJabberProto::OnMenuTransportResolve(WPARAM wParam, LPARAM)
return 0;
}
-INT_PTR __cdecl CJabberProto::OnMenuBookmarkAdd(WPARAM wParam, LPARAM)
+INT_PTR __cdecl CJabberProto::OnMenuBookmarkAdd(WPARAM hContact, LPARAM)
{
- MCONTACT hContact = wParam;
if (!hContact)
return 0; // we do not add ourself to the roster. (buggy situation - should not happen)
@@ -1037,13 +1028,12 @@ int CJabberProto::OnProcessSrmmEvent(WPARAM, LPARAM lParam)
return 0;
}
-int CJabberProto::OnProcessSrmmIconClick(WPARAM wParam, LPARAM lParam)
+int CJabberProto::OnProcessSrmmIconClick(WPARAM hContact, LPARAM lParam)
{
StatusIconClickData *sicd = (StatusIconClickData *)lParam;
if (lstrcmpA(sicd->szModule, m_szModuleName))
return 0;
- MCONTACT hContact = wParam;
if (!hContact)
return 0;
@@ -1092,12 +1082,11 @@ int CJabberProto::OnProcessSrmmIconClick(WPARAM wParam, LPARAM lParam)
return 0;
}
-INT_PTR __cdecl CJabberProto::OnMenuHandleResource(WPARAM wParam, LPARAM, LPARAM res)
+INT_PTR __cdecl CJabberProto::OnMenuHandleResource(WPARAM hContact, LPARAM, LPARAM res)
{
- if (!m_bJabberOnline || !wParam)
+ if (!m_bJabberOnline || !hContact)
return 0;
- MCONTACT hContact = wParam;
ptrT tszJid(getTStringA(hContact, "jid"));
if (tszJid == NULL)
return 0;
@@ -1124,13 +1113,11 @@ INT_PTR __cdecl CJabberProto::OnMenuHandleResource(WPARAM wParam, LPARAM, LPARAM
return 0;
}
-INT_PTR __cdecl CJabberProto::OnMenuHandleDirectPresence(WPARAM wParam, LPARAM lParam, LPARAM res)
+INT_PTR __cdecl CJabberProto::OnMenuHandleDirectPresence(WPARAM hContact, LPARAM lParam, LPARAM res)
{
- if (!m_bJabberOnline || !wParam)
+ if (!m_bJabberOnline || !hContact)
return 0;
- MCONTACT hContact = wParam;
-
TCHAR *jid, text[1024];
ptrT tszJid(getTStringA(hContact, "jid"));
if (tszJid == NULL) {
diff --git a/protocols/JabberG/src/jabber_svc.cpp b/protocols/JabberG/src/jabber_svc.cpp
index 442cf5d0e4..59f9086632 100644
--- a/protocols/JabberG/src/jabber_svc.cpp
+++ b/protocols/JabberG/src/jabber_svc.cpp
@@ -533,12 +533,11 @@ INT_PTR __cdecl CJabberProto::JabberServiceParseXmppURI(WPARAM, LPARAM lParam)
}
// XEP-0224 support (Attention/Nudge)
-INT_PTR __cdecl CJabberProto::JabberSendNudge(WPARAM wParam, LPARAM)
+INT_PTR __cdecl CJabberProto::JabberSendNudge(WPARAM hContact, LPARAM)
{
if (!m_bJabberOnline)
return 0;
- MCONTACT hContact = wParam;
ptrT jid( getTStringA(hContact, "jid"));
if (jid == NULL)
return 0;
diff --git a/protocols/JabberG/src/jabber_xstatus.cpp b/protocols/JabberG/src/jabber_xstatus.cpp
index d5ac96a819..4d2bd7942e 100644
--- a/protocols/JabberG/src/jabber_xstatus.cpp
+++ b/protocols/JabberG/src/jabber_xstatus.cpp
@@ -1329,7 +1329,7 @@ void CJabberProto::XStatusInit()
/////////////////////////////////////////////////////////////////////////////////////////
// JabberSetXStatus - sets the extended status info (mood)
-INT_PTR __cdecl CJabberProto::OnGetXStatusEx(WPARAM wParam, LPARAM lParam)
+INT_PTR __cdecl CJabberProto::OnGetXStatusEx(WPARAM hContact, LPARAM lParam)
{
if (!m_bPepSupported || !m_bJabberOnline)
return 1;
@@ -1342,8 +1342,6 @@ INT_PTR __cdecl CJabberProto::OnGetXStatusEx(WPARAM wParam, LPARAM lParam)
if (pepMood == NULL)
return 1;
- MCONTACT hContact = wParam;
-
// fill status member
if (pData->flags & CSSF_MASK_STATUS)
*pData->status = pepMood->m_mode;
diff --git a/protocols/MRA/src/Mra_menus.cpp b/protocols/MRA/src/Mra_menus.cpp
index acb3853288..2caf912b09 100644
--- a/protocols/MRA/src/Mra_menus.cpp
+++ b/protocols/MRA/src/Mra_menus.cpp
@@ -78,9 +78,8 @@ INT_PTR CMraProto::MraRequestAuthForAll(WPARAM wParam, LPARAM lParam)
return 0;
}
-INT_PTR CMraProto::MraRequestAuthorization(WPARAM wParam, LPARAM lParam)
+INT_PTR CMraProto::MraRequestAuthorization(WPARAM hContact, LPARAM lParam)
{
- MCONTACT hContact = wParam;
if (!hContact)
return 0;
@@ -236,12 +235,11 @@ INT_PTR CMraProto::MraWorld(WPARAM wParam, LPARAM lParam)
/////////////////////////////////////////////////////////////////////////////////////////
-int CMraProto::MraRebuildContactMenu(WPARAM wParam, LPARAM lParam)
+int CMraProto::MraRebuildContactMenu(WPARAM hContact, LPARAM lParam)
{
BOOL bIsContactMRA, bHasEMail, bHasEMailMR, bChatAgent;
DWORD dwContactSeverFlags = 0;
CMStringW blogStatusMsgSize;
- MCONTACT hContact = wParam;
// proto own contact
bIsContactMRA = IsContactMra(hContact);
diff --git a/protocols/MRA/src/Mra_svcs.cpp b/protocols/MRA/src/Mra_svcs.cpp
index b61e137105..1ffb37e18e 100644
--- a/protocols/MRA/src/Mra_svcs.cpp
+++ b/protocols/MRA/src/Mra_svcs.cpp
@@ -166,9 +166,8 @@ INT_PTR CMraProto::MraXStatusMenu(WPARAM wParam, LPARAM lParam, LPARAM param)
/////////////////////////////////////////////////////////////////////////////////////////
-int CMraProto::MraContactDeleted(WPARAM wParam, LPARAM lParam)
+int CMraProto::MraContactDeleted(WPARAM hContact, LPARAM lParam)
{
- MCONTACT hContact = wParam;
if (!m_bLoggedIn || !hContact)
return 0;
@@ -186,13 +185,9 @@ int CMraProto::MraContactDeleted(WPARAM wParam, LPARAM lParam)
return 0;
}
-int CMraProto::MraDbSettingChanged(WPARAM wParam, LPARAM lParam)
+int CMraProto::MraDbSettingChanged(WPARAM hContact, LPARAM lParam)
{
- if (!m_bLoggedIn || !lParam)
- return 0;
-
- MCONTACT hContact = wParam;
- if (hContact == NULL)
+ if (!m_bLoggedIn || !lParam || !hContact)
return 0;
DBCONTACTWRITESETTING *cws = (DBCONTACTWRITESETTING*)lParam;
@@ -447,9 +442,8 @@ INT_PTR CMraProto::MraSetXStatusEx(WPARAM wParam, LPARAM lParam)
return iRet;
}
-INT_PTR CMraProto::MraGetXStatusEx(WPARAM wParam, LPARAM lParam)
+INT_PTR CMraProto::MraGetXStatusEx(WPARAM hContact, LPARAM lParam)
{
- MCONTACT hContact = wParam;
CUSTOM_STATUS *pData = (CUSTOM_STATUS*)lParam;
if (pData->cbSize < sizeof(CUSTOM_STATUS))
@@ -548,11 +542,10 @@ DWORD CMraProto::MraSendNewStatus(DWORD dwStatusMir, DWORD dwXStatusMir, const C
return 0;
}
-INT_PTR CMraProto::MraSendNudge(WPARAM wParam, LPARAM lParam)
+INT_PTR CMraProto::MraSendNudge(WPARAM hContact, LPARAM lParam)
{
- if (m_bLoggedIn && wParam) {
+ if (m_bLoggedIn && hContact) {
LPWSTR lpwszAlarmMessage = TranslateW(MRA_ALARM_MESSAGE);
- MCONTACT hContact = wParam;
CMStringA szEmail;
if (mraGetStringA(hContact, "e-mail", szEmail))
@@ -617,9 +610,8 @@ INT_PTR CMraProto::MraGetMyAvatar(WPARAM wParam, LPARAM lParam)
////////////////////////////////////////////////////////////////////////////////////////////////
// processes clist group removal
-int CMraProto::OnGroupChanged(WPARAM wParam, LPARAM lParam)
+int CMraProto::OnGroupChanged(WPARAM hContact, LPARAM lParam)
{
- MCONTACT hContact = wParam;
if (hContact == NULL) {
CLISTGROUPCHANGE *cgc = (CLISTGROUPCHANGE*)lParam;
if (cgc->pszOldName == NULL)
diff --git a/protocols/MSN/src/msn_menu.cpp b/protocols/MSN/src/msn_menu.cpp
index 723af931a5..c4abdbdcaa 100644
--- a/protocols/MSN/src/msn_menu.cpp
+++ b/protocols/MSN/src/msn_menu.cpp
@@ -30,11 +30,9 @@ HANDLE hNetMeeting, hBlockCom, hSendHotMail, hInviteChat, hViewProfile;
/////////////////////////////////////////////////////////////////////////////////////////
// Block command callback function
-INT_PTR CMsnProto::MsnBlockCommand(WPARAM wParam, LPARAM)
+INT_PTR CMsnProto::MsnBlockCommand(WPARAM hContact, LPARAM)
{
if (msnLoggedIn) {
- MCONTACT hContact = wParam;
-
char tEmail[MSN_MAX_EMAIL_LEN];
db_get_static(hContact, m_szModuleName, "e-mail", tEmail, sizeof(tEmail));
@@ -58,11 +56,9 @@ INT_PTR CMsnProto::MsnGotoInbox(WPARAM, LPARAM)
return 0;
}
-INT_PTR CMsnProto::MsnSendHotmail(WPARAM wParam, LPARAM)
+INT_PTR CMsnProto::MsnSendHotmail(WPARAM hContact, LPARAM)
{
- MCONTACT hContact = wParam;
char szEmail[MSN_MAX_EMAIL_LEN];
-
if (MSN_IsMeByContact(hContact, szEmail))
MsnGotoInbox(0, 0);
else if (msnLoggedIn)
@@ -83,15 +79,13 @@ INT_PTR CMsnProto::MsnSetupAlerts(WPARAM, LPARAM)
/////////////////////////////////////////////////////////////////////////////////////////
// MsnViewProfile - view a contact's profile
-INT_PTR CMsnProto::MsnViewProfile(WPARAM wParam, LPARAM)
+INT_PTR CMsnProto::MsnViewProfile(WPARAM hContact, LPARAM)
{
- MCONTACT hContact = wParam;
char buf[64], *cid;
if (hContact == NULL)
cid = mycid;
- else
- {
+ else {
cid = buf;
if (db_get_static(hContact, m_szModuleName, "CID", buf, 30))
return 0;
@@ -125,14 +119,12 @@ INT_PTR CMsnProto::MsnInviteCommand(WPARAM, LPARAM)
/////////////////////////////////////////////////////////////////////////////////////////
// MsnRebuildContactMenu - gray or ungray the block menus according to contact's status
-int CMsnProto::OnPrebuildContactMenu(WPARAM wParam, LPARAM)
+int CMsnProto::OnPrebuildContactMenu(WPARAM hContact, LPARAM)
{
- MCONTACT hContact = wParam;
- char szEmail[MSN_MAX_EMAIL_LEN];
-
if ( !MSN_IsMyContact(hContact))
return 0;
+ char szEmail[MSN_MAX_EMAIL_LEN];
bool isMe = MSN_IsMeByContact(hContact, szEmail);
if (szEmail[0]) {
int listId = Lists_GetMask(szEmail);
@@ -155,12 +147,10 @@ int CMsnProto::OnPrebuildContactMenu(WPARAM wParam, LPARAM)
return 0;
}
-int CMsnProto::OnContactDoubleClicked(WPARAM wParam, LPARAM)
+int CMsnProto::OnContactDoubleClicked(WPARAM hContact, LPARAM)
{
- MCONTACT hContact = wParam;
-
if (emailEnabled && MSN_IsMeByContact(hContact)) {
- MsnSendHotmail(wParam, 0);
+ MsnSendHotmail(hContact, 0);
return 1;
}
return 0;
diff --git a/protocols/MSN/src/msn_svcs.cpp b/protocols/MSN/src/msn_svcs.cpp
index ec1c2f97b8..9d1be8b0a5 100644
--- a/protocols/MSN/src/msn_svcs.cpp
+++ b/protocols/MSN/src/msn_svcs.cpp
@@ -242,12 +242,10 @@ INT_PTR CMsnProto::SetNickName(WPARAM wParam, LPARAM lParam)
/////////////////////////////////////////////////////////////////////////////////////////
// MsnSendNudge - Sending a nudge
-INT_PTR CMsnProto::SendNudge(WPARAM wParam, LPARAM lParam)
+INT_PTR CMsnProto::SendNudge(WPARAM hContact, LPARAM lParam)
{
if (!msnLoggedIn) return 0;
- MCONTACT hContact = wParam;
-
char tEmail[MSN_MAX_EMAIL_LEN];
if (MSN_IsMeByContact(hContact, tEmail)) return 0;
@@ -378,10 +376,8 @@ INT_PTR CMsnProto::SetCurrentMedia(WPARAM wParam, LPARAM lParam)
/////////////////////////////////////////////////////////////////////////////////////////
// MsnContactDeleted - called when a contact is deleted from list
-int CMsnProto::OnContactDeleted(WPARAM wParam, LPARAM lParam)
+int CMsnProto::OnContactDeleted(WPARAM hContact, LPARAM lParam)
{
- const MCONTACT hContact = wParam;
-
if (!msnLoggedIn) //should never happen for MSN contacts
return 0;
@@ -420,11 +416,10 @@ int CMsnProto::OnContactDeleted(WPARAM wParam, LPARAM lParam)
}
-int CMsnProto::OnGroupChange(WPARAM wParam,LPARAM lParam)
+int CMsnProto::OnGroupChange(WPARAM hContact, LPARAM lParam)
{
if (!msnLoggedIn || !MyOptions.ManageServer) return 0;
- const MCONTACT hContact = wParam;
const CLISTGROUPCHANGE* grpchg = (CLISTGROUPCHANGE*)lParam;
if (hContact == NULL)
@@ -456,9 +451,8 @@ int CMsnProto::OnGroupChange(WPARAM wParam,LPARAM lParam)
/////////////////////////////////////////////////////////////////////////////////////////
// MsnDbSettingChanged - look for contact's settings changes
-int CMsnProto::OnDbSettingChanged(WPARAM wParam,LPARAM lParam)
+int CMsnProto::OnDbSettingChanged(WPARAM hContact, LPARAM lParam)
{
- MCONTACT hContact = wParam;
DBCONTACTWRITESETTING* cws = (DBCONTACTWRITESETTING*)lParam;
if (!msnLoggedIn)
@@ -617,9 +611,8 @@ INT_PTR CMsnProto::GetUnreadEmailCount(WPARAM wParam, LPARAM lParam)
/////////////////////////////////////////////////////////////////////////////////////////
// OnLeaveChat - closes MSN chat window
-INT_PTR CMsnProto::OnLeaveChat(WPARAM wParam,LPARAM lParam)
+INT_PTR CMsnProto::OnLeaveChat(WPARAM hContact, LPARAM lParam)
{
- MCONTACT hContact = wParam;
if (isChatRoom(hContact) != 0) {
DBVARIANT dbv;
if (getTString(hContact, "ChatRoomID", &dbv) == 0) {
diff --git a/protocols/Tlen/src/tlen.cpp b/protocols/Tlen/src/tlen.cpp
index 5143dcb913..92a9a400d9 100644
--- a/protocols/Tlen/src/tlen.cpp
+++ b/protocols/Tlen/src/tlen.cpp
@@ -112,9 +112,8 @@ static void TlenRegisterIcons()
Icon_Register(hInst, "Protocols/Tlen", iconList, SIZEOF(iconList), "TLEN");
}
-int TlenProtocol::PrebuildContactMenu(WPARAM wParam, LPARAM lParam)
+int TlenProtocol::PrebuildContactMenu(WPARAM hContact, LPARAM lParam)
{
- MCONTACT hContact = wParam;
if (hContact != NULL && isOnline) {
DBVARIANT dbv;
if (!db_get(hContact, m_szModuleName, "jid", &dbv)) {
@@ -138,9 +137,8 @@ int TlenProtocol::PrebuildContactMenu(WPARAM wParam, LPARAM lParam)
return 0;
}
-INT_PTR TlenProtocol::ContactMenuHandleRequestAuth(WPARAM wParam, LPARAM lParam)
+INT_PTR TlenProtocol::ContactMenuHandleRequestAuth(WPARAM hContact, LPARAM lParam)
{
- MCONTACT hContact = wParam;
if (hContact != NULL && isOnline) {
DBVARIANT dbv;
if (!db_get(hContact, m_szModuleName, "jid", &dbv)) {
@@ -151,9 +149,8 @@ INT_PTR TlenProtocol::ContactMenuHandleRequestAuth(WPARAM wParam, LPARAM lParam)
return 0;
}
-INT_PTR TlenProtocol::ContactMenuHandleGrantAuth(WPARAM wParam, LPARAM lParam)
+INT_PTR TlenProtocol::ContactMenuHandleGrantAuth(WPARAM hContact, LPARAM lParam)
{
- MCONTACT hContact = wParam;
if (hContact != NULL && isOnline) {
DBVARIANT dbv;
if (!db_get(hContact, m_szModuleName, "jid", &dbv)) {
@@ -164,12 +161,10 @@ INT_PTR TlenProtocol::ContactMenuHandleGrantAuth(WPARAM wParam, LPARAM lParam)
return 0;
}
-INT_PTR TlenProtocol::ContactMenuHandleSendPicture(WPARAM wParam, LPARAM lParam)
+INT_PTR TlenProtocol::ContactMenuHandleSendPicture(WPARAM hContact, LPARAM lParam)
{
- MCONTACT hContact = wParam;
if (hContact != NULL && isOnline)
SendPicture(this, hContact);
-
return 0;
}
diff --git a/protocols/Tlen/src/tlen_svc.cpp b/protocols/Tlen/src/tlen_svc.cpp
index 770f668ea4..ef41abccd4 100644
--- a/protocols/Tlen/src/tlen_svc.cpp
+++ b/protocols/Tlen/src/tlen_svc.cpp
@@ -597,9 +597,8 @@ static void __cdecl TlenGetAwayMsgThread(void *ptr)
delete data;
}
-INT_PTR TlenProtocol::SendAlert(WPARAM wParam, LPARAM lParam)
+INT_PTR TlenProtocol::SendAlert(WPARAM hContact, LPARAM lParam)
{
- MCONTACT hContact = wParam;
DBVARIANT dbv;
if (isOnline && !db_get(hContact, m_szModuleName, "jid", &dbv)) {
TlenSend(this, "<m tp='a' to='%s'/>", dbv.pszVal);
diff --git a/protocols/Twitter/src/contacts.cpp b/protocols/Twitter/src/contacts.cpp
index fb6a41135a..fe0fa53c58 100644
--- a/protocols/Twitter/src/contacts.cpp
+++ b/protocols/Twitter/src/contacts.cpp
@@ -183,13 +183,11 @@ HANDLE TwitterProto::GetAwayMsg(MCONTACT hContact)
return (HANDLE)1;
}
-int TwitterProto::OnContactDeleted(WPARAM wParam,LPARAM lParam)
+int TwitterProto::OnContactDeleted(WPARAM hContact, LPARAM lParam)
{
if(m_iStatus != ID_STATUS_ONLINE)
return 0;
- const MCONTACT hContact = wParam;
-
if(!IsMyContact(hContact))
return 0;
diff --git a/protocols/Twitter/src/proto.cpp b/protocols/Twitter/src/proto.cpp
index b301bc1fb3..8f02b0ba1f 100644
--- a/protocols/Twitter/src/proto.cpp
+++ b/protocols/Twitter/src/proto.cpp
@@ -243,11 +243,9 @@ INT_PTR TwitterProto::GetStatus(WPARAM,LPARAM)
return m_iStatus;
}
-INT_PTR TwitterProto::ReplyToTweet(WPARAM wParam,LPARAM)
+INT_PTR TwitterProto::ReplyToTweet(WPARAM hContact, LPARAM)
{
// TODO: support replying to tweets instead of just users
- MCONTACT hContact = wParam;
-
HWND hDlg = CreateDialogParam(g_hInstance,MAKEINTRESOURCE(IDD_TWEET),0,tweet_proc,reinterpret_cast<LPARAM>(this));
DBVARIANT dbv;
@@ -262,10 +260,8 @@ INT_PTR TwitterProto::ReplyToTweet(WPARAM wParam,LPARAM)
return 0;
}
-INT_PTR TwitterProto::VisitHomepage(WPARAM wParam,LPARAM)
+INT_PTR TwitterProto::VisitHomepage(WPARAM hContact, LPARAM)
{
- MCONTACT hContact = wParam;
-
DBVARIANT dbv;
// TODO: remove this
if( !db_get_s(hContact,m_szModuleName,TWITTER_KEY_UN,&dbv))
@@ -396,9 +392,8 @@ int TwitterProto::OnPreShutdown(WPARAM,LPARAM)
return 0;
}
-int TwitterProto::OnPrebuildContactMenu(WPARAM wParam,LPARAM)
+int TwitterProto::OnPrebuildContactMenu(WPARAM hContact, LPARAM)
{
- MCONTACT hContact = wParam;
if(IsMyContact(hContact))
ShowContactMenus(true);
diff --git a/protocols/Xfire/src/main.cpp b/protocols/Xfire/src/main.cpp
index 4f2e56000c..5087537cb1 100644
--- a/protocols/Xfire/src/main.cpp
+++ b/protocols/Xfire/src/main.cpp
@@ -1335,9 +1335,8 @@ static void SendBadAck( LPVOID param )
ProtoBroadcastAck(protocolname, (MCONTACT)param, ACKTYPE_MESSAGE, ACKRESULT_FAILED, (HANDLE) 0, LPARAM(Translate("XFire does not support offline messaging!")));
}
-static INT_PTR UserIsTyping(WPARAM wParam, LPARAM lParam)
+static INT_PTR UserIsTyping(WPARAM hContact, LPARAM lParam)
{
- MCONTACT hContact = wParam;
DBVARIANT dbv;
if (lParam==PROTOTYPE_SELFTYPING_ON)
@@ -2069,9 +2068,8 @@ static INT_PTR GotoProfileAct(WPARAM wParam,LPARAM lParam)
return 0;
}
-int RebuildContactMenu( WPARAM wParam, LPARAM lParam )
+int RebuildContactMenu(WPARAM hContact, LPARAM lParam)
{
- MCONTACT hContact = wParam;
bool bEnabled = true, bEnabled2 = true;
DBVARIANT dbv;
diff --git a/protocols/Yahoo/src/im.cpp b/protocols/Yahoo/src/im.cpp
index 2606576a4e..49b7f108ae 100644
--- a/protocols/Yahoo/src/im.cpp
+++ b/protocols/Yahoo/src/im.cpp
@@ -225,10 +225,8 @@ int __cdecl CYahooProto::RecvMsg(MCONTACT hContact, PROTORECVEVENT* pre)
// Send a nudge
//=======================================================
-INT_PTR __cdecl CYahooProto::SendNudge(WPARAM wParam, LPARAM lParam)
+INT_PTR __cdecl CYahooProto::SendNudge(WPARAM hContact, LPARAM lParam)
{
- MCONTACT hContact = wParam;
-
debugLogA("[YAHOO_SENDNUDGE]");
if (!m_bLoggedIn) {/* don't send nudge if we not connected! */
diff --git a/protocols/Yahoo/src/services.cpp b/protocols/Yahoo/src/services.cpp
index ad342a2b1e..f5e0aa30dc 100644
--- a/protocols/Yahoo/src/services.cpp
+++ b/protocols/Yahoo/src/services.cpp
@@ -80,11 +80,8 @@ void CYahooProto::BroadcastStatus(int s)
//=======================================================
//Contact deletion event
//=======================================================
-int __cdecl CYahooProto::OnContactDeleted(WPARAM wParam, LPARAM lParam)
+int __cdecl CYahooProto::OnContactDeleted(WPARAM hContact, LPARAM lParam)
{
- DBVARIANT dbv;
- MCONTACT hContact = wParam;
-
debugLogA("[YahooContactDeleted]");
if (!m_bLoggedIn) {//should never happen for Yahoo contacts
@@ -98,6 +95,7 @@ int __cdecl CYahooProto::OnContactDeleted(WPARAM wParam, LPARAM lParam)
return 0;
}
+ DBVARIANT dbv;
if (!getString(hContact, YAHOO_LOGINID, &dbv)) {
debugLogA("[YahooContactDeleted] Removing %s", dbv.pszVal);
remove_buddy(dbv.pszVal, getWord(hContact, "yprotoid", 0));
@@ -495,9 +493,8 @@ void CYahooProto::MenuUninit( void )
CallService(MS_CLIST_REMOVECONTACTMENUITEM, (WPARAM)hShowProfileMenuItem, 0);
}
-int __cdecl CYahooProto::OnPrebuildContactMenu(WPARAM wParam, LPARAM)
+int __cdecl CYahooProto::OnPrebuildContactMenu(WPARAM hContact, LPARAM)
{
- const MCONTACT hContact = wParam;
if (!IsMyContact(hContact)) {
debugLogA("[OnPrebuildContactMenu] Not a Yahoo Contact!!!");
return 0;
diff --git a/src/core/stdfile/file.cpp b/src/core/stdfile/file.cpp
index 19dcf2f27c..08d5b250b5 100644
--- a/src/core/stdfile/file.cpp
+++ b/src/core/stdfile/file.cpp
@@ -59,19 +59,19 @@ TCHAR *GetContactID(MCONTACT hContact)
return NULL;
}
-static INT_PTR SendFileCommand(WPARAM wParam, LPARAM)
+static INT_PTR SendFileCommand(WPARAM hContact, LPARAM)
{
struct FileSendData fsd;
- fsd.hContact = wParam;
+ fsd.hContact = hContact;
fsd.ppFiles = NULL;
CreateDialogParam(hInst, MAKEINTRESOURCE(IDD_FILESEND), NULL, DlgProcSendFile, (LPARAM)&fsd);
return 0;
}
-static INT_PTR SendSpecificFiles(WPARAM wParam, LPARAM lParam)
+static INT_PTR SendSpecificFiles(WPARAM hContact, LPARAM lParam)
{
FileSendData fsd;
- fsd.hContact = wParam;
+ fsd.hContact = hContact;
char** ppFiles = (char**)lParam;
int count = 0;
@@ -89,10 +89,10 @@ static INT_PTR SendSpecificFiles(WPARAM wParam, LPARAM lParam)
return 0;
}
-static INT_PTR SendSpecificFilesT(WPARAM wParam, LPARAM lParam)
+static INT_PTR SendSpecificFilesT(WPARAM hContact, LPARAM lParam)
{
FileSendData fsd;
- fsd.hContact = wParam;
+ fsd.hContact = hContact;
fsd.ppFiles = (const TCHAR**)lParam;
CreateDialogParam(hInst, MAKEINTRESOURCE(IDD_FILESEND), NULL, DlgProcSendFile, (LPARAM)&fsd);
return 0;
diff --git a/src/core/stdmsg/src/globals.cpp b/src/core/stdmsg/src/globals.cpp
index fb90ce71ff..a56ee6f898 100644
--- a/src/core/stdmsg/src/globals.cpp
+++ b/src/core/stdmsg/src/globals.cpp
@@ -119,9 +119,8 @@ void ReloadGlobals()
if (g_dat.msgTimeout < SRMSGSET_MSGTIMEOUT_MIN) g_dat.msgTimeout = SRMSGDEFSET_MSGTIMEOUT;
}
-static int dbaddedevent(WPARAM wParam, LPARAM lParam)
+static int dbaddedevent(WPARAM hContact, LPARAM lParam)
{
- MCONTACT hContact = wParam;
if (hContact) {
HWND h = WindowList_Find(g_dat.hMessageWindowList, hContact);
if (h)
@@ -142,10 +141,10 @@ static int ackevent(WPARAM wParam, LPARAM lParam)
return 0;
}
-int AvatarChanged(WPARAM wParam, LPARAM lParam)
+int AvatarChanged(WPARAM hContact, LPARAM lParam)
{
- MCONTACT hContact = wParam;
HWND h = WindowList_Find(g_dat.hMessageWindowList, hContact);
- if (h) SendMessage(h, HM_AVATARACK, wParam, lParam);
+ if (h)
+ SendMessage(h, HM_AVATARACK, hContact, lParam);
return 0;
}
diff --git a/src/core/stdmsg/src/msgs.cpp b/src/core/stdmsg/src/msgs.cpp
index 83312cb914..f164d72b31 100644
--- a/src/core/stdmsg/src/msgs.cpp
+++ b/src/core/stdmsg/src/msgs.cpp
@@ -49,7 +49,7 @@ static int SRMMStatusToPf2(int status)
return 0;
}
-static int MessageEventAdded(WPARAM wParam, LPARAM lParam)
+static int MessageEventAdded(WPARAM hContact, LPARAM lParam)
{
DBEVENTINFO dbei = { sizeof(dbei) };
db_event_get((HANDLE)lParam, &dbei);
@@ -57,9 +57,9 @@ static int MessageEventAdded(WPARAM wParam, LPARAM lParam)
if (dbei.flags & (DBEF_SENT | DBEF_READ) || !(dbei.eventType == EVENTTYPE_MESSAGE || DbEventIsForMsgWindow(&dbei)))
return 0;
- CallServiceSync(MS_CLIST_REMOVEEVENT, wParam, (LPARAM) 1);
+ CallServiceSync(MS_CLIST_REMOVEEVENT, hContact, 1);
/* does a window for the contact exist? */
- HWND hwnd = WindowList_Find(g_dat.hMessageWindowList, wParam);
+ HWND hwnd = WindowList_Find(g_dat.hMessageWindowList, hContact);
if (hwnd) {
if (!db_get_b(NULL, SRMMMOD, SRMSGSET_DONOTSTEALFOCUS, SRMSGDEFSET_DONOTSTEALFOCUS)) {
ShowWindow(hwnd, SW_RESTORE);
@@ -78,10 +78,10 @@ static int MessageEventAdded(WPARAM wParam, LPARAM lParam)
/* new message */
SkinPlaySound("AlertMsg");
- char *szProto = GetContactProto(wParam);
+ char *szProto = GetContactProto(hContact);
if (szProto && (g_dat.openFlags & SRMMStatusToPf2(CallProtoService(szProto, PS_GETSTATUS, 0, 0)))) {
NewMessageWindowLParam newData = { 0 };
- newData.hContact = wParam;
+ newData.hContact = hContact;
newData.noActivate = db_get_b(NULL, SRMMMOD, SRMSGSET_DONOTSTEALFOCUS, SRMSGDEFSET_DONOTSTEALFOCUS);
CreateDialogParam(g_hInst, MAKEINTRESOURCE(IDD_MSG), NULL, DlgProcMessage, (LPARAM)&newData);
return 0;
@@ -89,12 +89,12 @@ static int MessageEventAdded(WPARAM wParam, LPARAM lParam)
TCHAR toolTip[256], *contactName;
CLISTEVENT cle = { sizeof(cle) };
- cle.hContact = wParam;
+ cle.hContact = hContact;
cle.hDbEvent = (HANDLE)lParam;
cle.flags = CLEF_TCHAR;
cle.hIcon = LoadSkinnedIcon(SKINICON_EVENT_MESSAGE);
cle.pszService = "SRMsg/ReadMessage";
- contactName = pcli->pfnGetContactDisplayName(wParam, 0);
+ contactName = pcli->pfnGetContactDisplayName(hContact, 0);
mir_sntprintf(toolTip, SIZEOF(toolTip), TranslateT("Message from %s"), contactName);
cle.ptszTooltip = toolTip;
CallService(MS_CLIST_ADDEVENT, 0, (LPARAM)&cle);
@@ -152,21 +152,21 @@ static INT_PTR ReadMessageCommand(WPARAM wParam, LPARAM lParam)
return 0;
}
-static int TypingMessage(WPARAM wParam, LPARAM lParam)
+static int TypingMessage(WPARAM hContact, LPARAM lParam)
{
if (!(g_dat.flags & SMF_SHOWTYPING))
return 0;
SkinPlaySound((lParam) ? "TNStart" : "TNStop");
- HWND hwnd = WindowList_Find(g_dat.hMessageWindowList, wParam);
+ HWND hwnd = WindowList_Find(g_dat.hMessageWindowList, hContact);
if (hwnd)
SendMessage(hwnd, DM_TYPING, 0, lParam);
else if (lParam && (g_dat.flags & SMF_SHOWTYPINGTRAY)) {
TCHAR szTip[256];
- mir_sntprintf(szTip, SIZEOF(szTip), TranslateT("%s is typing a message"), pcli->pfnGetContactDisplayName(wParam, 0));
+ mir_sntprintf(szTip, SIZEOF(szTip), TranslateT("%s is typing a message"), pcli->pfnGetContactDisplayName(hContact, 0));
- if (ServiceExists(MS_CLIST_SYSTRAY_NOTIFY) && !(g_dat.flags&SMF_SHOWTYPINGCLIST)) {
+ if (ServiceExists(MS_CLIST_SYSTRAY_NOTIFY) && !(g_dat.flags & SMF_SHOWTYPINGCLIST)) {
MIRANDASYSTRAYNOTIFY tn = { sizeof(tn) };
tn.tszInfoTitle = TranslateT("Typing notification");
tn.tszInfo = szTip;
@@ -177,26 +177,25 @@ static int TypingMessage(WPARAM wParam, LPARAM lParam)
}
else {
CLISTEVENT cle = { sizeof(cle) };
- cle.hContact = wParam;
+ cle.hContact = hContact;
cle.hDbEvent = (HANDLE)1;
cle.flags = CLEF_ONLYAFEW | CLEF_TCHAR;
cle.hIcon = LoadSkinnedIcon( SKINICON_OTHER_TYPING );
cle.pszService = "SRMsg/ReadMessage";
cle.ptszTooltip = szTip;
- CallServiceSync(MS_CLIST_REMOVEEVENT, wParam, (LPARAM) 1);
- CallServiceSync(MS_CLIST_ADDEVENT, wParam, (LPARAM) & cle);
+ CallServiceSync(MS_CLIST_REMOVEEVENT, hContact, 1);
+ CallServiceSync(MS_CLIST_ADDEVENT, hContact, (LPARAM)&cle);
Skin_ReleaseIcon(cle.hIcon);
}
}
return 0;
}
-static int MessageSettingChanged(WPARAM wParam, LPARAM lParam)
+static int MessageSettingChanged(WPARAM hContact, LPARAM lParam)
{
- DBCONTACTWRITESETTING *cws = (DBCONTACTWRITESETTING *) lParam;
- MCONTACT hContact = wParam;
-
- if (cws->szModule == NULL) return 0;
+ DBCONTACTWRITESETTING *cws = (DBCONTACTWRITESETTING*)lParam;
+ if (cws->szModule == NULL)
+ return 0;
if (!strcmp(cws->szModule, "CList"))
WindowList_Broadcast(g_dat.hMessageWindowList, DM_UPDATETITLE, (WPARAM) cws, 0);
@@ -204,7 +203,7 @@ static int MessageSettingChanged(WPARAM wParam, LPARAM lParam)
if (cws->szSetting && !strcmp(cws->szSetting, "Timezone"))
WindowList_Broadcast(g_dat.hMessageWindowList, DM_NEWTIMEZONE, (WPARAM) cws, 0);
else {
- char *szProto = GetContactProto(wParam);
+ char *szProto = GetContactProto(hContact);
if (szProto && !strcmp(cws->szModule, szProto))
WindowList_Broadcast(g_dat.hMessageWindowList, DM_UPDATETITLE, (WPARAM) cws, 0);
}
@@ -313,9 +312,8 @@ static int IconsChanged(WPARAM, LPARAM)
return 0;
}
-static int PrebuildContactMenu(WPARAM wParam, LPARAM lParam)
+static int PrebuildContactMenu(WPARAM hContact, LPARAM lParam)
{
- MCONTACT hContact = wParam;
if (hContact) {
bool bEnabled = false;
char *szProto = GetContactProto(hContact);
diff --git a/src/core/stdmsg/src/statusicon.cpp b/src/core/stdmsg/src/statusicon.cpp
index bd813201cf..935af689ec 100644
--- a/src/core/stdmsg/src/statusicon.cpp
+++ b/src/core/stdmsg/src/statusicon.cpp
@@ -24,9 +24,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
HANDLE hHookIconPressedEvt;
-static int OnSrmmIconChanged(WPARAM wParam, LPARAM)
+static int OnSrmmIconChanged(WPARAM hContact, LPARAM)
{
- MCONTACT hContact = wParam;
if (hContact == NULL)
WindowList_Broadcast(g_dat.hMessageWindowList, DM_STATUSICONCHANGE, 0, 0);
else {
diff --git a/src/core/stdurl/url.cpp b/src/core/stdurl/url.cpp
index 5473c6a596..763fb637bd 100644
--- a/src/core/stdurl/url.cpp
+++ b/src/core/stdurl/url.cpp
@@ -39,21 +39,21 @@ static INT_PTR ReadUrlCommand(WPARAM, LPARAM lParam)
return 0;
}
-static int UrlEventAdded(WPARAM wParam, LPARAM lParam)
+static int UrlEventAdded(WPARAM hContact, LPARAM lParam)
{
DBEVENTINFO dbei = { sizeof(dbei) };
db_event_get((HANDLE)lParam, &dbei);
- if (dbei.flags&(DBEF_SENT|DBEF_READ) || dbei.eventType != EVENTTYPE_URL)
+ if (dbei.flags & (DBEF_SENT|DBEF_READ) || dbei.eventType != EVENTTYPE_URL)
return 0;
SkinPlaySound("RecvUrl");
TCHAR szTooltip[256];
- mir_sntprintf(szTooltip, SIZEOF(szTooltip), TranslateT("URL from %s"), pcli->pfnGetContactDisplayName(wParam, 0));
+ mir_sntprintf(szTooltip, SIZEOF(szTooltip), TranslateT("URL from %s"), pcli->pfnGetContactDisplayName(hContact, 0));
CLISTEVENT cle = { sizeof(cle) };
cle.flags = CLEF_TCHAR;
- cle.hContact = wParam;
+ cle.hContact = hContact;
cle.hDbEvent = (HANDLE)lParam;
cle.hIcon = LoadSkinIcon(SKINICON_EVENT_URL);
cle.pszService = "SRUrl/ReadUrl";
diff --git a/src/core/stduseronline/useronline.cpp b/src/core/stduseronline/useronline.cpp
index 1093f380db..2f896fe3af 100644
--- a/src/core/stduseronline/useronline.cpp
+++ b/src/core/stduseronline/useronline.cpp
@@ -31,24 +31,24 @@ static bool Proto_IsAccountEnabled(PROTOACCOUNT* pa)
return pa && ((pa->bIsEnabled && !pa->bDynDisabled) || pa->bOldProto);
}
-static int UserOnlineSettingChanged(WPARAM wParam, LPARAM lParam)
+static int UserOnlineSettingChanged(WPARAM hContact, LPARAM lParam)
{
DBCONTACTWRITESETTING *cws = (DBCONTACTWRITESETTING*)lParam;
- if ((HANDLE)wParam == NULL || strcmp(cws->szSetting, "Status"))
+ if (hContact == NULL || strcmp(cws->szSetting, "Status"))
return 0;
int newStatus = cws->value.wVal;
- int oldStatus = db_get_w(wParam, "UserOnline", "OldStatus", ID_STATUS_OFFLINE);
- db_set_w(wParam, "UserOnline", "OldStatus", (WORD)newStatus);
- if (CallService(MS_IGNORE_ISIGNORED, wParam, IGNOREEVENT_USERONLINE)) return 0;
- if (db_get_b(wParam, "CList", "Hidden", 0)) return 0;
+ int oldStatus = db_get_w(hContact, "UserOnline", "OldStatus", ID_STATUS_OFFLINE);
+ db_set_w(hContact, "UserOnline", "OldStatus", (WORD)newStatus);
+ if (CallService(MS_IGNORE_ISIGNORED, hContact, IGNOREEVENT_USERONLINE)) return 0;
+ if (db_get_b(hContact, "CList", "Hidden", 0)) return 0;
if (newStatus == ID_STATUS_OFFLINE && oldStatus != ID_STATUS_OFFLINE) {
// Remove the event from the queue if it exists since they are now offline
- int lastEvent = (int)db_get_dw(wParam, "UserOnline", "LastEvent", 0);
+ int lastEvent = (int)db_get_dw(hContact, "UserOnline", "LastEvent", 0);
if (lastEvent) {
- CallService(MS_CLIST_REMOVEEVENT, wParam, (LPARAM)lastEvent);
- db_set_dw(wParam, "UserOnline", "LastEvent", 0);
+ CallService(MS_CLIST_REMOVEEVENT, hContact, (LPARAM)lastEvent);
+ db_set_dw(hContact, "UserOnline", "LastEvent", 0);
}
}
if ((newStatus == ID_STATUS_ONLINE || newStatus == ID_STATUS_FREECHAT) &&
@@ -63,11 +63,11 @@ static int UserOnlineSettingChanged(WPARAM wParam, LPARAM lParam)
ZeroMemory(&cle, sizeof(cle));
cle.cbSize = sizeof(cle);
cle.flags = CLEF_ONLYAFEW | CLEF_TCHAR;
- cle.hContact = wParam;
+ cle.hContact = hContact;
cle.hDbEvent = (HANDLE)(uniqueEventId++);
cle.hIcon = LoadSkinIcon(SKINICON_OTHER_USERONLINE, false);
cle.pszService = "UserOnline/Description";
- mir_sntprintf(tooltip, SIZEOF(tooltip), TranslateT("%s is online"), pcli->pfnGetContactDisplayName(wParam, 0));
+ mir_sntprintf(tooltip, SIZEOF(tooltip), TranslateT("%s is online"), pcli->pfnGetContactDisplayName(hContact, 0));
cle.ptszTooltip = tooltip;
CallService(MS_CLIST_ADDEVENT, 0, (LPARAM)&cle);
IcoLib_ReleaseIcon(cle.hIcon, 0);
diff --git a/src/modules/chat/clist.cpp b/src/modules/chat/clist.cpp
index 1400bc8d07..64af00ea2c 100644
--- a/src/modules/chat/clist.cpp
+++ b/src/modules/chat/clist.cpp
@@ -101,9 +101,8 @@ BOOL SetAllOffline(BOOL bHide, const char *pszModule)
return TRUE;
}
-int RoomDoubleclicked(WPARAM wParam, LPARAM lParam)
+int RoomDoubleclicked(WPARAM hContact, LPARAM lParam)
{
- MCONTACT hContact = wParam;
if (!hContact)
return 0;
@@ -139,37 +138,34 @@ INT_PTR EventDoubleclicked(WPARAM wParam,LPARAM lParam)
return RoomDoubleclicked((WPARAM)((CLISTEVENT*)lParam)->hContact, 0);
}
-INT_PTR JoinChat(WPARAM wParam, LPARAM lParam)
+INT_PTR JoinChat(WPARAM hContact, LPARAM lParam)
{
- MCONTACT hContact = wParam;
if (hContact) {
char *szProto = GetContactProto(hContact);
if (szProto) {
if (db_get_w(hContact, szProto, "Status", 0) == ID_STATUS_OFFLINE)
- CallProtoService(szProto, PS_JOINCHAT, wParam, lParam);
+ CallProtoService(szProto, PS_JOINCHAT, hContact, lParam);
else
- RoomDoubleclicked(wParam, 0);
+ RoomDoubleclicked(hContact, 0);
}
}
return 0;
}
-INT_PTR LeaveChat(WPARAM wParam, LPARAM lParam)
+INT_PTR LeaveChat(WPARAM hContact, LPARAM lParam)
{
- MCONTACT hContact = wParam;
if (hContact) {
char *szProto = GetContactProto(hContact);
if (szProto)
- CallProtoService(szProto, PS_LEAVECHAT, wParam, lParam);
+ CallProtoService(szProto, PS_LEAVECHAT, hContact, lParam);
}
return 0;
}
-int PrebuildContactMenu(WPARAM wParam, LPARAM)
+int PrebuildContactMenu(WPARAM hContact, LPARAM)
{
- MCONTACT hContact = wParam;
- if (hContact == NULL)
+ if (hContact == 0)
return 0;
bool bEnabled = false;
diff --git a/src/modules/clist/clistevents.cpp b/src/modules/clist/clistevents.cpp
index afea5bcfc7..73b3abfb4c 100644
--- a/src/modules/clist/clistevents.cpp
+++ b/src/modules/clist/clistevents.cpp
@@ -382,9 +382,8 @@ static int RemoveEventsForContact(WPARAM wParam, LPARAM)
return 0;
}
-static int CListEventSettingsChanged(WPARAM wParam, LPARAM lParam)
+static int CListEventSettingsChanged(WPARAM hContact, LPARAM lParam)
{
- MCONTACT hContact = wParam;
DBCONTACTWRITESETTING *cws = (DBCONTACTWRITESETTING*)lParam;
if (hContact == NULL && cws && cws->szModule && cws->szSetting && strcmp(cws->szModule, "CList") == 0) {
if (strcmp(cws->szSetting, "DisableTrayFlash") == 0)
diff --git a/src/modules/clist/clistmenus.cpp b/src/modules/clist/clistmenus.cpp
index dd5b278f86..56b6cd7720 100644
--- a/src/modules/clist/clistmenus.cpp
+++ b/src/modules/clist/clistmenus.cpp
@@ -318,10 +318,9 @@ static INT_PTR AddContactMenuItem(WPARAM, LPARAM lParam)
return (INT_PTR)menuHandle;
}
-static INT_PTR BuildContactMenu(WPARAM wParam, LPARAM)
+static INT_PTR BuildContactMenu(WPARAM hContact, LPARAM)
{
- MCONTACT hContact = wParam;
- NotifyEventHooks(hPreBuildContactMenuEvent, (WPARAM)hContact, 0);
+ NotifyEventHooks(hPreBuildContactMenuEvent, hContact, 0);
char *szProto = GetContactProto(hContact);
diff --git a/src/modules/clist/clistsettings.cpp b/src/modules/clist/clistsettings.cpp
index 81dc9c3008..196daf1b51 100644
--- a/src/modules/clist/clistsettings.cpp
+++ b/src/modules/clist/clistsettings.cpp
@@ -156,11 +156,10 @@ TCHAR* fnGetContactDisplayName(MCONTACT hContact, int mode)
return (cacheEntry == NULL) ? mir_tstrdup(buffer) : buffer;
}
-INT_PTR GetContactDisplayName(WPARAM wParam, LPARAM lParam)
+INT_PTR GetContactDisplayName(WPARAM hContact, LPARAM lParam)
{
static char retVal[200];
ClcCacheEntry *cacheEntry = NULL;
- MCONTACT hContact = wParam;
if (lParam & GCDNF_UNICODE)
return (INT_PTR)cli.pfnGetContactDisplayName(hContact, lParam & ~GCDNF_UNICODE);
@@ -226,11 +225,10 @@ int ContactDeleted(WPARAM wParam, LPARAM)
return 0;
}
-int ContactSettingChanged(WPARAM wParam, LPARAM lParam)
+int ContactSettingChanged(WPARAM hContact, LPARAM lParam)
{
DBCONTACTWRITESETTING *cws = (DBCONTACTWRITESETTING *) lParam;
DBVARIANT dbv;
- MCONTACT hContact = wParam;
// Early exit
if (hContact == NULL)
@@ -242,7 +240,7 @@ int ContactSettingChanged(WPARAM wParam, LPARAM lParam)
cli.pfnInvalidateDisplayNameCacheEntry(hContact);
if (!strcmp(cws->szSetting, "UIN") || !strcmp(cws->szSetting, "Nick") || !strcmp(cws->szSetting, "FirstName")
|| !strcmp(cws->szSetting, "LastName") || !strcmp(cws->szSetting, "e-mail")) {
- CallService(MS_CLUI_CONTACTRENAMED, wParam, 0);
+ CallService(MS_CLUI_CONTACTRENAMED, hContact, 0);
}
else if (!strcmp(cws->szSetting, "Status")) {
if (!db_get_b(hContact, "CList", "Hidden", 0)) {
@@ -250,7 +248,7 @@ int ContactSettingChanged(WPARAM wParam, LPARAM lParam)
// User's state is changing, and we are hideOffline-ing
if (cws->value.wVal == ID_STATUS_OFFLINE) {
cli.pfnChangeContactIcon(hContact, cli.pfnIconFromStatusMode(cws->szModule, cws->value.wVal, hContact), 0);
- CallService(MS_CLUI_CONTACTDELETED, wParam, 0);
+ CallService(MS_CLUI_CONTACTDELETED, hContact, 0);
mir_free(dbv.pszVal);
return 0;
}
@@ -270,11 +268,11 @@ int ContactSettingChanged(WPARAM wParam, LPARAM lParam)
if (!strcmp(cws->szModule, "CList")) {
if (!strcmp(cws->szSetting, "Hidden")) {
if (cws->value.type == DBVT_DELETED || cws->value.bVal == 0) {
- char *szProto = GetContactProto(wParam);
+ char *szProto = GetContactProto(hContact);
cli.pfnChangeContactIcon(hContact, cli.pfnIconFromStatusMode(szProto, szProto == NULL ? ID_STATUS_OFFLINE : db_get_w(hContact, szProto, "Status", ID_STATUS_OFFLINE), hContact), 1);
}
else
- CallService(MS_CLUI_CONTACTDELETED, wParam, 0);
+ CallService(MS_CLUI_CONTACTDELETED, hContact, 0);
}
if (!strcmp(cws->szSetting, "MyHandle"))
cli.pfnInvalidateDisplayNameCacheEntry(hContact);
diff --git a/src/modules/clist/clui.cpp b/src/modules/clist/clui.cpp
index 4242f183c8..3c332f7042 100644
--- a/src/modules/clist/clui.cpp
+++ b/src/modules/clist/clui.cpp
@@ -73,9 +73,8 @@ static int CluiModulesLoaded(WPARAM, LPARAM)
// Happens on shutdown and standby.
static void DisconnectAll()
{
- int nProto;
- for (nProto = 0; nProto < accounts.getCount(); nProto++)
- CallProtoServiceInt(NULL,accounts[nProto]->szModuleName, PS_SETSTATUS, ID_STATUS_OFFLINE, 0);
+ for (int i = 0; i < accounts.getCount(); i++)
+ CallProtoServiceInt(NULL,accounts[i]->szModuleName, PS_SETSTATUS, ID_STATUS_OFFLINE, 0);
}
static int CluiIconsChanged(WPARAM, LPARAM)
@@ -89,12 +88,10 @@ static HGENMENU hRenameMenuItem;
static int MenuItem_PreBuild(WPARAM, LPARAM)
{
TCHAR cls[128];
- HANDLE hItem;
HWND hwndClist = GetFocus();
-
GetClassName(hwndClist, cls, SIZEOF(cls));
hwndClist = (!lstrcmp( _T(CLISTCONTROL_CLASS), cls)) ? hwndClist : cli.hwndContactList;
- hItem = (HANDLE) SendMessage(hwndClist, CLM_GETSELECTION, 0, 0);
+ HANDLE hItem = (HANDLE)SendMessage(hwndClist, CLM_GETSELECTION, 0, 0);
Menu_ShowItem(hRenameMenuItem, hItem != 0);
return 0;
}
@@ -102,12 +99,11 @@ static int MenuItem_PreBuild(WPARAM, LPARAM)
static INT_PTR MenuItem_RenameContact(WPARAM, LPARAM)
{
TCHAR cls[128];
- HANDLE hItem;
HWND hwndClist = GetFocus();
GetClassName(hwndClist, cls, SIZEOF(cls));
// worst case scenario, the rename is sent to the main contact list
hwndClist = (!lstrcmp( _T(CLISTCONTROL_CLASS), cls)) ? hwndClist : cli.hwndContactList;
- hItem = (HANDLE) SendMessage(hwndClist, CLM_GETSELECTION, 0, 0);
+ HANDLE hItem = (HANDLE)SendMessage(hwndClist, CLM_GETSELECTION, 0, 0);
if (hItem) {
SetFocus(hwndClist);
SendMessage(hwndClist, CLM_EDITLABEL, (WPARAM) hItem, 0);
@@ -122,17 +118,12 @@ static INT_PTR CALLBACK AskForConfirmationDlgProc(HWND hWnd, UINT msg, WPARAM wP
TranslateDialogDefault(hWnd);
{
LOGFONT lf;
- HFONT hFont;
-
- hFont = (HFONT) SendDlgItemMessage(hWnd, IDYES, WM_GETFONT, 0, 0);
+ HFONT hFont = (HFONT)SendDlgItemMessage(hWnd, IDYES, WM_GETFONT, 0, 0);
GetObject(hFont, sizeof(lf), &lf);
lf.lfWeight = FW_BOLD;
SendDlgItemMessage(hWnd, IDC_TOPLINE, WM_SETFONT, (WPARAM) CreateFontIndirect(&lf), 0);
- }
- {
- TCHAR szFormat[256];
- TCHAR szFinal[256];
-
+
+ TCHAR szFormat[256], szFinal[256];
GetDlgItemText(hWnd, IDC_TOPLINE, szFormat, SIZEOF(szFormat));
mir_sntprintf(szFinal, SIZEOF(szFinal), szFormat, cli.pfnGetContactDisplayName(lParam, 0));
SetDlgItemText(hWnd, IDC_TOPLINE, szFinal);
@@ -173,56 +164,46 @@ static INT_PTR MenuItem_DeleteContact(WPARAM wParam, LPARAM lParam)
//see notes about deleting contacts on PF1_SERVERCLIST servers in m_protosvc.h
UINT_PTR action;
- if (db_get_b(NULL, "CList", "ConfirmDelete", SETTING_CONFIRMDELETE_DEFAULT) &&
- !(GetKeyState(VK_SHIFT)&0x8000))
+ if (db_get_b(NULL, "CList", "ConfirmDelete", SETTING_CONFIRMDELETE_DEFAULT) && !(GetKeyState(VK_SHIFT) & 0x8000))
// Ask user for confirmation, and if the contact should be archived (hidden, not deleted)
action = DialogBoxParam(hInst, MAKEINTRESOURCE(IDD_DELETECONTACT), (HWND) lParam, AskForConfirmationDlgProc, wParam);
else
action = IDYES;
switch (action) {
-
- // Delete contact
- case IDYES:
- {
- char *szProto = GetContactProto(wParam);
- if (szProto != NULL) {
- // Check if protocol uses server side lists
- DWORD caps;
-
- caps = (DWORD) CallProtoServiceInt(NULL,szProto, PS_GETCAPS, PFLAGNUM_1, 0);
- if (caps & PF1_SERVERCLIST) {
- int status;
-
- status = CallProtoServiceInt(NULL,szProto, PS_GETSTATUS, 0, 0);
- if (status == ID_STATUS_OFFLINE || (status >= ID_STATUS_CONNECTING && status < ID_STATUS_CONNECTING + MAX_CONNECT_RETRIES)) {
- // Set a flag so we remember to delete the contact when the protocol goes online the next time
- db_set_b(wParam, "CList", "Delete", 1);
- MessageBox(NULL,
- TranslateT("This contact is on an instant messaging system which stores its contact list on a central server. The contact will be removed from the server and from your contact list when you next connect to that network."),
- TranslateT("Delete contact"), MB_ICONINFORMATION | MB_OK);
- return 0;
- }
+ case IDC_HIDE: // Archive contact
+ db_set_b(wParam, "CList", "Hidden", 1);
+ break;
+
+ case IDYES: // Delete contact
+ char *szProto = GetContactProto(wParam);
+ if (szProto != NULL) {
+ // Check if protocol uses server side lists
+ DWORD caps = CallProtoServiceInt(NULL, szProto, PS_GETCAPS, PFLAGNUM_1, 0);
+ if (caps & PF1_SERVERCLIST) {
+ int status = CallProtoServiceInt(NULL, szProto, PS_GETSTATUS, 0, 0);
+ if (status == ID_STATUS_OFFLINE || (status >= ID_STATUS_CONNECTING && status < ID_STATUS_CONNECTING + MAX_CONNECT_RETRIES)) {
+ // Set a flag so we remember to delete the contact when the protocol goes online the next time
+ db_set_b(wParam, "CList", "Delete", 1);
+ MessageBox(NULL,
+ TranslateT("This contact is on an instant messaging system which stores its contact list on a central server. The contact will be removed from the server and from your contact list when you next connect to that network."),
+ TranslateT("Delete contact"), MB_ICONINFORMATION | MB_OK);
+ return 0;
}
}
-
- CallService(MS_DB_CONTACT_DELETE, wParam, 0);
}
- break;
- // Archive contact
- case IDC_HIDE:
- db_set_b(wParam, "CList", "Hidden", 1);
+ CallService(MS_DB_CONTACT_DELETE, wParam, 0);
break;
}
return 0;
}
-static INT_PTR MenuItem_AddContactToList(WPARAM wParam, LPARAM)
+static INT_PTR MenuItem_AddContactToList(WPARAM hContact, LPARAM)
{
ADDCONTACTSTRUCT acs = { 0 };
- acs.hContact = wParam;
+ acs.hContact = hContact;
acs.handleType = HANDLE_CONTACT;
acs.szProto = "";
CallService(MS_ADDCONTACT_SHOW, NULL, (LPARAM)&acs);
diff --git a/src/modules/extraicons/DefaultExtraIcons.cpp b/src/modules/extraicons/DefaultExtraIcons.cpp
index a47ce5e7a9..7fa9fc17de 100644
--- a/src/modules/extraicons/DefaultExtraIcons.cpp
+++ b/src/modules/extraicons/DefaultExtraIcons.cpp
@@ -159,9 +159,8 @@ static void SetExtraIcons(MCONTACT hContact)
}
}
-static int SettingChanged(WPARAM wParam, LPARAM lParam)
+static int SettingChanged(WPARAM hContact, LPARAM lParam)
{
- MCONTACT hContact = wParam;
if (hContact == NULL)
return 0;
@@ -203,13 +202,12 @@ static int SettingChanged(WPARAM wParam, LPARAM lParam)
return 0;
}
-static int DefaultOnClick(WPARAM wParam, LPARAM lParam, LPARAM param)
+static int DefaultOnClick(WPARAM hContact, LPARAM lParam, LPARAM param)
{
Info *p = (Info*)param;
if (p == NULL)
return 0;
- MCONTACT hContact = wParam;
if (hContact == NULL)
return 0;
@@ -277,9 +275,8 @@ static ProtoInfo* FindProto(const char *proto)
return p;
}
-static int ProtocolApplyIcon(WPARAM wParam, LPARAM lParam)
+static int ProtocolApplyIcon(WPARAM hContact, LPARAM lParam)
{
- MCONTACT hContact = wParam;
char *proto = GetContactProto(hContact);
if (IsEmpty(proto))
return 0;
diff --git a/src/modules/extraicons/extraicons.cpp b/src/modules/extraicons/extraicons.cpp
index 7fae900021..037c97e142 100644
--- a/src/modules/extraicons/extraicons.cpp
+++ b/src/modules/extraicons/extraicons.cpp
@@ -246,9 +246,8 @@ int ClistExtraListRebuild(WPARAM wParam, LPARAM lParam)
return 0;
}
-int ClistExtraImageApply(WPARAM wParam, LPARAM lParam)
+int ClistExtraImageApply(WPARAM hContact, LPARAM lParam)
{
- MCONTACT hContact = wParam;
if (hContact == NULL)
return 0;
@@ -260,9 +259,8 @@ int ClistExtraImageApply(WPARAM wParam, LPARAM lParam)
return 0;
}
-int ClistExtraClick(WPARAM wParam, LPARAM lParam)
+int ClistExtraClick(WPARAM hContact, LPARAM lParam)
{
- MCONTACT hContact = wParam;
if (hContact == NULL)
return 0;
diff --git a/src/modules/protocols/protoaccs.cpp b/src/modules/protocols/protoaccs.cpp
index 94a96366e4..9f7480390b 100644
--- a/src/modules/protocols/protoaccs.cpp
+++ b/src/modules/protocols/protoaccs.cpp
@@ -197,24 +197,22 @@ void WriteDbAccounts()
}
/////////////////////////////////////////////////////////////////////////////////////////
-static int OnContactDeleted(WPARAM wParam, LPARAM lParam)
+static int OnContactDeleted(WPARAM hContact, LPARAM lParam)
{
- MCONTACT hContact = wParam;
if (hContact) {
- PROTOACCOUNT* pa = Proto_GetAccount(hContact);
+ PROTOACCOUNT *pa = Proto_GetAccount(hContact);
if (Proto_IsAccountEnabled(pa) && pa->ppro)
- pa->ppro->OnEvent(EV_PROTO_ONCONTACTDELETED, wParam, lParam);
+ pa->ppro->OnEvent(EV_PROTO_ONCONTACTDELETED, hContact, lParam);
}
return 0;
}
-static int OnDbSettingsChanged(WPARAM wParam, LPARAM lParam)
+static int OnDbSettingsChanged(WPARAM hContact, LPARAM lParam)
{
- MCONTACT hContact = wParam;
if (hContact) {
PROTOACCOUNT* pa = Proto_GetAccount(hContact);
if (Proto_IsAccountEnabled(pa) && pa->ppro)
- pa->ppro->OnEvent(EV_PROTO_DBSETTINGSCHANGED, wParam, lParam);
+ pa->ppro->OnEvent(EV_PROTO_DBSETTINGSCHANGED, hContact, lParam);
}
return 0;
}
diff --git a/src/modules/srmm/statusicon.cpp b/src/modules/srmm/statusicon.cpp
index 17d48c3a32..5ca2c8740e 100644
--- a/src/modules/srmm/statusicon.cpp
+++ b/src/modules/srmm/statusicon.cpp
@@ -78,7 +78,7 @@ static OBJLIST<StatusIconMain> arIcons(3, CompareIcons);
static HANDLE hHookIconsChanged;
-INT_PTR ModifyStatusIcon(WPARAM wParam, LPARAM lParam)
+INT_PTR ModifyStatusIcon(WPARAM hContact, LPARAM lParam)
{
StatusIconData *sid = (StatusIconData *)lParam;
if (sid == NULL || sid->cbSize != sizeof(StatusIconData))
@@ -88,7 +88,6 @@ INT_PTR ModifyStatusIcon(WPARAM wParam, LPARAM lParam)
if (p == NULL)
return 1;
- MCONTACT hContact = wParam;
if (hContact == NULL) {
mir_free(p->sid.szModule);
mir_free(p->sid.szTooltip);
@@ -115,7 +114,7 @@ INT_PTR ModifyStatusIcon(WPARAM wParam, LPARAM lParam)
mir_free(pc->tszTooltip);
pc->tszTooltip = (sid->flags & MBF_UNICODE) ? mir_u2t(sid->wszTooltip) : mir_a2t(sid->szTooltip);
- NotifyEventHooks(hHookIconsChanged, wParam, (LPARAM)p);
+ NotifyEventHooks(hHookIconsChanged, hContact, (LPARAM)p);
return 0;
}