summaryrefslogtreecommitdiff
path: root/protocols/Tox/src/tox_menus.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/Tox/src/tox_menus.cpp')
-rw-r--r--protocols/Tox/src/tox_menus.cpp41
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