summaryrefslogtreecommitdiff
path: root/protocols/Skype/src/skype_menus.cpp
diff options
context:
space:
mode:
authorAlexander Lantsev <aunsane@gmail.com>2013-06-14 18:26:29 +0000
committerAlexander Lantsev <aunsane@gmail.com>2013-06-14 18:26:29 +0000
commit0043f79996b6bf582194fd45d42d86ca2816292f (patch)
tree083bb550630bc245210e8609e96e2bdec4a4bfc9 /protocols/Skype/src/skype_menus.cpp
parent19130f846c811022b5a765162f4a146f1362727d (diff)
Skype:
- fixed chat creating/removing - fixed chat inviting - fixed #367 git-svn-id: http://svn.miranda-ng.org/main/trunk@4945 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/Skype/src/skype_menus.cpp')
-rw-r--r--protocols/Skype/src/skype_menus.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/protocols/Skype/src/skype_menus.cpp b/protocols/Skype/src/skype_menus.cpp
index af4fbc783c..e47754fbb3 100644
--- a/protocols/Skype/src/skype_menus.cpp
+++ b/protocols/Skype/src/skype_menus.cpp
@@ -12,12 +12,12 @@ INT_PTR CSkypeProto::MenuChooseService(WPARAM wParam, LPARAM lParam)
return 0;
}
-void CSkypeProto::EnableMenuItem(HANDLE hMenuItem, BOOL bEnable)
+void CSkypeProto::ShowMenuItem(HANDLE hMenuItem, BOOL show)
{
CLISTMENUITEM clmi = {0};
clmi.cbSize = sizeof(CLISTMENUITEM);
clmi.flags = CMIM_FLAGS;
- if (!bEnable)
+ if (!show)
clmi.flags |= CMIF_HIDDEN;
::CallService(MS_CLIST_MODIFYMENUITEM, (WPARAM)hMenuItem, (LPARAM)&clmi);
@@ -37,9 +37,9 @@ int CSkypeProto::OnPrebuildContactMenu(WPARAM wParam, LPARAM)
bool authNeed = ::db_get_b(hContact, this->m_szModuleName, "Auth", 0) > 0;
bool grantNeed = ::db_get_b(hContact, this->m_szModuleName, "Grant", 0) > 0;
- CSkypeProto::EnableMenuItem(CSkypeProto::contactMenuItems[CMI_AUTH_REQUEST], ctrlPressed || authNeed);
- CSkypeProto::EnableMenuItem(CSkypeProto::contactMenuItems[CMI_AUTH_GRANT], ctrlPressed || grantNeed);
- CSkypeProto::EnableMenuItem(CSkypeProto::contactMenuItems[CMI_AUTH_REVOKE], ctrlPressed || (!grantNeed && !authNeed));
+ CSkypeProto::ShowMenuItem(CSkypeProto::contactMenuItems[CMI_AUTH_REQUEST], ctrlPressed || authNeed);
+ CSkypeProto::ShowMenuItem(CSkypeProto::contactMenuItems[CMI_AUTH_GRANT], ctrlPressed || grantNeed);
+ CSkypeProto::ShowMenuItem(CSkypeProto::contactMenuItems[CMI_AUTH_REVOKE], ctrlPressed || (!grantNeed && !authNeed));
}
return 0;
@@ -75,7 +75,7 @@ int CSkypeProto::GrantAuth(WPARAM wParam, LPARAM lParam)
{
CContact::Ref contact;
HANDLE hContact = (HANDLE)wParam;
- SEString sid(::mir_u2a(mir_ptr<wchar_t>(::db_get_wsa(hContact, this->m_szModuleName, SKYPE_SETTINGS_LOGIN))));
+ SEString sid(::mir_u2a(mir_ptr<wchar_t>(::db_get_wsa(hContact, this->m_szModuleName, SKYPE_SETTINGS_SID))));
if (this->GetContact(sid, contact))
{
if (contact->SetBuddyStatus(true))
@@ -92,7 +92,7 @@ int CSkypeProto::RevokeAuth(WPARAM wParam, LPARAM lParam)
{
CContact::Ref contact;
HANDLE hContact = (HANDLE)wParam;
- SEString sid(::mir_u2a(mir_ptr<wchar_t>(::db_get_wsa(hContact, this->m_szModuleName, SKYPE_SETTINGS_LOGIN))));
+ SEString sid(::mir_u2a(mir_ptr<wchar_t>(::db_get_wsa(hContact, this->m_szModuleName, SKYPE_SETTINGS_SID))));
if (this->GetContact(sid, contact))
{
if (contact->SetBuddyStatus(false))
@@ -115,7 +115,7 @@ INT_PTR CSkypeProto::InviteCommand(WPARAM, LPARAM)
int CSkypeProto::PrebuildContactMenu(WPARAM wParam, LPARAM lParam)
{
for (size_t i = 0; i < SIZEOF(CSkypeProto::contactMenuItems); i++)
- CSkypeProto::EnableMenuItem(CSkypeProto::contactMenuItems[i], false);
+ CSkypeProto::ShowMenuItem(CSkypeProto::contactMenuItems[i], false);
CSkypeProto* ppro = CSkypeProto::GetInstanceByHContact((HANDLE)wParam);
return (ppro) ? ppro->OnPrebuildContactMenu(wParam, lParam) : 0;