diff options
author | Robert Pösel <robyer@seznam.cz> | 2012-06-10 21:18:00 +0000 |
---|---|---|
committer | Robert Pösel <robyer@seznam.cz> | 2012-06-10 21:18:00 +0000 |
commit | 4ad68f3d27feb1307e76c0cf25617a0bcf9de507 (patch) | |
tree | cbb938c4d502c6b4d6f30e5903a5c8e8a141b6b4 /protocols/FacebookRM/theme.cpp | |
parent | 2430d726d4585347c31c1a4b1c42023aa6d6ee8e (diff) |
FacebookRM sync
git-svn-id: http://svn.miranda-ng.org/main/trunk@385 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/FacebookRM/theme.cpp')
-rw-r--r-- | protocols/FacebookRM/theme.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/protocols/FacebookRM/theme.cpp b/protocols/FacebookRM/theme.cpp index 88e0ab5498..c6712c37ee 100644 --- a/protocols/FacebookRM/theme.cpp +++ b/protocols/FacebookRM/theme.cpp @@ -37,7 +37,7 @@ static const icons[] = { "mind", LPGEN("Mind"), IDI_MIND },
{ "authRevoke", LPGEN("Cancel friendship"), IDI_AUTH_REVOKE },
- //{ "authRevokeReq", LPGEN("Cancel friendship request"), IDI_AUTH_REVOKE },
+ { "authRevokeReq", LPGEN("Cancel friendship request"), IDI_AUTH_REVOKE },
{ "authAsk", LPGEN("Request friendship"), IDI_AUTH_ASK },
{ "authGrant", LPGEN("Approve friendship"), IDI_AUTH_GRANT },
@@ -118,11 +118,11 @@ static FacebookProto * GetInstanceByHContact(HANDLE hContact) {
char *proto = reinterpret_cast<char*>( CallService(MS_PROTO_GETCONTACTBASEPROTO,
reinterpret_cast<WPARAM>(hContact),0) );
- if (!proto)
+ if(!proto)
return 0;
for(int i=0; i<g_Instances.getCount(); i++)
- if (!strcmp(proto,g_Instances[i].m_szModuleName))
+ if(!strcmp(proto,g_Instances[i].m_szModuleName))
return &g_Instances[i];
return 0;
@@ -169,13 +169,13 @@ void InitContactMenus() g_hContactMenuItems[CMI_AUTH_REVOKE] = reinterpret_cast<HANDLE>(
CallService(MS_CLIST_ADDCONTACTMENUITEM,0,(LPARAM)&mi) );
- /* mi.position=-2000006001;
+ mi.position=-2000006001;
mi.icolibItem = GetIconHandle("authRevokeReq");
mi.pszName = GetIconDescription("authRevokeReq");
mi.pszService = "FacebookProto/CancelFriendshipRequest";
- g_hContactMenuSvc[CMI_AUTH_REVOKE_REQ] = CreateServiceFunction(mi.pszService,GlobalService<&FacebookProto::CancelFriendshipRequest>);
- g_hContactMenuItems[CMI_AUTH_REVOKE_REQ] = reinterpret_cast<HANDLE>(
- CallService(MS_CLIST_ADDCONTACTMENUITEM,0,(LPARAM)&mi) ); */
+ g_hContactMenuSvc[CMI_AUTH_CANCEL] = CreateServiceFunction(mi.pszService,GlobalService<&FacebookProto::OnCancelFriendshipRequest>);
+ g_hContactMenuItems[CMI_AUTH_CANCEL] = reinterpret_cast<HANDLE>(
+ CallService(MS_CLIST_ADDCONTACTMENUITEM,0,(LPARAM)&mi) );
mi.position=-2000006002;
mi.icolibItem = GetIconHandle("authAsk");
@@ -226,12 +226,12 @@ int FacebookProto::OnPrebuildContactMenu(WPARAM wParam,LPARAM lParam) {
bool ctrlPressed = (GetKeyState(VK_CONTROL) & 0x8000) != 0;
- BYTE type = DBGetContactSettingDword(hContact, m_szModuleName, FACEBOOK_KEY_CONTACT_TYPE, 0);
+ BYTE type = DBGetContactSettingByte(hContact, m_szModuleName, FACEBOOK_KEY_CONTACT_TYPE, 0);
EnableMenuItem(g_hContactMenuItems[CMI_AUTH_ASK], ctrlPressed || type == FACEBOOK_CONTACT_NONE || !type);
EnableMenuItem(g_hContactMenuItems[CMI_AUTH_GRANT], ctrlPressed || type == FACEBOOK_CONTACT_APPROVE);
EnableMenuItem(g_hContactMenuItems[CMI_AUTH_REVOKE], ctrlPressed || type == FACEBOOK_CONTACT_FRIEND);
- //EnableMenuItem(g_hContactMenuItems[CMI_AUTH_CANCEL], ctrlPressed || type == FACEBOOK_CONTACT_REQUEST);
+ EnableMenuItem(g_hContactMenuItems[CMI_AUTH_CANCEL], ctrlPressed || type == FACEBOOK_CONTACT_REQUEST);
}
return 0;
|