diff options
Diffstat (limited to 'protocols')
-rw-r--r-- | protocols/FacebookRM/src/main.cpp | 4 | ||||
-rw-r--r-- | protocols/FacebookRM/src/proto.cpp | 43 | ||||
-rw-r--r-- | protocols/FacebookRM/src/theme.cpp | 4 |
3 files changed, 30 insertions, 21 deletions
diff --git a/protocols/FacebookRM/src/main.cpp b/protocols/FacebookRM/src/main.cpp index ba2c9c0530..598dc2b5b9 100644 --- a/protocols/FacebookRM/src/main.cpp +++ b/protocols/FacebookRM/src/main.cpp @@ -87,8 +87,6 @@ static int protoUninit(PROTO_INTERFACE* proto) return EXIT_SUCCESS;
}
-static HANDLE g_hEvents[1];
-
extern "C" int __declspec(dllexport) Load(void)
{
mir_getLP(&pluginInfo);
@@ -126,8 +124,6 @@ extern "C" int __declspec(dllexport) Load(void) extern "C" int __declspec(dllexport) Unload(void)
{
UninitContactMenus();
- for(size_t i=0; i<SIZEOF(g_hEvents); i++)
- UnhookEvent(g_hEvents[i]);
return 0;
}
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); } diff --git a/protocols/FacebookRM/src/theme.cpp b/protocols/FacebookRM/src/theme.cpp index 88b9256e81..e6b67f6778 100644 --- a/protocols/FacebookRM/src/theme.cpp +++ b/protocols/FacebookRM/src/theme.cpp @@ -220,7 +220,7 @@ int FacebookProto::OnBuildStatusMenu(WPARAM wParam,LPARAM lParam) mi.icolibItem = GetIconHandle("mind");
m_hStatusMind = Menu_AddProtoMenuItem(&mi);
- CreateProtoService("/VisitProfile",&FacebookProto::VisitProfile);
+ //CreateProtoService("/VisitProfile",&FacebookProto::VisitProfile);
strcpy(tDest,"/VisitProfile");
mi.flags = CMIF_CHILDPOPUP;
mi.pszName = LPGEN("Visit profile");
@@ -228,7 +228,7 @@ int FacebookProto::OnBuildStatusMenu(WPARAM wParam,LPARAM lParam) // TODO RM: remember and properly free in destructor?
/*m_hStatusMind = */Menu_AddProtoMenuItem(&mi);
- CreateProtoService("/VisitNotifications", &FacebookProto::VisitNotifications);
+ //CreateProtoService("/VisitNotifications", &FacebookProto::VisitNotifications);
strcpy(tDest, "/VisitNotifications");
mi.pszName = LPGEN("Visit notifications");
mi.icolibItem = LoadSkinnedIconHandle(SKINICON_EVENT_URL);
|