summaryrefslogtreecommitdiff
path: root/protocols/Tox/src/tox_menus.cpp
diff options
context:
space:
mode:
authorAlexander Lantsev <aunsane@gmail.com>2015-04-17 23:21:43 +0000
committerAlexander Lantsev <aunsane@gmail.com>2015-04-17 23:21:43 +0000
commit67c3941db8a7ea1965dbed909f33380200f04090 (patch)
tree204629e2f887a7f02952375516a1d22c76c79c1f /protocols/Tox/src/tox_menus.cpp
parenta4135a992461726e155c7be95e4ceaabdb3eceff (diff)
Tox: audio support pt.4
git-svn-id: http://svn.miranda-ng.org/main/trunk@12898 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/Tox/src/tox_menus.cpp')
-rw-r--r--protocols/Tox/src/tox_menus.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/protocols/Tox/src/tox_menus.cpp b/protocols/Tox/src/tox_menus.cpp
index 9b6cc1b875..10f3316bdf 100644
--- a/protocols/Tox/src/tox_menus.cpp
+++ b/protocols/Tox/src/tox_menus.cpp
@@ -23,6 +23,8 @@ int CToxProto::OnPrebuildContactMenu(WPARAM hContact, LPARAM)
Menu_ShowItem(ContactMenuItems[CMI_AUTH_REQUEST], isCtrlPressed || isAuthNeed);
Menu_ShowItem(ContactMenuItems[CMI_AUTH_GRANT], isCtrlPressed || isGrantNeed);
+ Menu_ShowItem(ContactMenuItems[CMI_AUDIO_CALL], TRUE);
+
return 0;
}
@@ -58,6 +60,22 @@ void CToxProto::InitMenus()
mi.icolibItem = LoadSkinnedIconHandle(SKINICON_AUTH_GRANT);
ContactMenuItems[CMI_AUTH_GRANT] = Menu_AddContactMenuItem(&mi);
CreateServiceFunction(mi.pszService, GlobalService<&CToxProto::OnGrantAuth>);
+
+ // Grant authorization
+ mi.pszService = MODULE"/GrantAuth";
+ mi.ptszName = LPGENT("Grant authorization");
+ mi.position = CMI_POSITION + CMI_AUTH_GRANT;
+ mi.icolibItem = LoadSkinnedIconHandle(SKINICON_AUTH_GRANT);
+ ContactMenuItems[CMI_AUTH_GRANT] = Menu_AddContactMenuItem(&mi);
+ CreateServiceFunction(mi.pszService, GlobalService<&CToxProto::OnGrantAuth>);
+
+ // Start audio call
+ mi.pszService = MODULE"/Audio/Call";
+ mi.ptszName = LPGENT("Audio call");
+ mi.position = CMI_POSITION + CMI_AUDIO_CALL;
+ mi.icolibItem = GetIconHandle("audio_start");
+ ContactMenuItems[CMI_AUDIO_CALL] = Menu_AddContactMenuItem(&mi);
+ CreateServiceFunction(mi.pszService, GlobalService<&CToxProto::OnSendAudioCall>);
}
void CToxProto::UninitMenus()