diff options
Diffstat (limited to 'Swift/QtUI/QtChatWindow.cpp')
-rw-r--r-- | Swift/QtUI/QtChatWindow.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/Swift/QtUI/QtChatWindow.cpp b/Swift/QtUI/QtChatWindow.cpp index f58c11b..f0d2038 100644 --- a/Swift/QtUI/QtChatWindow.cpp +++ b/Swift/QtUI/QtChatWindow.cpp @@ -68,4 +68,5 @@ QtChatWindow::QtChatWindow(const QString &contact, QtChatTheme* theme, UIEventSt labelModel_ = NULL; correctionEnabled_ = Maybe; + fileTransferEnabled_ = Maybe; updateTitleWithUnreadCount(); @@ -387,4 +388,8 @@ void QtChatWindow::setCorrectionEnabled(Tristate enabled) { } +void QtChatWindow::setFileTransferEnabled(Tristate enabled) { + fileTransferEnabled_ = enabled; +} + SecurityLabelsCatalog::Item QtChatWindow::getSelectedSecurityLabel() { assert(labelsWidget_->isEnabled()); @@ -551,5 +556,5 @@ void QtChatWindow::dragEnterEvent(QDragEnterEvent *event) { void QtChatWindow::dropEvent(QDropEvent *event) { - if (event->mimeData()->hasUrls()) { + if (fileTransferEnabled_ == ChatWindow::Yes && event->mimeData()->hasUrls()) { if (event->mimeData()->urls().size() == 1) { onSendFileRequest(Q2PSTRING(event->mimeData()->urls().at(0).toLocalFile())); |