summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Swift/Controllers/Chat/ChatController.cpp2
-rw-r--r--Swift/QtUI/QtChatWindow.cpp7
2 files changed, 3 insertions, 6 deletions
diff --git a/Swift/Controllers/Chat/ChatController.cpp b/Swift/Controllers/Chat/ChatController.cpp
index 6e540eb..a80eee5 100644
--- a/Swift/Controllers/Chat/ChatController.cpp
+++ b/Swift/Controllers/Chat/ChatController.cpp
@@ -128,7 +128,7 @@ void ChatController::handleBareJIDCapsChanged(const JID& /*jid*/) {
FeatureOracle featureOracle(entityCapsProvider_, presenceOracle_);
chatWindow_->setCorrectionEnabled(featureOracle.isMessageCorrectionSupported(toJID_));
- chatWindow_->setFileTransferEnabled(featureOracle.isFileTransferSupported(toJID_));
+ chatWindow_->setFileTransferEnabled(isInMUC_ ? No : featureOracle.isFileTransferSupported(toJID_));
contactSupportsReceipts_ = featureOracle.isMessageReceiptsSupported(toJID_);
checkForDisplayingDisplayReceiptsAlert();
diff --git a/Swift/QtUI/QtChatWindow.cpp b/Swift/QtUI/QtChatWindow.cpp
index caa556f..a9bc2b5 100644
--- a/Swift/QtUI/QtChatWindow.cpp
+++ b/Swift/QtUI/QtChatWindow.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010-2015 Isode Limited.
+ * Copyright (c) 2010-2016 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
@@ -74,9 +74,7 @@ QtChatWindow::QtChatWindow(const QString& contact, QtChatTheme* theme, UIEventSt
fileTransferEnabled_ = Maybe;
updateTitleWithUnreadCount();
assert(settings);
-#ifdef SWIFT_EXPERIMENTAL_FT
setAcceptDrops(true);
-#endif
alertStyleSheet_ = "background: rgb(255, 255, 153); color: black";
@@ -590,8 +588,7 @@ void QtChatWindow::moveEvent(QMoveEvent*) {
void QtChatWindow::dragEnterEvent(QDragEnterEvent *event) {
if (isOnline_ && (blockingState_ != IsBlocked)) {
if (event->mimeData()->hasUrls() && event->mimeData()->urls().size() == 1) {
- // TODO: check whether contact actually supports file transfer
- if (!isMUC_) {
+ if (!isMUC_ && fileTransferEnabled_ == Yes) {
event->acceptProposedAction();
}
}