summaryrefslogtreecommitdiff
path: root/protocols/FacebookRM/src/theme.cpp
diff options
context:
space:
mode:
authorRobert Pösel <robyer@seznam.cz>2016-08-31 10:11:26 +0000
committerRobert Pösel <robyer@seznam.cz>2016-08-31 10:11:26 +0000
commita5a6c8afb1d68330dc1e112ca9bdb0e38c435ad8 (patch)
tree4e46c9a32742d43b992e5ea00f5d6cf3e3594156 /protocols/FacebookRM/src/theme.cpp
parent052f82ecce5ebd44ea631bc0a8affb1864267301 (diff)
Facebook: Implement loading history from server (via contact menu)
git-svn-id: http://svn.miranda-ng.org/main/trunk@17220 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/FacebookRM/src/theme.cpp')
-rw-r--r--protocols/FacebookRM/src/theme.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/protocols/FacebookRM/src/theme.cpp b/protocols/FacebookRM/src/theme.cpp
index 70ca0eb696..8e7ae32cf7 100644
--- a/protocols/FacebookRM/src/theme.cpp
+++ b/protocols/FacebookRM/src/theme.cpp
@@ -35,6 +35,7 @@ HGENMENU g_hContactMenuAuthDeny;
HGENMENU g_hContactMenuPoke;
HGENMENU g_hContactMenuPostStatus;
HGENMENU g_hContactMenuVisitConversation;
+HGENMENU g_hContactMenuLoadHistory;
static IconItem icons[] =
{
@@ -104,6 +105,7 @@ static int PrebuildContactMenu(WPARAM wParam, LPARAM lParam)
Menu_ShowItem(g_hContactMenuPoke, false);
Menu_ShowItem(g_hContactMenuPostStatus, false);
Menu_ShowItem(g_hContactMenuVisitConversation, false);
+ Menu_ShowItem(g_hContactMenuLoadHistory, false);
// Process them in correct account
FacebookProto *proto = GetInstanceByHContact(MCONTACT(wParam));
@@ -156,6 +158,14 @@ void InitContactMenus()
CreateServiceFunction(mi.pszService, GlobalService<&FacebookProto::Poke>);
g_hContactMenuPoke = Menu_AddContactMenuItem(&mi);
+ SET_UID(mi, 0x58e75db0, 0xb9e0, 0x4aa8, 0xbb, 0x42, 0x8d, 0x7d, 0xd1, 0xf6, 0x8e, 0x99);
+ mi.position = -2000006005;
+ mi.hIcolibItem = GetIconHandle("conversation"); // TODO: Use better icon
+ mi.name.a = LPGEN("Load history");
+ mi.pszService = "FacebookProto/LoadHistory";
+ CreateServiceFunction(mi.pszService, GlobalService<&FacebookProto::LoadHistory>);
+ g_hContactMenuLoadHistory = Menu_AddContactMenuItem(&mi);
+
SET_UID(mi, 0x619efdcb, 0x99c0, 0x44a8, 0xbf, 0x28, 0xc3, 0xe0, 0x2f, 0xb3, 0x7e, 0x77);
mi.position = -2000006010;
mi.hIcolibItem = Skin_GetIconHandle(SKINICON_AUTH_REVOKE);
@@ -209,6 +219,7 @@ int FacebookProto::OnPrebuildContactMenu(WPARAM wParam, LPARAM)
Menu_ShowItem(g_hContactMenuVisitFriendship, !bIsChatroom && !bIsPage);
Menu_ShowItem(g_hContactMenuVisitConversation, true);
Menu_ShowItem(g_hContactMenuPostStatus, !bIsChatroom);
+ Menu_ShowItem(g_hContactMenuLoadHistory, !bIsChatroom);
if (!isOffline() && !bIsChatroom && !bIsPage)
{