diff options
author | Tobias Markmann <tm@ayena.de> | 2015-06-20 22:23:59 (GMT) |
---|---|---|
committer | Tobias Markmann <tm@ayena.de> | 2015-07-10 11:36:00 (GMT) |
commit | 84dcfb6263b46b62504706d69198675690f759be (patch) | |
tree | 246b524c40dad61cef2d3dcfb759a9ab5505dc3f /Swift/QtUI/QtWebKitChatView.h | |
parent | 23481aa1306b7d77b18be3b1c8764cccdc80e32d (diff) | |
download | swift-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.h | 11 |
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 @@ -3,18 +3,18 @@ * All rights reserved. * See the COPYING file for more information. */ #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> #include <Swift/Controllers/UIInterfaces/ChatWindow.h> #include <Swift/QtUI/ChatSnippet.h> @@ -38,12 +38,13 @@ namespace Swift { static const QString ButtonWhiteboardSessionAcceptRequest; static const QString ButtonWhiteboardShowWindow; static const QString ButtonFileTransferCancel; 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); ~QtWebKitChatView(); /** Add message to window. @@ -93,12 +94,13 @@ namespace Swift { QString getLastSentMessage(); void addToJSEnvironment(const QString&, QObject*); void setFileTransferProgress(QString id, const int percentageDone); 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(); void fontResized(int); void logCleared(); void scrollRequested(int pos); @@ -183,8 +185,9 @@ namespace Swift { bool previousMessageWasSelf_; bool showEmoticons_; bool insertingLastLine_; int idCounter_; QString previousSenderName_; std::map<QString, QString> descriptions_; + std::map<QString, QString> filePaths_; }; } |