From 047076a15f1588d173e09dbb33f9beb15756f408 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20P=C3=B6sel?= Date: Wed, 9 Jul 2014 08:30:07 +0000 Subject: Core: Add PF4_GROUPCHATFILES flag to mark protocols that support sending files to group chats StdFile: Don't show "Send file" menu item for groupchats of protocols that doesn't support it git-svn-id: http://svn.miranda-ng.org/main/trunk@9740 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- src/core/stdfile/file.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/core/stdfile') diff --git a/src/core/stdfile/file.cpp b/src/core/stdfile/file.cpp index 97b7d9549d..413a202751 100644 --- a/src/core/stdfile/file.cpp +++ b/src/core/stdfile/file.cpp @@ -308,7 +308,8 @@ static int SRFilePreBuildMenu(WPARAM wParam, LPARAM) bool bEnabled = false; char *szProto = GetContactProto(wParam); if (szProto != NULL) { - if (CallProtoService(szProto, PS_GETCAPS, PFLAGNUM_1, 0) & PF1_FILESEND) { + bool isChat = db_get_b(wParam, szProto, "ChatRoom", false) != 0; + if (CallProtoService(szProto, PS_GETCAPS, isChat ? PFLAGNUM_4 : PFLAGNUM_1, 0) & (isChat ? PF4_GROUPCHATFILES : PF1_FILESEND)) { if (CallProtoService(szProto, PS_GETCAPS, PFLAGNUM_4, 0) & PF4_OFFLINEFILES) bEnabled = true; else if (db_get_w(wParam, szProto, "Status", ID_STATUS_OFFLINE) != ID_STATUS_OFFLINE) -- cgit v1.2.3