diff options
author | George Hazan <george.hazan@gmail.com> | 2014-02-16 12:44:38 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2014-02-16 12:44:38 +0000 |
commit | 907116c051e995a6a593743c7a6dfdece747c2c0 (patch) | |
tree | 59d079cb818382ae09840da99e3be1b58abffff5 /plugins/AuthState/src | |
parent | bec34b3f632d179368f00b49e984ac576f14fad4 (diff) |
code cleaning
git-svn-id: http://svn.miranda-ng.org/main/trunk@8133 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/AuthState/src')
-rw-r--r-- | plugins/AuthState/src/main.cpp | 35 |
1 files changed, 17 insertions, 18 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) };
|