diff options
author | Alexander Lantsev <aunsane@gmail.com> | 2015-02-22 21:14:05 +0000 |
---|---|---|
committer | Alexander Lantsev <aunsane@gmail.com> | 2015-02-22 21:14:05 +0000 |
commit | 4ffd0909f7990643a0253849d46a750bd9f3233b (patch) | |
tree | a0a004674fcd9ad0600f7c1ae5728bea499f9db0 /protocols/Tox/src/tox_menus.cpp | |
parent | 0e8ffa6f388f28411decbcc6fe6c834029830714 (diff) |
Tox: some code for group chats
git-svn-id: http://svn.miranda-ng.org/main/trunk@12241 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/Tox/src/tox_menus.cpp')
-rw-r--r-- | protocols/Tox/src/tox_menus.cpp | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/protocols/Tox/src/tox_menus.cpp b/protocols/Tox/src/tox_menus.cpp new file mode 100644 index 0000000000..2afa6fd218 --- /dev/null +++ b/protocols/Tox/src/tox_menus.cpp @@ -0,0 +1,41 @@ +#include "common.h"
+
+int CToxProto::OnInitStatusMenu()
+{
+ char text[MAX_PATH];
+ mir_strcpy(text, m_szModuleName);
+ char *tDest = text + strlen(text);
+
+ CLISTMENUITEM mi = { sizeof(mi) };
+ mi.pszService = text;
+
+ HGENMENU hStatusMunuRoot = MO_GetProtoRootMenu(m_szModuleName);
+ if (!hStatusMunuRoot)
+ {
+ mi.ptszName = m_tszUserName;
+ mi.position = -1999901006;
+ mi.hParentMenu = HGENMENU_ROOT;
+ mi.flags = CMIF_ROOTPOPUP | CMIF_TCHAR | CMIF_KEEPUNTRANSLATED;
+ //mi.icolibItem = CToxProto::GetSkinIconHandle("main");
+ hStatusMunuRoot = /*m_hMenuRoot = */Menu_AddProtoMenuItem(&mi);
+ }
+ else
+ {
+ //if (m_hMenuRoot)
+ // CallService(MO_REMOVEMENUITEM, (WPARAM)m_hMenuRoot, 0);
+ //m_hMenuRoot = NULL;
+ }
+
+ mi.hParentMenu = hStatusMunuRoot;
+ mi.flags = CMIF_CHILDPOPUP | CMIF_TCHAR;
+
+ // Create chat room command
+ mir_strcpy(tDest, "/CreateChatRoom");
+ CreateProtoService(tDest, &CToxProto::OnCreateChatRoom);
+ mi.ptszName = LPGENT("Create group chat");
+ mi.position = 200000;// +SMI_CHAT_CREATE;
+ //mi.icolibItem = CToxProto::GetSkinIconHandle("conference");
+ Menu_AddProtoMenuItem(&mi);
+
+ return 0;
+}
\ No newline at end of file |