summaryrefslogtreecommitdiff
path: root/protocols/Discord/src/groupchat.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2017-03-24 15:38:17 +0300
committerGeorge Hazan <ghazan@miranda.im>2017-03-24 15:38:17 +0300
commite84bafdd3f3d2eb67e10a9bd3fbe600748962b6f (patch)
tree1b563061e473ef8bbe62b86821da21c319cca2c5 /protocols/Discord/src/groupchat.cpp
parentaa55162ab85df5aa0ac6b87711bfee222b3222dd (diff)
revolution in chat menus
- common code moved to the core (Chat_CreateGCMenu, Chat_DestroyGCMenu); - ability added to any plugin to add its own items into any GC menu, not only to the protocol plugins to do that a plugin calls Chat_AddMenuItems and returns 0 to allow any other plugin to process menu hook
Diffstat (limited to 'protocols/Discord/src/groupchat.cpp')
-rw-r--r--protocols/Discord/src/groupchat.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/protocols/Discord/src/groupchat.cpp b/protocols/Discord/src/groupchat.cpp
index e0f1603ac8..729afc84f0 100644
--- a/protocols/Discord/src/groupchat.cpp
+++ b/protocols/Discord/src/groupchat.cpp
@@ -60,10 +60,8 @@ int CDiscordProto::GroupchatMenuHook(WPARAM, LPARAM lParam)
if (pChat == nullptr)
return 0;
- if (gcmi->Type == MENU_ON_LOG) {
- gcmi->nItems = _countof(sttLogListItems);
- gcmi->Item = sttLogListItems;
- }
+ if (gcmi->Type == MENU_ON_LOG)
+ Chat_AddMenuItems(gcmi->hMenu, _countof(sttLogListItems), sttLogListItems);
return 0;
}