summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTobias Markmann <tm@ayena.de>2015-06-20 22:23:59 (GMT)
committerTobias Markmann <tm@ayena.de>2015-07-10 11:36:00 (GMT)
commit84dcfb6263b46b62504706d69198675690f759be (patch)
tree246b524c40dad61cef2d3dcfb759a9ab5505dc3f /Swift/QtUI/QtWebKitChatView.h
parent23481aa1306b7d77b18be3b1c8764cccdc80e32d (diff)
downloadswift-84dcfb6263b46b62504706d69198675690f759be.zip
swift-84dcfb6263b46b62504706d69198675690f759be.tar.bz2
Add 'Open file' button for successfully transferred files
The button is shown after the 'Transfer completed successful.' message and asks the desktop environment to open the file with the default program. Test-Information: Send a file to another Swift on OS X 10.9.5 and verified that it opens the file on button click. Change-Id: I602e534ef07a119247cbf979e13551be7771880c
Diffstat (limited to 'Swift/QtUI/QtWebKitChatView.h')
-rw-r--r--Swift/QtUI/QtWebKitChatView.h11
1 files changed, 7 insertions, 4 deletions
diff --git a/Swift/QtUI/QtWebKitChatView.h b/Swift/QtUI/QtWebKitChatView.h
index ea9a57c..af2da01 100644
--- a/Swift/QtUI/QtWebKitChatView.h
+++ b/Swift/QtUI/QtWebKitChatView.h
@@ -6,12 +6,12 @@
#pragma once
-#include <QString>
-#include <QWidget>
+#include <boost/shared_ptr.hpp>
+
#include <QList>
+#include <QString>
#include <QWebElement>
-
-#include <boost/shared_ptr.hpp>
+#include <QWidget>
#include <Swiften/Base/Override.h>
@@ -41,6 +41,7 @@ namespace Swift {
static const QString ButtonFileTransferSetDescription;
static const QString ButtonFileTransferSendRequest;
static const QString ButtonFileTransferAcceptRequest;
+ static const QString ButtonFileTransferOpenFile;
static const QString ButtonMUCInvite;
public:
QtWebKitChatView(QtChatWindow* window, UIEventStream* eventStream, QtChatTheme* theme, QWidget* parent, bool disableAutoScroll = false);
@@ -96,6 +97,7 @@ namespace Swift {
void setFileTransferStatus(QString id, const ChatWindow::FileTransferState state, const QString& msg);
void setWhiteboardSessionStatus(QString id, const ChatWindow::WhiteboardSessionState state);
void setMUCInvitationJoined(QString id);
+ void askDesktopToOpenFile(const QString& filename);
signals:
void gotFocus();
@@ -186,5 +188,6 @@ namespace Swift {
int idCounter_;
QString previousSenderName_;
std::map<QString, QString> descriptions_;
+ std::map<QString, QString> filePaths_;
};
}