summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2014-02-16 12:44:38 +0000
committerGeorge Hazan <george.hazan@gmail.com>2014-02-16 12:44:38 +0000
commit907116c051e995a6a593743c7a6dfdece747c2c0 (patch)
tree59d079cb818382ae09840da99e3be1b58abffff5 /plugins
parentbec34b3f632d179368f00b49e984ac576f14fad4 (diff)
code cleaning
git-svn-id: http://svn.miranda-ng.org/main/trunk@8133 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins')
-rw-r--r--plugins/AuthState/src/main.cpp35
-rw-r--r--plugins/BuddyExpectator/src/BuddyExpectator.cpp58
-rw-r--r--plugins/BuddyPounce/src/main.cpp9
-rw-r--r--plugins/Clist_modern/src/modern_clistmenus.cpp6
-rw-r--r--plugins/CountryFlags/src/extraimg.cpp10
-rw-r--r--plugins/MirandaG15/src/CAppletManager.cpp53
-rw-r--r--plugins/RecentContacts/src/RecentContacts.cpp8
-rw-r--r--plugins/SimpleStatusMsg/src/awaymsg.cpp10
-rw-r--r--plugins/UserInfoEx/src/svc_refreshci.cpp8
-rw-r--r--plugins/Weather/src/weather_popup.cpp8
-rw-r--r--plugins/WebView/src/webview_alerts.cpp48
-rw-r--r--plugins/WebView/src/webview_datawnd.cpp12
-rw-r--r--plugins/WebView/src/webview_getdata.cpp14
-rw-r--r--plugins/WebView/src/webview_opts.cpp2
-rw-r--r--plugins/XSoundNotify/src/xsn_main.cpp6
15 files changed, 131 insertions, 156 deletions
diff --git a/plugins/AuthState/src/main.cpp b/plugins/AuthState/src/main.cpp
index 6d2223af71..b6af9e6668 100644
--- a/plugins/AuthState/src/main.cpp
+++ b/plugins/AuthState/src/main.cpp
@@ -89,12 +89,12 @@ INT_PTR getIconToUse(MCONTACT hContact, LPARAM lParam)
return icon_none;
}
-int onExtraImageApplying(WPARAM wParam, LPARAM lParam)
+int onExtraImageApplying(WPARAM hContact, LPARAM lParam)
{
- if (wParam == NULL)
+ if (hContact == NULL)
return 0;
- int usedIcon = getIconToUse(wParam, lParam);
+ int usedIcon = getIconToUse(hContact, lParam);
const char *icon;
switch (usedIcon) {
@@ -103,38 +103,38 @@ int onExtraImageApplying(WPARAM wParam, LPARAM lParam)
case icon_auth: icon = "auth_icon"; break;
default: icon = NULL; break;
}
- ExtraIcon_SetIcon(hExtraIcon, wParam, icon);
+ ExtraIcon_SetIcon(hExtraIcon, hContact, icon);
return 0;
}
-int onContactSettingChanged(WPARAM wParam,LPARAM lParam)
+int onContactSettingChanged(WPARAM hContact, LPARAM lParam)
{
DBCONTACTWRITESETTING *cws=(DBCONTACTWRITESETTING*)lParam;
- char *proto = GetContactProto(wParam);
+ char *proto = GetContactProto(hContact);
if (!proto) return 0;
if (!lstrcmpA(cws->szModule,proto))
if (!lstrcmpA(cws->szSetting,"Auth") || !lstrcmpA(cws->szSetting,"Grant") || !lstrcmpA(cws->szSetting,"ServerId") || !lstrcmpA(cws->szSetting,"ContactType"))
- onExtraImageApplying(wParam, 1);
+ onExtraImageApplying(hContact, 1);
return 0;
}
-int onDBContactAdded(WPARAM wParam, LPARAM lParam)
+int onDBContactAdded(WPARAM hContact, LPARAM lParam)
{
// A new contact added, mark it as recent
- db_set_b(wParam, MODULENAME, "ShowIcons", 1);
- onExtraImageApplying(wParam, 0);
+ db_set_b(hContact, MODULENAME, "ShowIcons", 1);
+ onExtraImageApplying(hContact, 0);
return 0;
}
-INT_PTR onAuthMenuSelected(WPARAM wParam, LPARAM lParam)
+INT_PTR onAuthMenuSelected(WPARAM hContact, LPARAM lParam)
{
- byte enabled = db_get_b(wParam,"AuthState","ShowIcons",1);
- db_set_b(wParam, MODULENAME, "ShowIcons", !enabled);
+ byte enabled = db_get_b(hContact,"AuthState","ShowIcons",1);
+ db_set_b(hContact, MODULENAME, "ShowIcons", !enabled);
- onExtraImageApplying(wParam, 0);
+ onExtraImageApplying(hContact, 0);
return 0;
}
@@ -163,7 +163,7 @@ static IconItem iconList[] =
{ LPGEN("Auth & Grant"), "authgrant_icon", IDI_AUTHGRANT }
};
-int onModulesLoaded(WPARAM wParam,LPARAM lParam)
+int onModulesLoaded(WPARAM, LPARAM)
{
// IcoLib support
Icon_Register(g_hInst, "Auth State", iconList, SIZEOF(iconList));
@@ -182,7 +182,7 @@ int onModulesLoaded(WPARAM wParam,LPARAM lParam)
return 0;
}
-static int onShutdown(WPARAM wParam,LPARAM lParam)
+static int onShutdown(WPARAM, LPARAM)
{
DestroyServiceFunction(hAuthMenuSelected);
return 0;
@@ -203,8 +203,7 @@ extern "C" int __declspec(dllexport) Load(void)
HookEvent(ME_DB_CONTACT_ADDED, onDBContactAdded);
- if (bContactMenuItem)
- {
+ if (bContactMenuItem) {
hAuthMenuSelected = CreateServiceFunction("AuthState/MenuItem", onAuthMenuSelected);
CLISTMENUITEM mi = { sizeof(mi) };
diff --git a/plugins/BuddyExpectator/src/BuddyExpectator.cpp b/plugins/BuddyExpectator/src/BuddyExpectator.cpp
index 23b3aa2bd2..e8108e505d 100644
--- a/plugins/BuddyExpectator/src/BuddyExpectator.cpp
+++ b/plugins/BuddyExpectator/src/BuddyExpectator.cpp
@@ -359,14 +359,12 @@ INT_PTR MissYouAction(WPARAM wParam, LPARAM lParam)
* when called from popup, wParam = (HANDLE)hContact and lParam == 0,
* when called from clist event, wParam = hWndCList, lParam = &CLISTEVENT
*/
-INT_PTR ContactReturnedAction(WPARAM wParam, LPARAM lParam)
+INT_PTR ContactReturnedAction(WPARAM hContact, LPARAM lParam)
{
- MCONTACT hContact;
if (lParam) {
- CLISTEVENT* cle = (CLISTEVENT*)lParam;
+ CLISTEVENT *cle = (CLISTEVENT*)lParam;
hContact = cle->hContact;
}
- else hContact = wParam;
if (options.iShowMessageWindow>0)
CallService(MS_MSG_SENDMESSAGET, hContact, 0);
@@ -383,14 +381,12 @@ INT_PTR ContactReturnedAction(WPARAM wParam, LPARAM lParam)
* when called from popup, wParam = (HANDLE)hContact and lParam == 0,
* when called from clist event, wParam = hWndCList, lParam = &CLISTEVENT
*/
-INT_PTR ContactStillAbsentAction(WPARAM wParam, LPARAM lParam)
+INT_PTR ContactStillAbsentAction(WPARAM hContact, LPARAM lParam)
{
- MCONTACT hContact;
if (lParam) {
CLISTEVENT* cle = (CLISTEVENT*)lParam;
hContact = cle->hContact;
}
- else hContact = wParam;
switch (options.action2) {
case GCA_DELETE:
@@ -412,7 +408,7 @@ INT_PTR ContactStillAbsentAction(WPARAM wParam, LPARAM lParam)
/**
* Load icons either from icolib or built in
*/
-int onIconsChanged(WPARAM wParam, LPARAM lParam)
+int onIconsChanged(WPARAM, LPARAM)
{
hIcon = Skin_GetIcon("main_icon");
return 0;
@@ -421,17 +417,17 @@ int onIconsChanged(WPARAM wParam, LPARAM lParam)
/**
* Menu item click action
*/
-INT_PTR MenuMissYouClick(WPARAM wParam, LPARAM lParam)
+INT_PTR MenuMissYouClick(WPARAM hContact, LPARAM)
{
- if (db_get_b(wParam, MODULE_NAME, "MissYou", 0)) {
- db_set_b(wParam, MODULE_NAME, "MissYou", 0);
+ if (db_get_b(hContact, MODULE_NAME, "MissYou", 0)) {
+ db_set_b(hContact, MODULE_NAME, "MissYou", 0);
if (options.MissYouIcon)
- ExtraIcon_Clear(hExtraIcon, wParam);
+ ExtraIcon_Clear(hExtraIcon, hContact);
}
else {
- db_set_b(wParam, MODULE_NAME, "MissYou", 1);
+ db_set_b(hContact, MODULE_NAME, "MissYou", 1);
if (options.MissYouIcon)
- ExtraIcon_SetIcon(hExtraIcon, wParam, "enabled_icon");
+ ExtraIcon_SetIcon(hExtraIcon, hContact, "enabled_icon");
}
return 0;
@@ -440,15 +436,15 @@ INT_PTR MenuMissYouClick(WPARAM wParam, LPARAM lParam)
/**
* Menu is about to appear
*/
-int onPrebuildContactMenu(WPARAM wParam, LPARAM lParam)
+int onPrebuildContactMenu(WPARAM hContact, LPARAM)
{
- char *proto = GetContactProto(wParam);
+ char *proto = GetContactProto(hContact);
if (!proto)
return 0;
CLISTMENUITEM mi = { sizeof(mi) };
mi.flags = CMIM_ICON | CMIM_NAME | CMIF_TCHAR;
- if (db_get_b(wParam, MODULE_NAME, "MissYou", 0)) {
+ if (db_get_b(hContact, MODULE_NAME, "MissYou", 0)) {
mi.ptszName = LPGENT("Disable Miss You");
mi.icolibItem = iconList[1].hIcolib;
}
@@ -457,14 +453,14 @@ int onPrebuildContactMenu(WPARAM wParam, LPARAM lParam)
mi.icolibItem = iconList[2].hIcolib;
}
Menu_ModifyItem(hContactMenu, &mi);
- Menu_ShowItem(hContactMenu, !db_get_b(wParam, proto, "ChatRoom", 0) && (CallProtoService(proto, PS_GETCAPS, PFLAGNUM_1, 0) & PF1_IMSEND));
+ Menu_ShowItem(hContactMenu, !db_get_b(hContact, proto, "ChatRoom", 0) && (CallProtoService(proto, PS_GETCAPS, PFLAGNUM_1, 0) & PF1_IMSEND));
return 0;
}
-int onExtraImageApplying(WPARAM wParam, LPARAM lParam)
+int onExtraImageApplying(WPARAM hContact, LPARAM)
{
- if ( db_get_b(wParam, MODULE_NAME, "MissYou", 0))
- ExtraIcon_SetIcon(hExtraIcon, wParam, "enabled_icon");
+ if ( db_get_b(hContact, MODULE_NAME, "MissYou", 0))
+ ExtraIcon_SetIcon(hExtraIcon, hContact, "enabled_icon");
return 0;
}
@@ -472,11 +468,9 @@ int onExtraImageApplying(WPARAM wParam, LPARAM lParam)
/**
* ContactSettingChanged callback
*/
-int SettingChanged(WPARAM wParam, LPARAM lParam)
+int SettingChanged(WPARAM hContact, LPARAM lParam)
{
- MCONTACT hContact = (MCONTACT) wParam;
- DBCONTACTWRITESETTING *inf = (DBCONTACTWRITESETTING *) lParam;
-
+ DBCONTACTWRITESETTING *inf = (DBCONTACTWRITESETTING*)lParam;
if (hContact == NULL || inf->value.type == DBVT_DELETED || strcmp(inf->szSetting, "Status") != 0)
return 0;
@@ -536,8 +530,7 @@ int SettingChanged(WPARAM wParam, LPARAM lParam)
}
unsigned int AbsencePeriod = db_get_dw(hContact, MODULE_NAME, "iAbsencePeriod", options.iAbsencePeriod);
- if (isContactGoneFor(hContact, AbsencePeriod))
- {
+ if (isContactGoneFor(hContact, AbsencePeriod)) {
TCHAR* message = TranslateT("has returned after a long absence.");
TCHAR tmpBuf[251] = {0};
time_t tmpTime = getLastSeen(hContact);
@@ -598,11 +591,10 @@ void CALLBACK TimerProc(HWND, UINT, UINT_PTR, DWORD)
/**
* Called when all the modules have had their modules loaded event handlers called (dependence of popups on fontservice :( )
*/
-int ModulesLoaded2(WPARAM wParam, LPARAM lParam)
+int ModulesLoaded2(WPARAM, LPARAM)
{
// check for 'still absent' contacts on startup
TimerProc(0, 0, 0, 0);
-
return 0;
}
@@ -610,7 +602,7 @@ int ModulesLoaded2(WPARAM wParam, LPARAM lParam)
* Called when all the modules are loaded
*/
-int ModulesLoaded(WPARAM wParam, LPARAM lParam)
+int ModulesLoaded(WPARAM, LPARAM)
{
HookEvent(ME_USERINFO_INITIALISE, UserinfoInit);
@@ -669,13 +661,13 @@ extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD miranda
return &pluginInfo;
}
-int ContactAdded(WPARAM wParam, LPARAM lParam)
+int ContactAdded(WPARAM hContact, LPARAM)
{
- db_set_dw(wParam, MODULE_NAME, "CreationTime", (DWORD)time(0));
+ db_set_dw(hContact, MODULE_NAME, "CreationTime", (DWORD)time(0));
return 0;
}
-int onShutdown(WPARAM wParam,LPARAM lParam)
+int onShutdown(WPARAM, LPARAM)
{
DestroyServiceFunction(hContactReturnedAction);
DestroyServiceFunction(hContactStillAbsentAction);
diff --git a/plugins/BuddyPounce/src/main.cpp b/plugins/BuddyPounce/src/main.cpp
index ba13bc78d9..0c53aac56e 100644
--- a/plugins/BuddyPounce/src/main.cpp
+++ b/plugins/BuddyPounce/src/main.cpp
@@ -189,11 +189,12 @@ int UserOnlineSettingChanged(WPARAM hContact, LPARAM lParam)
return 0;
}
-INT_PTR BuddyPounceMenuCommand(WPARAM wParam, LPARAM lParam)
+INT_PTR BuddyPounceMenuCommand(WPARAM hContact, LPARAM lParam)
{
- if (db_get_b(NULL, modname, "UseAdvanced", 0) || db_get_b(wParam, modname, "UseAdvanced", 0))
- CreateDialogParam(hInst,MAKEINTRESOURCE(IDD_POUNCE),0,BuddyPounceDlgProc, wParam);
- else CreateDialogParam(hInst,MAKEINTRESOURCE(IDD_POUNCE_SIMPLE),0,BuddyPounceSimpleDlgProc, wParam);
+ if (db_get_b(NULL, modname, "UseAdvanced", 0) || db_get_b(hContact, modname, "UseAdvanced", 0))
+ CreateDialogParam(hInst,MAKEINTRESOURCE(IDD_POUNCE),0,BuddyPounceDlgProc, hContact);
+ else
+ CreateDialogParam(hInst,MAKEINTRESOURCE(IDD_POUNCE_SIMPLE),0,BuddyPounceSimpleDlgProc, hContact);
return 0;
}
diff --git a/plugins/Clist_modern/src/modern_clistmenus.cpp b/plugins/Clist_modern/src/modern_clistmenus.cpp
index 24f14b2b03..a619d019a9 100644
--- a/plugins/Clist_modern/src/modern_clistmenus.cpp
+++ b/plugins/Clist_modern/src/modern_clistmenus.cpp
@@ -92,9 +92,9 @@ static IconItem iconList[] =
{ LPGEN("Contact rate High"), "Rate4", IDI_FAVORITE_3 }
};
-static int FAV_OnContactMenuBuild(WPARAM wParam, LPARAM lParam)
+static int FAV_OnContactMenuBuild(WPARAM hContact, LPARAM lParam)
{
- BYTE bContactRate = db_get_b(wParam, "CList", "Rate", 0);
+ BYTE bContactRate = db_get_b(hContact, "CList", "Rate", 0);
if ( bContactRate > SIZEOF(rates)-1)
bContactRate = SIZEOF(rates)-1;
@@ -149,7 +149,7 @@ static int FAV_OnContactMenuBuild(WPARAM wParam, LPARAM lParam)
mi.hIcon = NULL;
mi.ptszName = LPGENT("Show even if offline");
- mi.flags = CMIF_CHILDPOPUP | CMIF_TCHAR | (db_get_b(wParam, "CList", "noOffline", 0) ? CMIF_CHECKED : 0);
+ mi.flags = CMIF_CHILDPOPUP | CMIF_TCHAR | (db_get_b(hContact, "CList", "noOffline", 0) ? CMIF_CHECKED : 0);
mi.pszService = CLUI_FAVTOGGLESHOWOFFLINE;
mi.popupPosition = i+100000000;
mi.position = -100000000;
diff --git a/plugins/CountryFlags/src/extraimg.cpp b/plugins/CountryFlags/src/extraimg.cpp
index 1ada5a8372..d58e49de07 100644
--- a/plugins/CountryFlags/src/extraimg.cpp
+++ b/plugins/CountryFlags/src/extraimg.cpp
@@ -24,18 +24,18 @@ static HANDLE hServiceDetectContactOrigin;
/************************* Services *******************************/
-static INT_PTR ServiceDetectContactOriginCountry(WPARAM wParam,LPARAM lParam)
+static INT_PTR ServiceDetectContactOriginCountry(WPARAM hContact, LPARAM lParam)
{
int countryNumber = 0xFFFF;
- char *pszProto = GetContactProto(wParam);
+ char *pszProto = GetContactProto(hContact);
/* ip detect */
if (bUseIpToCountry)
- countryNumber = ServiceIpToCountry(db_get_dw(wParam,pszProto,"RealIP",0),0);
+ countryNumber = ServiceIpToCountry(db_get_dw(hContact, pszProto, "RealIP", 0), 0);
/* fallback */
if (countryNumber == 0xFFFF)
- countryNumber = db_get_w(wParam,pszProto,"Country",0);
+ countryNumber = db_get_w(hContact, pszProto, "Country", 0);
if (countryNumber == 0 || countryNumber == 0xFFFF)
- countryNumber = db_get_w(wParam,pszProto,"CompanyCountry",0);
+ countryNumber = db_get_w(hContact, pszProto, "CompanyCountry", 0);
return (countryNumber == 0) ? 0xFFFF : countryNumber;
}
diff --git a/plugins/MirandaG15/src/CAppletManager.cpp b/plugins/MirandaG15/src/CAppletManager.cpp
index 483c31652a..aa72b89af8 100644
--- a/plugins/MirandaG15/src/CAppletManager.cpp
+++ b/plugins/MirandaG15/src/CAppletManager.cpp
@@ -1849,38 +1849,29 @@ int CAppletManager::HookContactDeleted(WPARAM wParam, LPARAM lParam)
//************************************************************************
// setting changed hook function
//************************************************************************
-int CAppletManager::HookSettingChanged(WPARAM wParam,LPARAM lParam)
+int CAppletManager::HookSettingChanged(WPARAM hContact,LPARAM lParam)
{
DBCONTACTWRITESETTING *dbcws = (DBCONTACTWRITESETTING*)lParam;
CEvent Event;
- Event.hContact = wParam;
+ Event.hContact = hContact;
- if(!lstrcmpA(dbcws->szModule,"MetaContacts"))
- {
- //if(!lstrcmpA(dbcws->szSetting,"Enabled")) {
- // CAppletManager::GetInstance()->OnConfigChanged();
- // return 0;
- //} else
+ if(!lstrcmpA(dbcws->szModule,"MetaContacts")) {
if(!lstrcmpA(dbcws->szSetting,"IsSubcontact")) {
Event.eType = EVENT_CONTACT_GROUP;
DBVARIANT dbv;
- int res = db_get_ts(wParam, "CList", "Group", &dbv);
+ int res = db_get_ts(hContact, "CList", "Group", &dbv);
if(!res)
Event.strValue = dbv.ptszVal;
db_free(&dbv);
- } else {
- return 0;
}
+ else return 0;
}
- else if(!lstrcmpA(dbcws->szSetting,"Nick") || !lstrcmpA(dbcws->szSetting,"MyHandle"))
- {
+ else if(!lstrcmpA(dbcws->szSetting,"Nick") || !lstrcmpA(dbcws->szSetting,"MyHandle")) {
DBVARIANT dbv={0};
// if the protocol nick has changed, check if a custom handle is set
- if(!lstrcmpA(dbcws->szSetting,"Nick"))
- {
- if (!db_get_ts(Event.hContact, "CList", "MyHandle", &dbv))
- {
+ if(!lstrcmpA(dbcws->szSetting,"Nick")) {
+ if (!db_get_ts(Event.hContact, "CList", "MyHandle", &dbv)) {
// handle found, ignore this event
if(dbv.pszVal && strlen(dbv.pszVal)>0)
return 0;
@@ -1889,15 +1880,13 @@ int CAppletManager::HookSettingChanged(WPARAM wParam,LPARAM lParam)
}
Event.eType = EVENT_CONTACT_NICK;
- if(dbcws->value.type != DBVT_DELETED && dbcws->value.pszVal && strlen(dbcws->value.pszVal)>0)
- {
+ if(dbcws->value.type != DBVT_DELETED && dbcws->value.pszVal && strlen(dbcws->value.pszVal)>0) {
if(dbcws->value.type == DBVT_UTF8)
Event.strValue = Utf8_Decode(dbcws->value.pszVal);
else
Event.strValue = toTstring(dbcws->value.pszVal);
}
- else
- {
+ else {
char *szProto = (char *) CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM)Event.hContact, 0);
if (db_get_ts(Event.hContact, szProto, "Nick", &dbv))
return 0;
@@ -1905,27 +1894,23 @@ int CAppletManager::HookSettingChanged(WPARAM wParam,LPARAM lParam)
db_free(&dbv);
}
}
- else if(!lstrcmpA(dbcws->szModule,"CList"))
- {
- if(!lstrcmpA(dbcws->szSetting,"Hidden"))
- {
+ else if(!lstrcmpA(dbcws->szModule,"CList")) {
+ if(!lstrcmpA(dbcws->szSetting,"Hidden")) {
Event.eType = EVENT_CONTACT_HIDDEN;
- Event.iValue = db_get_b(wParam,"CList","Hidden",0);
+ Event.iValue = db_get_b(hContact,"CList","Hidden",0);
}
- else if(!lstrcmpA(dbcws->szSetting,"Group"))
- {
+ else if(!lstrcmpA(dbcws->szSetting,"Group")) {
Event.eType = EVENT_CONTACT_GROUP;
DBVARIANT dbv;
- int res = db_get_ts(wParam, "CList", "Group", &dbv);
+ int res = db_get_ts(hContact, "CList", "Group", &dbv);
if(!res)
Event.strValue = dbv.ptszVal;
db_free(&dbv);
}
- else
- return 0;
+ else return 0;
}
- else
- return 0;
+ else return 0;
+
CAppletManager::GetInstance()->HandleEvent(&Event);
return 0;
-} \ No newline at end of file
+}
diff --git a/plugins/RecentContacts/src/RecentContacts.cpp b/plugins/RecentContacts/src/RecentContacts.cpp
index 46493dd74a..04ee5376fd 100644
--- a/plugins/RecentContacts/src/RecentContacts.cpp
+++ b/plugins/RecentContacts/src/RecentContacts.cpp
@@ -479,12 +479,12 @@ int OnMsgEvent(WPARAM wParam, LPARAM lParam)
return 0;
}
-static int OnPrebuildContactMenu (WPARAM wParam, LPARAM lParam)
+static int OnPrebuildContactMenu(WPARAM hContact, LPARAM lParam)
{
CLISTMENUITEM clmi = { sizeof(clmi) };
clmi.flags = CMIM_NAME | CMIF_TCHAR;
- if ( db_get_b(wParam, dbLastUC_ModuleName, dbLastUC_IgnoreContact, 0) == 0)
+ if (db_get_b(hContact, dbLastUC_ModuleName, dbLastUC_IgnoreContact, 0) == 0)
clmi.ptszName = TranslateT("Ignore Contact");
else
clmi.ptszName = TranslateT("Show Contact");
@@ -500,15 +500,13 @@ int OnModulesLoaded(WPARAM wParam, LPARAM lParam)
LoadDBSettings();
// hotkeys
- HOTKEYDESC hk = {0};
- hk.cbSize = sizeof(hk);
+ HOTKEYDESC hk = { sizeof(hk) };
hk.pszName = msLastUC_ShowList;
hk.pszDescription = LPGEN("Show Recent Contacts");
hk.pszSection = "Contacts";
hk.pszService = msLastUC_ShowList;
hk.DefHotKey = MAKEWORD('R', HOTKEYF_CONTROL | HOTKEYF_SHIFT);
Hotkey_Register(&hk);
-
return 0;
}
diff --git a/plugins/SimpleStatusMsg/src/awaymsg.cpp b/plugins/SimpleStatusMsg/src/awaymsg.cpp
index f0ff0661f4..af2562aff3 100644
--- a/plugins/SimpleStatusMsg/src/awaymsg.cpp
+++ b/plugins/SimpleStatusMsg/src/awaymsg.cpp
@@ -351,11 +351,11 @@ static INT_PTR GoToURLMsgCommand(WPARAM wParam, LPARAM lParam)
return 0;
}
-static int AwayMsgPreBuildMenu(WPARAM wParam, LPARAM lParam)
+static int AwayMsgPreBuildMenu(WPARAM hContact, LPARAM lParam)
{
TCHAR str[128];
- char *szProto = GetContactProto(wParam);
- int iHidden = szProto ? db_get_b(wParam, szProto, "ChatRoom", 0) : 0;
+ char *szProto = GetContactProto(hContact);
+ int iHidden = szProto ? db_get_b(hContact, szProto, "ChatRoom", 0) : 0;
int iStatus;
CLISTMENUITEM clmi = { sizeof(clmi) };
@@ -363,7 +363,7 @@ static int AwayMsgPreBuildMenu(WPARAM wParam, LPARAM lParam)
clmi.flags = CMIM_FLAGS | CMIF_HIDDEN | CMIF_TCHAR;
if (!iHidden) {
iHidden = 1;
- iStatus = db_get_w(wParam, szProto, "Status", ID_STATUS_OFFLINE);
+ iStatus = db_get_w(hContact, szProto, "Status", ID_STATUS_OFFLINE);
if (CallProtoService(szProto, PS_GETCAPS, PFLAGNUM_1,0) & PF1_MODEMSGRECV) {
if (CallProtoService(szProto, PS_GETCAPS, PFLAGNUM_3,0) & Proto_Status2Flag(iStatus == ID_STATUS_OFFLINE ? ID_STATUS_INVISIBLE : iStatus)) {
iHidden = 0;
@@ -377,7 +377,7 @@ static int AwayMsgPreBuildMenu(WPARAM wParam, LPARAM lParam)
Menu_ModifyItem(hAwayMsgMenuItem, &clmi);
Skin_ReleaseIcon(clmi.hIcon);
- ptrA szMsg(db_get_sa(wParam, "CList", "StatusMsg"));
+ ptrA szMsg(db_get_sa(hContact, "CList", "StatusMsg"));
clmi.flags = CMIM_FLAGS | CMIF_HIDDEN | CMIF_TCHAR;
if (!iHidden && szMsg != NULL) {
diff --git a/plugins/UserInfoEx/src/svc_refreshci.cpp b/plugins/UserInfoEx/src/svc_refreshci.cpp
index 31195555a1..ebbcb09d65 100644
--- a/plugins/UserInfoEx/src/svc_refreshci.cpp
+++ b/plugins/UserInfoEx/src/svc_refreshci.cpp
@@ -836,17 +836,17 @@ static INT_PTR RefreshService(WPARAM wParam, LPARAM lParam)
*
*
**/
-static int OnContactAdded(WPARAM wParam, LPARAM lParam)
+static int OnContactAdded(WPARAM hContact, LPARAM lParam)
{
try
{
- DWORD dwStmp = db_get_dw(wParam, USERINFO, SET_CONTACT_ADDEDTIME, 0);
+ DWORD dwStmp = db_get_dw(hContact, USERINFO, SET_CONTACT_ADDEDTIME, 0);
if (!dwStmp)
{
MTime mt;
mt.GetLocalTime();
- mt.DBWriteStamp(wParam, USERINFO, SET_CONTACT_ADDEDTIME);
+ mt.DBWriteStamp(hContact, USERINFO, SET_CONTACT_ADDEDTIME);
// create updater, if not yet exists
if (!ContactUpdater)
@@ -858,7 +858,7 @@ static int OnContactAdded(WPARAM wParam, LPARAM lParam)
ContactUpdater->AddIfDontHave(
(ContactUpdater->Size() > 0)
? max(ContactUpdater->Get(ContactUpdater->Size() - 1)->check_time + 15000, 4000)
- : 4000, wParam);
+ : 4000, hContact);
}
}
catch(...)
diff --git a/plugins/Weather/src/weather_popup.cpp b/plugins/Weather/src/weather_popup.cpp
index 24b5b8cc1f..47f80c3eb5 100644
--- a/plugins/Weather/src/weather_popup.cpp
+++ b/plugins/Weather/src/weather_popup.cpp
@@ -32,17 +32,17 @@ static HANDLE hPopupContact;
// display weather popups
// wParam = the contact to display popup
// lParam = whether the weather data is changed or not
-int WeatherPopup(WPARAM wParam, LPARAM lParam)
+int WeatherPopup(WPARAM hContact, LPARAM lParam)
{
// determine if the popup should display or not
if (opt.UsePopup && opt.UpdatePopup && (!opt.PopupOnChange || (BOOL)lParam) &&
- !db_get_b(wParam, WEATHERPROTONAME, "DPopUp", 0))
+ !db_get_b(hContact, WEATHERPROTONAME, "DPopUp", 0))
{
- WEATHERINFO winfo = LoadWeatherInfo(wParam);
+ WEATHERINFO winfo = LoadWeatherInfo(hContact);
// setup the popup
POPUPDATAT ppd = { 0 };
- ppd.lchContact = wParam;
+ ppd.lchContact = hContact;
ppd.PluginData = ppd.lchIcon = LoadSkinnedProtoIcon(WEATHERPROTONAME, winfo.status);
GetDisplay(&winfo, opt.pTitle, ppd.lptzContactName);
GetDisplay(&winfo, opt.pText, ppd.lptzText);
diff --git a/plugins/WebView/src/webview_alerts.cpp b/plugins/WebView/src/webview_alerts.cpp
index 21c6037a62..21062d72bb 100644
--- a/plugins/WebView/src/webview_alerts.cpp
+++ b/plugins/WebView/src/webview_alerts.cpp
@@ -153,12 +153,12 @@ int WPopupAlert(WPARAM wParam, LPARAM lParam)
}
/*****************************************************************************/
-int PopupAlert(WPARAM wParam, LPARAM lParam)
+int PopupAlert(WPARAM hContact, LPARAM lParam)
{
POPUPDATA ppd = { 0 };
- if (((HANDLE)wParam) != NULL) {
+ if (hContact != NULL) {
DBVARIANT dbv;
- if ( !db_get_s(wParam, MODULENAME, PRESERVE_NAME_KEY, &dbv)) {
+ if (!db_get_s(hContact, MODULENAME, PRESERVE_NAME_KEY, &dbv)) {
lstrcpynA(ppd.lptzContactName, dbv.pszVal, SIZEOF(ppd.lptzContactName));
db_free(&dbv);
}
@@ -166,7 +166,7 @@ int PopupAlert(WPARAM wParam, LPARAM lParam)
if (ppd.lptzContactName[0] == 0)
strncpy_s(ppd.lptzContactName, SIZEOF(ppd.lptzContactName), MODULENAME, _TRUNCATE);
- ppd.lchContact = wParam;
+ ppd.lchContact = hContact;
ppd.lchIcon = LoadIcon(hInst, MAKEINTRESOURCE(IDI_SITE));
char *displaytext = (char*)lParam;
@@ -198,14 +198,14 @@ int PopupAlert(WPARAM wParam, LPARAM lParam)
}
/*****************************************************************************/
-int OSDAlert(WPARAM wParam, LPARAM lParam)
+int OSDAlert(WPARAM hContact, LPARAM lParam)
{
char contactname[255], newdisplaytext[2000];
contactname[0] = 0;
- if (((HANDLE)wParam) != NULL) {
+ if (hContact != NULL) {
DBVARIANT dbv;
- if ( !db_get_s(wParam, MODULENAME, PRESERVE_NAME_KEY, &dbv)) {
+ if (!db_get_s(hContact, MODULENAME, PRESERVE_NAME_KEY, &dbv)) {
strncpy_s(contactname, SIZEOF(contactname), dbv.pszVal, _TRUNCATE);
db_free(&dbv);
}
@@ -228,7 +228,7 @@ int ErrorMsgs(WPARAM wParam, LPARAM lParam)
MCONTACT hContact = wParam;
TCHAR newdisplaytext[2000], *displaytext = (TCHAR*)lParam;
- if ( db_get_b(NULL, MODULENAME, SUPPRESS_ERR_KEY, 0))
+ if (db_get_b(NULL, MODULENAME, SUPPRESS_ERR_KEY, 0))
return 0;
TCHAR *ptszContactName = pcli->pfnGetContactDisplayName(hContact, 0);
@@ -264,7 +264,7 @@ void SaveToFile(MCONTACT hContact, char *truncated)
char url[300]; url[0] = '\0';
DBVARIANT dbv;
- if ( !db_get_s(hContact, MODULENAME, URL_KEY, &dbv)) {
+ if (!db_get_s(hContact, MODULENAME, URL_KEY, &dbv)) {
strncpy_s(url, SIZEOF(url), dbv.pszVal, _TRUNCATE);
db_free(&dbv);
}
@@ -327,10 +327,10 @@ int ProcessAlerts(MCONTACT hContact, char *truncated, char *tstr, char *contactn
ZeroMemory(&cachecompare, sizeof(cachecompare));
// alerts
- if ( db_get_b(hContact, MODULENAME, ENABLE_ALERTS_KEY, 0)) { // ALERTS
+ if (db_get_b(hContact, MODULENAME, ENABLE_ALERTS_KEY, 0)) { // ALERTS
alertIndex = db_get_b(hContact, MODULENAME, ALRT_INDEX_KEY, 0);
eventIndex = db_get_b(hContact, MODULENAME, EVNT_INDEX_KEY, 0);
- if ((notpresent)) {
+ if (notpresent) {
if (alertIndex == 0) { // Popup
Sleep(1000);
WAlertPopup(hContact, TranslateT("Start/end strings not found or strings not set."));
@@ -339,10 +339,10 @@ int ProcessAlerts(MCONTACT hContact, char *truncated, char *tstr, char *contactn
db_set_s(hContact, "CList", "MyHandle", tstr);
}
else if (alertIndex == 1) { // log to file
- if ( !db_get_s(hContact, MODULENAME, FILE_KEY, &tdbv)) {
+ if (!db_get_s(hContact, MODULENAME, FILE_KEY, &tdbv)) {
int AmountWspcRem = 0;
- if ( !db_get_b(hContact, MODULENAME, SAVE_AS_RAW_KEY, 0)) {
+ if (!db_get_b(hContact, MODULENAME, SAVE_AS_RAW_KEY, 0)) {
CodetoSymbol(tempraw);
Sleep(100); // avoid 100% CPU
@@ -374,7 +374,7 @@ int ProcessAlerts(MCONTACT hContact, char *truncated, char *tstr, char *contactn
}
else if (alertIndex == 3) {
WAlertOSD(hContact, TranslateT("Alert start/end strings not found or strings not set."));
- if ( db_get_b(hContact, MODULENAME, APND_DATE_NAME_KEY, 0))
+ if (db_get_b(hContact, MODULENAME, APND_DATE_NAME_KEY, 0))
db_set_s(hContact, "CList", "MyHandle", tstr);
}
else if (eventIndex == 2) {
@@ -391,7 +391,7 @@ int ProcessAlerts(MCONTACT hContact, char *truncated, char *tstr, char *contactn
}
if (eventIndex == 0) { // string present
- if ( !db_get_s(hContact, MODULENAME, ALERT_STRING_KEY, &tdbv)) {
+ if (!db_get_s(hContact, MODULENAME, ALERT_STRING_KEY, &tdbv)) {
strncpy_s(alertstring, SIZEOF(alertstring), tdbv.pszVal, _TRUNCATE);
db_free(&tdbv);
@@ -414,7 +414,7 @@ int ProcessAlerts(MCONTACT hContact, char *truncated, char *tstr, char *contactn
else if (alertIndex == 1) {
if (!db_get_s(hContact, MODULENAME, FILE_KEY, &tdbv)) {
int AmountWspcRem = 0;
- if ( !db_get_b(hContact, MODULENAME, SAVE_AS_RAW_KEY, 0)) {
+ if (!db_get_b(hContact, MODULENAME, SAVE_AS_RAW_KEY, 0)) {
CodetoSymbol(tempraw);
Sleep(100); // avoid 100% CPU
@@ -519,7 +519,7 @@ int ProcessAlerts(MCONTACT hContact, char *truncated, char *tstr, char *contactn
if (!db_get_s(hContact, MODULENAME, FILE_KEY, &tdbv)) {
int AmountWspcRem = 0;
- if ( !db_get_b(hContact, MODULENAME, SAVE_AS_RAW_KEY, 0)) {
+ if (!db_get_b(hContact, MODULENAME, SAVE_AS_RAW_KEY, 0)) {
CodetoSymbol(tempraw);
Sleep(100); // avoid 100% CPU
@@ -562,11 +562,11 @@ int ProcessAlerts(MCONTACT hContact, char *truncated, char *tstr, char *contactn
if (eventIndex == 2) { // part of webpage changed
Alerttempstring[0] = Alerttempstring2[0] = 0;
- if ( !db_get_s(hContact, MODULENAME, ALRT_S_STRING_KEY, &tdbv)) {
+ if (!db_get_s(hContact, MODULENAME, ALRT_S_STRING_KEY, &tdbv)) {
strncpy_s(Alerttempstring, SIZEOF(Alerttempstring), tdbv.pszVal, _TRUNCATE);
db_free(&tdbv);
}
- if ( !db_get_s(hContact, MODULENAME, ALRT_E_STRING_KEY, &tdbv)) {
+ if (!db_get_s(hContact, MODULENAME, ALRT_E_STRING_KEY, &tdbv)) {
strncpy_s(Alerttempstring2, SIZEOF(Alerttempstring2), tdbv.pszVal, _TRUNCATE);
db_free(&tdbv);
}
@@ -623,9 +623,9 @@ int ProcessAlerts(MCONTACT hContact, char *truncated, char *tstr, char *contactn
}
else if (alertIndex == 1) { // LOG
if (!notpresent) { // dont log to file twice if both types of start/end strings not present
- if ( !db_get_s(hContact, MODULENAME, FILE_KEY, &tdbv)) {
+ if (!db_get_s(hContact, MODULENAME, FILE_KEY, &tdbv)) {
int AmountWspcRem = 0;
- if ( !db_get_b(hContact, MODULENAME, SAVE_AS_RAW_KEY, 0)) {
+ if (!db_get_b(hContact, MODULENAME, SAVE_AS_RAW_KEY, 0)) {
CodetoSymbol(tempraw);
Sleep(100); // avoid 100% CPU
@@ -729,7 +729,7 @@ int ProcessAlerts(MCONTACT hContact, char *truncated, char *tstr, char *contactn
else if (alertIndex == 1) { // log to file
if (!db_get_s(hContact, MODULENAME, FILE_KEY, &tdbv)) {
int AmountWspcRem = 0;
- if ( !db_get_b(hContact, MODULENAME, SAVE_AS_RAW_KEY, 0)) {
+ if (!db_get_b(hContact, MODULENAME, SAVE_AS_RAW_KEY, 0)) {
CodetoSymbol(tempraw);
Sleep(100); // avoid 100% CPU
@@ -779,7 +779,7 @@ int ProcessAlerts(MCONTACT hContact, char *truncated, char *tstr, char *contactn
if (!db_get_s(hContact, MODULENAME, FILE_KEY, &tdbv)) {
int AmountWspcRem = 0;
- if ( !db_get_b(hContact, MODULENAME, SAVE_AS_RAW_KEY, 0)) {
+ if (!db_get_b(hContact, MODULENAME, SAVE_AS_RAW_KEY, 0)) {
CodetoSymbol(tempraw);
Sleep(100); // avoid 100% CPU
@@ -848,7 +848,7 @@ void ReadFromFile(void *param)
HWND hwndDlg = WindowList_Find(hWindowList, hContact);
char contactname[100]; contactname[0] = 0;
- if ( !db_get_s(hContact, "CList", "MyHandle", &dbv)) {
+ if (!db_get_s(hContact, "CList", "MyHandle", &dbv)) {
strncpy_s(contactname, SIZEOF(contactname), dbv.pszVal, _TRUNCATE);
db_free(&dbv);
}
diff --git a/plugins/WebView/src/webview_datawnd.cpp b/plugins/WebView/src/webview_datawnd.cpp
index e9d7ae144c..e928b21d6a 100644
--- a/plugins/WebView/src/webview_datawnd.cpp
+++ b/plugins/WebView/src/webview_datawnd.cpp
@@ -132,7 +132,7 @@ static MCONTACT FindContactByUrl(HWND hwndDlg)
ptrT db1( db_get_tsa(hContact, MODULENAME, URL_KEY));
ptrT db2( db_get_tsa(hContact, MODULENAME, PRESERVE_NAME_KEY));
- if ( !lstrcmp(urltext, db1) && !lstrcmp(titlebartxt, db2)) {
+ if (!lstrcmp(urltext, db1) && !lstrcmp(titlebartxt, db2)) {
contactcount++;
if (contactcount > 1) {
MessageBox(NULL, TranslateT("ERROR: You have two or more Webview contacts with the same URL and contact name."), _T(MODULENAME), MB_OK);
@@ -161,14 +161,14 @@ INT_PTR CALLBACK DlgProcDisplayData(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA
WindowList_Add(hWindowList, hwndDlg, hContact2);
url[0] = '\0';
- if ( !db_get_ts(hContact2, MODULENAME, URL_KEY, &dbv)) {
+ if (!db_get_ts(hContact2, MODULENAME, URL_KEY, &dbv)) {
_tcsncpy_s(url, SIZEOF(url), dbv.ptszVal, _TRUNCATE);
db_free(&dbv);
}
SetDlgItemText(hwndDlg, IDC_OPEN_URL, FixButtonText(url, SIZEOF(url)));
char preservename[100];
- if ( !db_get_s(hContact2, MODULENAME, PRESERVE_NAME_KEY, &dbv)) {
+ if (!db_get_s(hContact2, MODULENAME, PRESERVE_NAME_KEY, &dbv)) {
strncpy_s(preservename, SIZEOF(preservename), dbv.pszVal, _TRUNCATE);
db_free(&dbv);
}
@@ -199,7 +199,7 @@ INT_PTR CALLBACK DlgProcDisplayData(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA
SendDlgItemMessage(hwndDlg, IDC_OPEN_URL, BUTTONADDTOOLTIP, (WPARAM) TranslateT("Click here to open this URL in a browser window."), BATF_TCHAR);
- if ( !db_get_b(hContact2, MODULENAME, ON_TOP_KEY, 0)) {
+ if (!db_get_b(hContact2, MODULENAME, ON_TOP_KEY, 0)) {
SendDlgItemMessage(hwndDlg, IDC_STICK_BUTTON, BM_SETIMAGE, IMAGE_ICON, (LPARAM) LoadImage(hInst, MAKEINTRESOURCE(IDI_UNSTICK), IMAGE_ICON, GetSystemMetrics(SM_CXSMICON), GetSystemMetrics(SM_CYSMICON), 0));
SendDlgItemMessage(hwndDlg, IDC_STICK_BUTTON, BUTTONADDTOOLTIP, (WPARAM) TranslateT("Stick to the front"), BATF_TCHAR);
}
@@ -360,7 +360,7 @@ INT_PTR CALLBACK DlgProcDisplayData(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA
{
TCHAR *ptszToolTip;
HWND hTopmost;
- if ( !db_get_b(hContact, MODULENAME, ON_TOP_KEY, 0)) {
+ if (!db_get_b(hContact, MODULENAME, ON_TOP_KEY, 0)) {
hTopmost = HWND_NOTOPMOST;
ptszToolTip = TranslateT("Stick to the front");
}
@@ -452,7 +452,7 @@ INT_PTR CALLBACK DlgProcDisplayData(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA
break;
case WM_MOVE:
- if ( !IsIconic(hwndDlg) && !IsZoomed(hwndDlg)) {
+ if (!IsIconic(hwndDlg) && !IsZoomed(hwndDlg)) {
GetWindowRect(hwndDlg, &rc);
// global
Xposition = rc.left;
diff --git a/plugins/WebView/src/webview_getdata.cpp b/plugins/WebView/src/webview_getdata.cpp
index 0c885b9012..eef98ee250 100644
--- a/plugins/WebView/src/webview_getdata.cpp
+++ b/plugins/WebView/src/webview_getdata.cpp
@@ -72,13 +72,13 @@ void GetData(void *param)
db_set_b(hContact, MODULENAME, STOP_KEY, 0);
if (db_get_s(hContact, MODULENAME, PRESERVE_NAME_KEY, &dbv)) {
- if ( !db_get_s(hContact, "CList", "MyHandle", &dbv)) {
+ if (!db_get_s(hContact, "CList", "MyHandle", &dbv)) {
db_set_s(hContact, MODULENAME, PRESERVE_NAME_KEY, dbv.pszVal);
db_free(&dbv);
}
}
- if ( !db_get_s(hContact, MODULENAME, PRESERVE_NAME_KEY, &dbv)) {
+ if (!db_get_s(hContact, MODULENAME, PRESERVE_NAME_KEY, &dbv)) {
strncpy_s(contactname, SIZEOF(contactname), dbv.pszVal, _TRUNCATE);
db_free(&dbv);
}
@@ -88,17 +88,17 @@ void GetData(void *param)
if (!Startingup)
db_set_b(NULL, MODULENAME, HAS_CRASHED_KEY, 1);
- if ( !db_get_s(hContact, MODULENAME, START_STRING_KEY, &dbv)) {
+ if (!db_get_s(hContact, MODULENAME, START_STRING_KEY, &dbv)) {
strncpy_s(tempstring, SIZEOF(tempstring), dbv.pszVal, _TRUNCATE);
db_free(&dbv);
}
- if ( !db_get_s(hContact, MODULENAME, END_STRING_KEY, &dbv)) {
+ if (!db_get_s(hContact, MODULENAME, END_STRING_KEY, &dbv)) {
strncpy_s(tempstring2, SIZEOF(tempstring2), dbv.pszVal, _TRUNCATE);
db_free(&dbv);
}
- if ( !db_get_s(hContact, MODULENAME, URL_KEY, &dbv)) {
+ if (!db_get_s(hContact, MODULENAME, URL_KEY, &dbv)) {
strncpy_s(url, SIZEOF(url), dbv.pszVal, _TRUNCATE);
db_free(&dbv);
}
@@ -349,11 +349,11 @@ void GetData(void *param)
strncpy(buff, truncated, SIZEOF(buff));
Filter(buff);
- if ( !db_get_s(hContact, MODULENAME, ALRT_S_STRING_KEY, &dbv)) {
+ if (!db_get_s(hContact, MODULENAME, ALRT_S_STRING_KEY, &dbv)) {
strncpy_s(Alerttempstring, SIZEOF(Alerttempstring), dbv.pszVal, _TRUNCATE);
db_free(&dbv);
}
- if ( !db_get_s(hContact, MODULENAME, ALRT_E_STRING_KEY, &dbv)) {
+ if (!db_get_s(hContact, MODULENAME, ALRT_E_STRING_KEY, &dbv)) {
strncpy_s(Alerttempstring2, SIZEOF(Alerttempstring2), dbv.pszVal, _TRUNCATE);
db_free(&dbv);
}
diff --git a/plugins/WebView/src/webview_opts.cpp b/plugins/WebView/src/webview_opts.cpp
index 14f776003b..fe02eb5d21 100644
--- a/plugins/WebView/src/webview_opts.cpp
+++ b/plugins/WebView/src/webview_opts.cpp
@@ -424,7 +424,7 @@ INT_PTR CALLBACK DlgProcAlertOpt(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM l
}
}
- if ( !db_get_ts(hContact, MODULENAME, FILE_KEY, &dbv)) {
+ if (!db_get_ts(hContact, MODULENAME, FILE_KEY, &dbv)) {
SetDlgItemText(hwndDlg, IDC_FILENAME, dbv.ptszVal);
db_free(&dbv);
}
diff --git a/plugins/XSoundNotify/src/xsn_main.cpp b/plugins/XSoundNotify/src/xsn_main.cpp
index 14c2f69c11..c53aaf2715 100644
--- a/plugins/XSoundNotify/src/xsn_main.cpp
+++ b/plugins/XSoundNotify/src/xsn_main.cpp
@@ -108,14 +108,14 @@ static bool isReceiveMessage(HANDLE hDbEvent)
return !(((info.eventType != EVENTTYPE_MESSAGE) && !(info.flags & DBEF_READ)) || (info.flags & DBEF_SENT));
}
-static int ProcessEvent(WPARAM wParam, LPARAM lParam)
+static int ProcessEvent(WPARAM hContact, LPARAM lParam)
{
if (!isReceiveMessage(HANDLE(lParam)))
return 0;
- isIgnoreSound = db_get_b(wParam, SETTINGSNAME, SETTINGSIGNOREKEY, 0);
+ isIgnoreSound = db_get_b(hContact, SETTINGSNAME, SETTINGSIGNOREKEY, 0);
DBVARIANT dbv;
- if ( !isIgnoreSound && !db_get_ts(wParam, SETTINGSNAME, SETTINGSKEY, &dbv)) {
+ if (!isIgnoreSound && !db_get_ts(hContact, SETTINGSNAME, SETTINGSKEY, &dbv)) {
TCHAR PlaySoundPath[MAX_PATH] = {0};
PathToAbsoluteT(dbv.ptszVal, PlaySoundPath);
SkinPlaySoundFile(PlaySoundPath);