summaryrefslogtreecommitdiff
path: root/protocols/Skype/src/skype_menus.cpp
diff options
context:
space:
mode:
authorAlexander Lantsev <aunsane@gmail.com>2012-12-18 20:03:40 +0000
committerAlexander Lantsev <aunsane@gmail.com>2012-12-18 20:03:40 +0000
commita76ced5d4ff852dcbe7a96824ca1bb6dc219a1fd (patch)
treeb8f48fe0e7aed33c9a7cf48800bd351f4cf3c50b /protocols/Skype/src/skype_menus.cpp
parentb218fc95603571df3e9a6181d7e0de7f37e3bcc4 (diff)
- first approach of group chat support
git-svn-id: http://svn.miranda-ng.org/main/trunk@2764 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/Skype/src/skype_menus.cpp')
-rw-r--r--protocols/Skype/src/skype_menus.cpp47
1 files changed, 47 insertions, 0 deletions
diff --git a/protocols/Skype/src/skype_menus.cpp b/protocols/Skype/src/skype_menus.cpp
index e0a33fb9d1..65022f494a 100644
--- a/protocols/Skype/src/skype_menus.cpp
+++ b/protocols/Skype/src/skype_menus.cpp
@@ -106,6 +106,17 @@ int CSkypeProto::RevokeAuth(WPARAM wParam, LPARAM lParam)
return 0;
}
+int CSkypeProto::InviteCommand(WPARAM, LPARAM)
+{
+ ::DialogBoxParam(
+ g_hInstance,
+ MAKEINTRESOURCE(IDD_CHATROOM_INVITE),
+ NULL,
+ CSkypeProto::InviteToChatProc,
+ LPARAM(new InviteChatParam(NULL, NULL, this)));
+ return 0;
+}
+
int CSkypeProto::PrebuildContactMenu(WPARAM wParam, LPARAM lParam)
{
for (size_t i=0; i<SIZEOF(g_hContactMenuItems); i++)
@@ -164,4 +175,40 @@ void CSkypeProto::InitMenus()
void CSkypeProto::UninitMenus()
{
::UnhookEvent(CSkypeProto::hPrebuildMenuHook);
+}
+
+void CSkypeProto::OnInitStatusMenu()
+{
+ char text[ 200 ];
+ strcpy(text, m_szModuleName);
+ char* tDest = text + strlen(text);
+
+ CLISTMENUITEM mi = { sizeof(mi) };
+ mi.pszService = text;
+
+ HGENMENU hJabberRoot = ::MO_GetProtoRootMenu(m_szModuleName);
+ if (hJabberRoot == NULL) {
+ mi.ptszName = m_tszUserName;
+ mi.position = -1999901006;
+ mi.hParentMenu = HGENMENU_ROOT;
+ mi.flags = CMIF_ICONFROMICOLIB | CMIF_ROOTPOPUP | CMIF_TCHAR | CMIF_KEEPUNTRANSLATED;
+ mi.icolibItem = CSkypeProto::GetIconHandle("main");
+ hJabberRoot = m_hMenuRoot = ::Menu_AddProtoMenuItem(&mi);
+ }
+ else {
+ if (m_hMenuRoot)
+ ::CallService(MS_CLIST_REMOVEMAINMENUITEM, (WPARAM)m_hMenuRoot, 0);
+ m_hMenuRoot = NULL;
+ }
+
+ mi.hParentMenu = hJabberRoot;
+ mi.flags = CMIF_ICONFROMICOLIB | CMIF_CHILDPOPUP | CMIF_TCHAR;
+
+ // Invite Command
+ strcpy(tDest, "/InviteCommand");
+ this->CreateService(tDest, &CSkypeProto::InviteCommand);
+ mi.ptszName = LPGENT("Invite to conference");
+ mi.position = 200001;
+ mi.icolibItem = CSkypeProto::GetIconHandle("confInvite");
+ ::Menu_AddProtoMenuItem(&mi);
} \ No newline at end of file