From 90e99f1002599427b8373e6477073a9c8f5832c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20P=C3=B6sel?= Date: Sun, 9 Mar 2014 08:32:54 +0000 Subject: Facebook: Add contact menu item to open "Conversation history" on website git-svn-id: http://svn.miranda-ng.org/main/trunk@8488 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/FacebookRM/src/theme.cpp | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) (limited to 'protocols/FacebookRM/src/theme.cpp') diff --git a/protocols/FacebookRM/src/theme.cpp b/protocols/FacebookRM/src/theme.cpp index f9e60078ee..eb10c0d6a8 100644 --- a/protocols/FacebookRM/src/theme.cpp +++ b/protocols/FacebookRM/src/theme.cpp @@ -32,6 +32,7 @@ static IconItem icons[] = { LPGEN("Notification"), "notification", IDI_NOTIFICATION }, { LPGEN("Newsfeed"), "newsfeed", IDI_NEWSFEED }, { LPGEN("Friendship details"), "friendship", IDI_FRIENDS }, + { LPGEN("Conversation history"), "conversation", IDI_CONVERSATION }, }; // TODO: uninit @@ -101,14 +102,21 @@ void InitContactMenus() CreateServiceFunction(mi.pszService,GlobalService<&FacebookProto::VisitFriendship>); g_hContactMenuItems[CMI_VISIT_FRIENDSHIP] = Menu_AddContactMenuItem(&mi); - mi.position=-2000006001; + mi.position = -2000006002; + mi.icolibItem = GetIconHandle("conversation"); + mi.pszName = LPGEN("Visit conversation history"); + mi.pszService = "FacebookProto/VisitConversation"; + CreateServiceFunction(mi.pszService, GlobalService<&FacebookProto::VisitConversation>); + g_hContactMenuItems[CMI_VISIT_CONVERSATION] = Menu_AddContactMenuItem(&mi); + + mi.position=-2000006003; mi.icolibItem = GetIconHandle("mind"); mi.pszName = LPGEN("Share status..."); mi.pszService = "FacebookProto/Mind"; CreateServiceFunction(mi.pszService,GlobalService<&FacebookProto::OnMind>); g_hContactMenuItems[CMI_POST_STATUS] = Menu_AddContactMenuItem(&mi); - mi.position=-2000006002; + mi.position=-2000006004; mi.icolibItem = GetIconHandle("poke"); mi.pszName = LPGEN("Poke"); mi.pszService = "FacebookProto/Poke"; @@ -155,8 +163,9 @@ int FacebookProto::OnPrebuildContactMenu(WPARAM wParam,LPARAM lParam) MCONTACT hContact = MCONTACT(wParam); bool bIsChatroom = isChatRoom(hContact); - Menu_ShowItem(g_hContactMenuItems[CMI_VISIT_PROFILE], true); + Menu_ShowItem(g_hContactMenuItems[CMI_VISIT_PROFILE], !bIsChatroom); Menu_ShowItem(g_hContactMenuItems[CMI_VISIT_FRIENDSHIP], !bIsChatroom); + Menu_ShowItem(g_hContactMenuItems[CMI_VISIT_CONVERSATION], true); Menu_ShowItem(g_hContactMenuItems[CMI_POST_STATUS], !bIsChatroom); if (!isOffline() && !bIsChatroom) @@ -167,7 +176,7 @@ int FacebookProto::OnPrebuildContactMenu(WPARAM wParam,LPARAM lParam) Menu_ShowItem(g_hContactMenuItems[CMI_AUTH_ASK], ctrlPressed || type == CONTACT_NONE || !type); Menu_ShowItem(g_hContactMenuItems[CMI_AUTH_GRANT], ctrlPressed || type == CONTACT_APPROVE); Menu_ShowItem(g_hContactMenuItems[CMI_AUTH_REVOKE], ctrlPressed || type == CONTACT_FRIEND); - Menu_ShowItem(g_hContactMenuItems[CMI_AUTH_CANCEL], ctrlPressed || type == CONTACT_REQUEST); + Menu_ShowItem(g_hContactMenuItems[CMI_AUTH_CANCEL], ctrlPressed || type == CONTACT_REQUEST); Menu_ShowItem(g_hContactMenuItems[CMI_POKE], true); } -- cgit v1.2.3