diff options
author | George Hazan <george.hazan@gmail.com> | 2014-02-10 21:37:41 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2014-02-10 21:37:41 +0000 |
commit | ee68ac82d5aabb596e8bd0f2b9286827ca2ce545 (patch) | |
tree | 2b330d60da88d6c195ae1943ad93fe2b393469fd /plugins/SecureIM | |
parent | 6aff7a968c46f4080a24bd372c6ec1337766adf7 (diff) |
these conversions aren't needed either
git-svn-id: http://svn.miranda-ng.org/main/trunk@8088 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/SecureIM')
-rw-r--r-- | plugins/SecureIM/src/svcs_clist.cpp | 12 | ||||
-rw-r--r-- | plugins/SecureIM/src/svcs_menu.cpp | 58 | ||||
-rw-r--r-- | plugins/SecureIM/src/svcs_srmm.cpp | 2 |
3 files changed, 36 insertions, 36 deletions
diff --git a/plugins/SecureIM/src/svcs_clist.cpp b/plugins/SecureIM/src/svcs_clist.cpp index e7640d2477..7af74df185 100644 --- a/plugins/SecureIM/src/svcs_clist.cpp +++ b/plugins/SecureIM/src/svcs_clist.cpp @@ -3,7 +3,7 @@ int __cdecl onContactSettingChanged(WPARAM wParam,LPARAM lParam) {
- MCONTACT hContact = (MCONTACT)wParam;
+ MCONTACT hContact = wParam;
DBCONTACTWRITESETTING *cws=(DBCONTACTWRITESETTING*)lParam;
if (!hContact || strcmp(cws->szSetting,"Status")) return 0;
@@ -37,7 +37,7 @@ int __cdecl onContactSettingChanged(WPARAM wParam,LPARAM lParam) { // lParam=0
int __cdecl onContactAdded(WPARAM wParam,LPARAM lParam)
{
- addContact((MCONTACT)wParam);
+ addContact(wParam);
return 0;
}
@@ -46,7 +46,7 @@ int __cdecl onContactAdded(WPARAM wParam,LPARAM lParam) // lParam=0
int __cdecl onContactDeleted(WPARAM wParam,LPARAM lParam)
{
- delContact((MCONTACT)wParam);
+ delContact(wParam);
return 0;
}
@@ -59,15 +59,15 @@ int __cdecl onExtraImageListRebuilding(WPARAM, LPARAM) int __cdecl onExtraImageApplying(WPARAM wParam, LPARAM)
{
- if (isSecureProtocol((MCONTACT)wParam))
- ExtraIcon_SetIcon(g_hCLIcon, (MCONTACT)wParam, mode2clicon(isContactSecured((MCONTACT)wParam), 1));
+ if (isSecureProtocol(wParam))
+ ExtraIcon_SetIcon(g_hCLIcon, wParam, mode2clicon(isContactSecured(wParam), 1));
return 0;
}
int __cdecl onRebuildContactMenu(WPARAM wParam,LPARAM lParam)
{
- MCONTACT hContact = (MCONTACT)wParam;
+ MCONTACT hContact = wParam;
BOOL bMC = isProtoMetaContacts(hContact);
if (bMC ) hContact = getMostOnline(hContact); // возьмем тот, через который пойдет сообщение
pUinKey ptr = getUinKey(hContact);
diff --git a/plugins/SecureIM/src/svcs_menu.cpp b/plugins/SecureIM/src/svcs_menu.cpp index c50c7c7f09..ece52aa842 100644 --- a/plugins/SecureIM/src/svcs_menu.cpp +++ b/plugins/SecureIM/src/svcs_menu.cpp @@ -3,19 +3,19 @@ INT_PTR __cdecl Service_IsContactSecured(WPARAM wParam, LPARAM lParam)
{
- return (isContactSecured((MCONTACT)wParam)&SECURED) || isContactPGP((MCONTACT)wParam) || isContactGPG((MCONTACT)wParam);
+ return (isContactSecured(wParam)&SECURED) || isContactPGP(wParam) || isContactGPG(wParam);
}
INT_PTR __cdecl Service_CreateIM(WPARAM wParam,LPARAM lParam)
{
- CallContactService((MCONTACT)wParam, PSS_MESSAGE, PREF_METANODB, (LPARAM)SIG_INIT);
+ CallContactService(wParam, PSS_MESSAGE, PREF_METANODB, (LPARAM)SIG_INIT);
return 1;
}
INT_PTR __cdecl Service_DisableIM(WPARAM wParam,LPARAM lParam)
{
- CallContactService((MCONTACT)wParam, PSS_MESSAGE, PREF_METANODB, (LPARAM)SIG_DEIN);
+ CallContactService(wParam, PSS_MESSAGE, PREF_METANODB, (LPARAM)SIG_DEIN);
return 1;
}
@@ -25,7 +25,7 @@ INT_PTR __cdecl Service_Status(WPARAM wParam, LPARAM lParam) case STATUS_DISABLED:
case STATUS_ENABLED:
case STATUS_ALWAYSTRY:
- pUinKey ptr = getUinKey((MCONTACT)wParam);
+ pUinKey ptr = getUinKey(wParam);
if (ptr) {
ptr->status=ptr->tstatus=(BYTE)lParam;
if (ptr->status == STATUS_ENABLED) db_unset(ptr->hContact, MODULENAME, "StatusID");
@@ -55,15 +55,15 @@ INT_PTR __cdecl Service_StatusTry(WPARAM wParam, LPARAM lParam) INT_PTR __cdecl Service_PGPdelKey(WPARAM wParam, LPARAM lParam)
{
if (bPGPloaded) {
- db_unset((MCONTACT)wParam, MODULENAME, "pgp");
- db_unset((MCONTACT)wParam, MODULENAME, "pgp_mode");
- db_unset((MCONTACT)wParam, MODULENAME, "pgp_abbr");
+ db_unset(wParam, MODULENAME, "pgp");
+ db_unset(wParam, MODULENAME, "pgp_mode");
+ db_unset(wParam, MODULENAME, "pgp_abbr");
}
{
- pUinKey ptr = getUinKey((MCONTACT)wParam);
+ pUinKey ptr = getUinKey(wParam);
cpp_delete_context(ptr->cntx); ptr->cntx=0;
}
- ShowStatusIconNotify((MCONTACT)wParam);
+ ShowStatusIconNotify(wParam);
return 1;
}
@@ -75,10 +75,10 @@ INT_PTR __cdecl Service_PGPsetKey(WPARAM wParam, LPARAM lParam) char szKeyID[128]; szKeyID[0]='\0';
PVOID KeyID = pgp_select_keyid(GetForegroundWindow(),szKeyID);
if (szKeyID[0]) {
- db_unset((MCONTACT)wParam, MODULENAME, "pgp");
- db_set_blob((MCONTACT)wParam, MODULENAME, "pgp", KeyID, pgp_size_keyid());
- db_set_b((MCONTACT)wParam, MODULENAME, "pgp_mode", 0);
- db_set_s((MCONTACT)wParam, MODULENAME, "pgp_abbr", szKeyID);
+ db_unset(wParam, MODULENAME, "pgp");
+ db_set_blob(wParam, MODULENAME, "pgp", KeyID, pgp_size_keyid());
+ db_set_b(wParam, MODULENAME, "pgp_mode", 0);
+ db_set_s(wParam, MODULENAME, "pgp_abbr", szKeyID);
del = false;
}
}
@@ -87,10 +87,10 @@ INT_PTR __cdecl Service_PGPsetKey(WPARAM wParam, LPARAM lParam) if (ShowSelectKeyDlg(0,KeyPath)) {
char *publ = LoadKeys(KeyPath,false);
if (publ) {
- db_unset((MCONTACT)wParam, MODULENAME, "pgp");
- db_set_s((MCONTACT)wParam, MODULENAME, "pgp", publ);
- db_set_b((MCONTACT)wParam, MODULENAME, "pgp_mode", 1);
- db_set_s((MCONTACT)wParam, MODULENAME, "pgp_abbr", "(binary)");
+ db_unset(wParam, MODULENAME, "pgp");
+ db_set_s(wParam, MODULENAME, "pgp", publ);
+ db_set_b(wParam, MODULENAME, "pgp_mode", 1);
+ db_set_s(wParam, MODULENAME, "pgp_abbr", "(binary)");
mir_free(publ);
del = false;
}
@@ -101,22 +101,22 @@ INT_PTR __cdecl Service_PGPsetKey(WPARAM wParam, LPARAM lParam) if (del)
Service_PGPdelKey(wParam,lParam);
else {
- pUinKey ptr = getUinKey((MCONTACT)wParam);
+ pUinKey ptr = getUinKey(wParam);
cpp_delete_context(ptr->cntx); ptr->cntx=0;
}
- ShowStatusIconNotify((MCONTACT)wParam);
+ ShowStatusIconNotify(wParam);
return 1;
}
INT_PTR __cdecl Service_GPGdelKey(WPARAM wParam, LPARAM lParam)
{
if (bGPGloaded)
- db_unset((MCONTACT)wParam, MODULENAME, "gpg");
+ db_unset(wParam, MODULENAME, "gpg");
{
- pUinKey ptr = getUinKey((MCONTACT)wParam);
+ pUinKey ptr = getUinKey(wParam);
cpp_delete_context(ptr->cntx); ptr->cntx=0;
}
- ShowStatusIconNotify((MCONTACT)wParam);
+ ShowStatusIconNotify(wParam);
return 1;
}
@@ -127,28 +127,28 @@ INT_PTR __cdecl Service_GPGsetKey(WPARAM wParam, LPARAM lParam) char szKeyID[128]; szKeyID[0]='\0';
gpg_select_keyid(GetForegroundWindow(),szKeyID);
if (szKeyID[0]) {
- db_set_s((MCONTACT)wParam, MODULENAME, "gpg", szKeyID);
+ db_set_s(wParam, MODULENAME, "gpg", szKeyID);
del = false;
}
}
if (del) Service_GPGdelKey(wParam,lParam);
else {
- pUinKey ptr = getUinKey((MCONTACT)wParam);
+ pUinKey ptr = getUinKey(wParam);
cpp_delete_context(ptr->cntx); ptr->cntx=0;
}
- ShowStatusIconNotify((MCONTACT)wParam);
+ ShowStatusIconNotify(wParam);
return 1;
}
INT_PTR __cdecl Service_Mode(WPARAM wParam, LPARAM lParam)
{
- pUinKey ptr = getUinKey((MCONTACT)wParam);
+ pUinKey ptr = getUinKey(wParam);
switch(--lParam) {
case MODE_NATIVE:
case MODE_RSAAES:
- if (isContactSecured((MCONTACT)wParam)&SECURED) {
+ if (isContactSecured(wParam)&SECURED) {
msgbox(NULL, sim111, MODULENAME, MB_OK);
return 0;
}
@@ -165,9 +165,9 @@ INT_PTR __cdecl Service_Mode(WPARAM wParam, LPARAM lParam) ptr->keyLoaded = 0;
}
ptr->mode=(BYTE)lParam;
- db_set_b((MCONTACT)wParam, MODULENAME, "mode", (BYTE)lParam);
+ db_set_b(wParam, MODULENAME, "mode", (BYTE)lParam);
}
- ShowStatusIcon((MCONTACT)wParam);
+ ShowStatusIcon(wParam);
break;
}
diff --git a/plugins/SecureIM/src/svcs_srmm.cpp b/plugins/SecureIM/src/svcs_srmm.cpp index 9c2aa2c7f5..5abc86a7e1 100644 --- a/plugins/SecureIM/src/svcs_srmm.cpp +++ b/plugins/SecureIM/src/svcs_srmm.cpp @@ -11,7 +11,7 @@ int __cdecl onWindowEvent(WPARAM, LPARAM lParam) int __cdecl onIconPressed(WPARAM wParam, LPARAM lParam)
{
- MCONTACT hContact = (MCONTACT)wParam;
+ MCONTACT hContact = wParam;
if (isProtoMetaContacts(hContact))
hContact = getMostOnline(hContact); // возьмем тот, через который пойдет сообщение
|