diff options
Diffstat (limited to 'plugins/SecureIM/src/svcs_menu.cpp')
-rw-r--r-- | plugins/SecureIM/src/svcs_menu.cpp | 58 |
1 files changed, 29 insertions, 29 deletions
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;
}
|