diff options
author | Robert Pösel <robyer@seznam.cz> | 2014-07-09 10:09:57 +0000 |
---|---|---|
committer | Robert Pösel <robyer@seznam.cz> | 2014-07-09 10:09:57 +0000 |
commit | b09f3e627ec0d410fa974074177c44c6b98e6d14 (patch) | |
tree | 690d76d37215e83796f9d4371b75c641bf89a8d1 /protocols/FacebookRM/src/proto.cpp | |
parent | dd23a58ed2e260044c9e6f5a7585c368dfe425f8 (diff) |
Facebook: Add hotkeys for "visit profile" and "visit notifications" (someone requested)
git-svn-id: http://svn.miranda-ng.org/main/trunk@9743 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/FacebookRM/src/proto.cpp')
-rw-r--r-- | protocols/FacebookRM/src/proto.cpp | 43 |
1 files changed, 28 insertions, 15 deletions
diff --git a/protocols/FacebookRM/src/proto.cpp b/protocols/FacebookRM/src/proto.cpp index 54cd7f0b10..800ca39d8e 100644 --- a/protocols/FacebookRM/src/proto.cpp +++ b/protocols/FacebookRM/src/proto.cpp @@ -37,17 +37,19 @@ FacebookProto::FacebookProto(const char* proto_name,const TCHAR* username) : m_invisible = false; - CreateProtoService(PS_CREATEACCMGRUI, &FacebookProto::SvcCreateAccMgrUI); - CreateProtoService(PS_GETMYAWAYMSG, &FacebookProto::GetMyAwayMsg); - CreateProtoService(PS_GETMYAVATART, &FacebookProto::GetMyAvatar); - CreateProtoService(PS_GETAVATARINFOT, &FacebookProto::GetAvatarInfo); - CreateProtoService(PS_GETAVATARCAPS, &FacebookProto::GetAvatarCaps); - CreateProtoService(PS_GETUNREADEMAILCOUNT, &FacebookProto::GetNotificationsCount); + CreateProtoService(PS_CREATEACCMGRUI, &FacebookProto::SvcCreateAccMgrUI); + CreateProtoService(PS_GETMYAWAYMSG, &FacebookProto::GetMyAwayMsg); + CreateProtoService(PS_GETMYAVATART, &FacebookProto::GetMyAvatar); + CreateProtoService(PS_GETAVATARINFOT, &FacebookProto::GetAvatarInfo); + CreateProtoService(PS_GETAVATARCAPS, &FacebookProto::GetAvatarCaps); + CreateProtoService(PS_GETUNREADEMAILCOUNT, &FacebookProto::GetNotificationsCount); - CreateProtoService(PS_JOINCHAT, &FacebookProto::OnJoinChat); - CreateProtoService(PS_LEAVECHAT, &FacebookProto::OnLeaveChat); + CreateProtoService(PS_JOINCHAT, &FacebookProto::OnJoinChat); + CreateProtoService(PS_LEAVECHAT, &FacebookProto::OnLeaveChat); - CreateProtoService("/Mind", &FacebookProto::OnMind); + CreateProtoService("/Mind", &FacebookProto::OnMind); + CreateProtoService("/VisitProfile", &FacebookProto::VisitProfile); + CreateProtoService("/VisitNotifications", &FacebookProto::VisitNotifications); HookProtoEvent(ME_CLIST_PREBUILDSTATUSMENU, &FacebookProto::OnBuildStatusMenu); HookProtoEvent(ME_OPT_INITIALISE, &FacebookProto::OnOptionsInit); @@ -921,16 +923,27 @@ void FacebookProto::InitPopups() */ void FacebookProto::InitHotkeys() { - char module[512]; - mir_snprintf(module, sizeof(module), "%s/Mind", m_szModuleName); + char text[200]; + strcpy(text, m_szModuleName); + char* tDest = text + strlen(text); HOTKEYDESC hkd = { sizeof(hkd) }; + hkd.pszName = text; + hkd.pszService = text; + hkd.ptszSection = m_tszUserName; hkd.dwFlags = HKD_TCHAR; + + strcpy(tDest, "/VisitProfile"); + hkd.ptszDescription = LPGENT("Visit profile"); + Hotkey_Register(&hkd); + + strcpy(tDest, "/VisitNotifications"); + hkd.ptszDescription = LPGENT("Visit notifications"); + Hotkey_Register(&hkd); + + strcpy(tDest, "/Mind"); hkd.ptszDescription = LPGENT("Show 'Share status' window"); - hkd.pszName = "ShowMindWnd"; - hkd.ptszSection = m_tszUserName; - hkd.pszService = module; - hkd.DefHotKey = HOTKEYCODE(HOTKEYF_ALT|HOTKEYF_EXT, 'F'); + hkd.DefHotKey = HOTKEYCODE(HOTKEYF_ALT | HOTKEYF_EXT, 'F'); Hotkey_Register(&hkd); } |