diff options
-rw-r--r-- | plugins/SecureIM/src/main.cpp | 4 | ||||
-rw-r--r-- | plugins/SecureIM/src/svcs_clist.cpp | 18 | ||||
-rw-r--r-- | plugins/SecureIM/src/svcs_menu.cpp | 33 |
3 files changed, 29 insertions, 26 deletions
diff --git a/plugins/SecureIM/src/main.cpp b/plugins/SecureIM/src/main.cpp index 8fdd79d65d..77094f61f1 100644 --- a/plugins/SecureIM/src/main.cpp +++ b/plugins/SecureIM/src/main.cpp @@ -40,10 +40,10 @@ BOOL APIENTRY DllMain(HINSTANCE hInst, DWORD dwReason, LPVOID) static HGENMENU MyAddMenuItem(LPCWSTR name, int pos, HICON hicon, LPCSTR service, int flags = 0, WPARAM wParam = 0)
{
CMenuItem mi;
- mi.flags = flags | CMIF_HIDDEN;
+ mi.flags = flags | CMIF_HIDDEN | CMIF_UNICODE;
mi.position = pos;
mi.hIcolibItem = hicon;
- mi.name.a = (char*)name;
+ mi.name.t = (TCHAR*)name;
mi.pszService = (char*)service;
return Menu_AddContactMenuItem(&mi);
}
diff --git a/plugins/SecureIM/src/svcs_clist.cpp b/plugins/SecureIM/src/svcs_clist.cpp index 16ef2f9339..324fd5b7df 100644 --- a/plugins/SecureIM/src/svcs_clist.cpp +++ b/plugins/SecureIM/src/svcs_clist.cpp @@ -33,7 +33,7 @@ int __cdecl onContactSettingChanged(WPARAM hContact, LPARAM lParam) // wParam=(MCONTACT)hContact
// lParam=0
-int __cdecl onContactAdded(WPARAM wParam, LPARAM lParam)
+int __cdecl onContactAdded(WPARAM wParam, LPARAM)
{
addContact(wParam);
return 0;
@@ -42,7 +42,7 @@ int __cdecl onContactAdded(WPARAM wParam, LPARAM lParam) // wParam=(MCONTACT)hContact
// lParam=0
-int __cdecl onContactDeleted(WPARAM wParam, LPARAM lParam)
+int __cdecl onContactDeleted(WPARAM wParam, LPARAM)
{
delContact(wParam);
return 0;
@@ -63,7 +63,7 @@ int __cdecl onExtraImageApplying(WPARAM wParam, LPARAM) return 0;
}
-int __cdecl onRebuildContactMenu(WPARAM hContact, LPARAM lParam)
+int __cdecl onRebuildContactMenu(WPARAM hContact, LPARAM)
{
BOOL bMC = db_mc_isMeta(hContact);
if (bMC)
@@ -96,16 +96,16 @@ int __cdecl onRebuildContactMenu(WPARAM hContact, LPARAM lParam) // Native/RSAAES
if (!isSecured) // create secureim connection
- Menu_ModifyItem(g_hMenu[0], NULL, mode2icon(ptr->mode | SECURED, 2));
+ Menu_ModifyItem(g_hMenu[0], NULL, mode2icon(ptr->mode | SECURED, 2), 0);
else // disable secureim connection
- Menu_ModifyItem(g_hMenu[1], NULL, mode2icon(ptr->mode, 2));
+ Menu_ModifyItem(g_hMenu[1], NULL, mode2icon(ptr->mode, 2), 0);
// set status menu
if (bSCM && !bMC && (!isSecured || ptr->mode == MODE_PGP || ptr->mode == MODE_GPG)) {
- Menu_ModifyItem(g_hMenu[2], sim312[ptr->status], g_hICO[ICO_ST_DIS + ptr->status]);
+ Menu_ModifyItem(g_hMenu[2], sim312[ptr->status], g_hICO[ICO_ST_DIS + ptr->status], 0);
for (int i = 0; i <= (ptr->mode == MODE_RSAAES ? 1 : 2); i++)
- Menu_ModifyItem(g_hMenu[3 + i], NULL, (i == ptr->status) ? g_hICO[ICO_ST_DIS + ptr->status] : NULL);
+ Menu_ModifyItem(g_hMenu[3 + i], NULL, (i == ptr->status) ? g_hICO[ICO_ST_DIS + ptr->status] : NULL, 0);
}
}
else if (isSecureProto && !isChat && (ptr->mode == MODE_PGP || ptr->mode == MODE_GPG)) {
@@ -121,12 +121,12 @@ int __cdecl onRebuildContactMenu(WPARAM hContact, LPARAM lParam) if (isSecureProto && !isChat && isMiranda) {
// set mode menu
if (bMCM && !bMC && (!isSecured || ptr->mode == MODE_PGP || ptr->mode == MODE_GPG)) {
- Menu_ModifyItem(g_hMenu[10], sim311[ptr->mode], g_hICO[ICO_OV_NAT + ptr->mode]);
+ Menu_ModifyItem(g_hMenu[10], sim311[ptr->mode], g_hICO[ICO_OV_NAT + ptr->mode], 0);
for (int i = 0; i < MODE_CNT; i++) {
if (i == MODE_PGP && ptr->mode != MODE_PGP && !bPGP) continue;
if (i == MODE_GPG && ptr->mode != MODE_GPG && !bGPG) continue;
- Menu_ModifyItem(g_hMenu[11 + i], NULL, (i == ptr->mode) ? g_hICO[ICO_ST_ENA] : NULL);
+ Menu_ModifyItem(g_hMenu[11 + i], NULL, (i == ptr->mode) ? g_hICO[ICO_ST_ENA] : NULL, 0);
}
}
}
diff --git a/plugins/SecureIM/src/svcs_menu.cpp b/plugins/SecureIM/src/svcs_menu.cpp index c9432ba1a0..a5df00082b 100644 --- a/plugins/SecureIM/src/svcs_menu.cpp +++ b/plugins/SecureIM/src/svcs_menu.cpp @@ -1,17 +1,17 @@ #include "commonheaders.h"
-INT_PTR __cdecl Service_IsContactSecured(WPARAM wParam, LPARAM lParam)
+INT_PTR __cdecl Service_IsContactSecured(WPARAM wParam, LPARAM)
{
return (isContactSecured(wParam)&SECURED) || isContactPGP(wParam) || isContactGPG(wParam);
}
-INT_PTR __cdecl Service_CreateIM(WPARAM wParam, LPARAM lParam)
+INT_PTR __cdecl Service_CreateIM(WPARAM wParam, LPARAM)
{
CallContactService(wParam, PSS_MESSAGE, PREF_METANODB, (LPARAM)SIG_INIT);
return 1;
}
-INT_PTR __cdecl Service_DisableIM(WPARAM wParam, LPARAM lParam)
+INT_PTR __cdecl Service_DisableIM(WPARAM wParam, LPARAM)
{
CallContactService(wParam, PSS_MESSAGE, PREF_METANODB, (LPARAM)SIG_DEIN);
return 1;
@@ -26,8 +26,10 @@ INT_PTR __cdecl Service_Status(WPARAM wParam, LPARAM lParam) pUinKey ptr = getUinKey(wParam);
if (ptr) {
ptr->status = ptr->tstatus = (BYTE)lParam;
- if (ptr->status == STATUS_ENABLED) db_unset(ptr->hContact, MODULENAME, "StatusID");
- else db_set_b(ptr->hContact, MODULENAME, "StatusID", ptr->status);
+ if (ptr->status == STATUS_ENABLED)
+ db_unset(ptr->hContact, MODULENAME, "StatusID");
+ else
+ db_set_b(ptr->hContact, MODULENAME, "StatusID", ptr->status);
}
break;
}
@@ -35,22 +37,22 @@ INT_PTR __cdecl Service_Status(WPARAM wParam, LPARAM lParam) return 1;
}
-INT_PTR __cdecl Service_StatusDis(WPARAM wParam, LPARAM lParam)
+INT_PTR __cdecl Service_StatusDis(WPARAM wParam, LPARAM)
{
return Service_Status(wParam, STATUS_DISABLED + 1);
}
-INT_PTR __cdecl Service_StatusEna(WPARAM wParam, LPARAM lParam)
+INT_PTR __cdecl Service_StatusEna(WPARAM wParam, LPARAM)
{
return Service_Status(wParam, STATUS_ENABLED + 1);
}
-INT_PTR __cdecl Service_StatusTry(WPARAM wParam, LPARAM lParam)
+INT_PTR __cdecl Service_StatusTry(WPARAM wParam, LPARAM)
{
return Service_Status(wParam, STATUS_ALWAYSTRY + 1);
}
-INT_PTR __cdecl Service_PGPdelKey(WPARAM wParam, LPARAM lParam)
+INT_PTR __cdecl Service_PGPdelKey(WPARAM wParam, LPARAM)
{
if (bPGPloaded) {
db_unset(wParam, MODULENAME, "pgp");
@@ -106,7 +108,7 @@ INT_PTR __cdecl Service_PGPsetKey(WPARAM wParam, LPARAM lParam) return 1;
}
-INT_PTR __cdecl Service_GPGdelKey(WPARAM wParam, LPARAM lParam)
+INT_PTR __cdecl Service_GPGdelKey(WPARAM wParam, LPARAM)
{
if (bGPGloaded)
db_unset(wParam, MODULENAME, "gpg");
@@ -130,7 +132,8 @@ INT_PTR __cdecl Service_GPGsetKey(WPARAM wParam, LPARAM lParam) }
}
- if (del) Service_GPGdelKey(wParam, lParam);
+ if (del)
+ Service_GPGdelKey(wParam, lParam);
else {
pUinKey ptr = getUinKey(wParam);
cpp_delete_context(ptr->cntx); ptr->cntx = 0;
@@ -172,22 +175,22 @@ INT_PTR __cdecl Service_Mode(WPARAM wParam, LPARAM lParam) return 1;
}
-INT_PTR __cdecl Service_ModeNative(WPARAM wParam, LPARAM lParam)
+INT_PTR __cdecl Service_ModeNative(WPARAM wParam, LPARAM)
{
return Service_Mode(wParam, MODE_NATIVE + 1);
}
-INT_PTR __cdecl Service_ModePGP(WPARAM wParam, LPARAM lParam)
+INT_PTR __cdecl Service_ModePGP(WPARAM wParam, LPARAM)
{
return Service_Mode(wParam, MODE_PGP + 1);
}
-INT_PTR __cdecl Service_ModeGPG(WPARAM wParam, LPARAM lParam)
+INT_PTR __cdecl Service_ModeGPG(WPARAM wParam, LPARAM)
{
return Service_Mode(wParam, MODE_GPG + 1);
}
-INT_PTR __cdecl Service_ModeRSAAES(WPARAM wParam, LPARAM lParam)
+INT_PTR __cdecl Service_ModeRSAAES(WPARAM wParam, LPARAM)
{
return Service_Mode(wParam, MODE_RSAAES + 1);
}
|