diff options
author | Sergey Bolhovskoy <elzorfox@ya.ru> | 2015-03-02 07:47:01 +0000 |
---|---|---|
committer | Sergey Bolhovskoy <elzorfox@ya.ru> | 2015-03-02 07:47:01 +0000 |
commit | 8551a2e6a8e9e1f75056ddfdd6e0ae83f1845647 (patch) | |
tree | cdc367f19768c5d4169bdb815d21988e2667f971 /protocols/VKontakte/src/vk_proto.cpp | |
parent | b6c1c9f09ada59b7f363b9f51e4a29fc15a7de37 (diff) |
VKontakte:
wall.post support - part 2 (complete)
version bump
git-svn-id: http://svn.miranda-ng.org/main/trunk@12297 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/VKontakte/src/vk_proto.cpp')
-rw-r--r-- | protocols/VKontakte/src/vk_proto.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/protocols/VKontakte/src/vk_proto.cpp b/protocols/VKontakte/src/vk_proto.cpp index a1b13558ad..dbfc7d026e 100644 --- a/protocols/VKontakte/src/vk_proto.cpp +++ b/protocols/VKontakte/src/vk_proto.cpp @@ -178,6 +178,7 @@ void CVkProto::InitMenus() CreateProtoService(PS_OPENBROADCAST, &CVkProto::SvcOpenBroadcast);
CreateProtoService(PS_LOADVKNEWS, &CVkProto::SvcLoadVKNews);
CreateProtoService(PS_SETSTATUSMSG, &CVkProto::SvcSetStatusMsg);
+ CreateProtoService(PS_WALLPOST, &CVkProto::SvcWallPost);
CLISTMENUITEM mi = { sizeof(mi) };
char szService[100];
@@ -200,6 +201,13 @@ void CVkProto::InitMenus() mi.pszName = LPGEN("Status message");
g_hProtoMenuItems[PMI_SETSTATUSMSG] = Menu_AddProtoMenuItem(&mi);
+ mir_snprintf(szService, SIZEOF(szService), "%s%s", m_szModuleName, PS_WALLPOST);
+ mi.pszService = szService;
+ mi.position = 10009 + PMI_WALLPOST;
+ mi.icolibItem = Skin_GetIconByHandle(GetIconHandle(IDI_WALL));
+ mi.pszName = LPGEN("Sent message to my wall");
+ g_hProtoMenuItems[PMI_WALLPOST] = Menu_AddProtoMenuItem(&mi);
+
mir_snprintf(szService, SIZEOF(szService), "%s%s", m_szModuleName, PS_LOADVKNEWS);
mi.pszService = szService;
mi.position = 10009 + PMI_LOADVKNEWS;
@@ -222,6 +230,13 @@ void CVkProto::InitMenus() mi.ptszName = LPGENT("Visit profile");
g_hContactMenuItems[CMI_VISITPROFILE] = Menu_AddContactMenuItem(&mi);
+ mir_snprintf(szService, SIZEOF(szService), "%s%s", m_szModuleName, PS_WALLPOST);
+ mi.position = -200001000 + CMI_WALLPOST;
+ mi.icolibItem = Skin_GetIconByHandle(GetIconHandle(IDI_WALL));
+ mi.ptszName = LPGENT("Sent message to user\'s wall");
+ mi.pszService = szService;
+ g_hContactMenuItems[CMI_WALLPOST] = Menu_AddContactMenuItem(&mi);
+
mir_snprintf(szService, SIZEOF(szService), "%s%s", m_szModuleName, PS_ADDASFRIEND);
mi.position = -200001000 + CMI_ADDASFRIEND;
mi.icolibItem = Skin_GetIconByHandle(GetIconHandle(IDI_FRIENDADD));
@@ -331,6 +346,7 @@ int CVkProto::OnPreBuildContactMenu(WPARAM hContact, LPARAM) bool bisFriend = (getByte(hContact, "Auth", -1) == 0);
bool bisBroadcast = !(IsEmpty(ptrT(db_get_tsa(hContact, m_szModuleName, "AudioUrl"))));
Menu_ShowItem(g_hContactMenuItems[CMI_VISITPROFILE], !isChatRoom(hContact));
+ Menu_ShowItem(g_hContactMenuItems[CMI_WALLPOST], !isChatRoom(hContact));
Menu_ShowItem(g_hContactMenuItems[CMI_ADDASFRIEND], !bisFriend && !isChatRoom(hContact) && userID != VK_FEED_USER);
Menu_ShowItem(g_hContactMenuItems[CMI_DELETEFRIEND], bisFriend && userID != VK_FEED_USER);
Menu_ShowItem(g_hContactMenuItems[CMI_BANUSER], !isChatRoom(hContact) && userID != VK_FEED_USER);
|