From b09f3e627ec0d410fa974074177c44c6b98e6d14 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20P=C3=B6sel?= Date: Wed, 9 Jul 2014 10:09:57 +0000 Subject: 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 --- protocols/FacebookRM/src/proto.cpp | 43 +++++++++++++++++++++++++------------- 1 file changed, 28 insertions(+), 15 deletions(-) (limited to 'protocols/FacebookRM/src/proto.cpp') 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); } -- cgit v1.2.3