summaryrefslogtreecommitdiff
path: root/protocols/Slack/src/slack_menus.cpp
diff options
context:
space:
mode:
authorKirill Volinsky <Mataes2007@gmail.com>2017-11-29 16:44:52 +0300
committerKirill Volinsky <Mataes2007@gmail.com>2017-11-29 16:44:52 +0300
commitf5cb8bc39cf07e9727a0a03f1dbfcc1dcbc6fe2b (patch)
tree10ff63d543e5d34f97a7f10631714aa201142192 /protocols/Slack/src/slack_menus.cpp
parentbc0ae76e5c65cd5133ace4ae5502b3e62f6b299f (diff)
Slack: moved to deprecated
Diffstat (limited to 'protocols/Slack/src/slack_menus.cpp')
-rw-r--r--protocols/Slack/src/slack_menus.cpp57
1 files changed, 0 insertions, 57 deletions
diff --git a/protocols/Slack/src/slack_menus.cpp b/protocols/Slack/src/slack_menus.cpp
deleted file mode 100644
index 183971237f..0000000000
--- a/protocols/Slack/src/slack_menus.cpp
+++ /dev/null
@@ -1,57 +0,0 @@
-#include "stdafx.h"
-
-HGENMENU CSlackProto::ContactMenuItems[CMI_MAX];
-
-int CSlackProto::OnPrebuildContactMenu(WPARAM hContact, LPARAM)
-{
- if (!hContact)
- return 0;
-
- if (!this->IsOnline())
- return 0;
-
- if (this->isChatRoom(hContact))
- return 0;
-
- bool isCtrlPressed = (GetKeyState(VK_CONTROL) & 0x8000) != 0;
-
- bool isAuthNeed = getByte(hContact, "Auth", 0) > 0;
- Menu_ShowItem(ContactMenuItems[CMI_AUTH_REQUEST], isCtrlPressed || isAuthNeed);
-
- bool isGrantNeed = getByte(hContact, "Grant", 0) > 0;
- Menu_ShowItem(ContactMenuItems[CMI_AUTH_GRANT], isCtrlPressed || isGrantNeed);
-
- return 0;
-}
-
-int CSlackProto::PrebuildContactMenu(WPARAM hContact, LPARAM lParam)
-{
- for (int i = 0; i < _countof(ContactMenuItems); i++)
- Menu_ShowItem(ContactMenuItems[i], FALSE);
- CSlackProto *proto = CSlackProto::GetContactAccount(hContact);
- return proto ? proto->OnPrebuildContactMenu(hContact, lParam) : 0;
-}
-
-void CSlackProto::InitMenus()
-{
- HookEvent(ME_CLIST_PREBUILDCONTACTMENU, &CSlackProto::PrebuildContactMenu);
-
- CMenuItem mi;
- mi.flags = CMIF_UNICODE;
- /*
- // Request authorization
- mi.pszService = MODULE"/RequestAuth";
- mi.ptszName = LPGENT("Request authorization");
- mi.position = CMI_POSITION + CMI_AUTH_REQUEST;
- mi.icolibItem = LoadSkinnedIconHandle(SKINICON_AUTH_REQUEST);
- ContactMenuItems[CMI_AUTH_REQUEST] = Menu_AddContactMenuItem(&mi);
- CreateServiceFunction(mi.pszService, GlobalService<&CSlackProto::OnRequestAuth>);
-
- // 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<&CSlackProto::OnGrantAuth>);*/
-}