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 | |||
| @@ -4,16 +4,16 @@ | |||
| 4 | * See the COPYING file for more information. | 4 | * See the COPYING file for more information. |
| 5 | */ | 5 | */ |
| 6 | 6 | ||
| 7 | #pragma once | 7 | #pragma once |
| 8 | 8 | ||
| 9 | #include <QString> | 9 | #include <boost/shared_ptr.hpp> |
| 10 | #include <QWidget> | 10 | |
| 11 | #include <QList> | 11 | #include <QList> |
| 12 | #include <QString> | ||
| 12 | #include <QWebElement> | 13 | #include <QWebElement> |
| 13 | 14 | #include <QWidget> | |
| 14 | #include <boost/shared_ptr.hpp> | ||
| 15 | 15 | ||
| 16 | #include <Swiften/Base/Override.h> | 16 | #include <Swiften/Base/Override.h> |
| 17 | 17 | ||
| 18 | #include <Swift/Controllers/UIInterfaces/ChatWindow.h> | 18 | #include <Swift/Controllers/UIInterfaces/ChatWindow.h> |
| 19 | 19 | ||
| @@ -39,10 +39,11 @@ namespace Swift { | |||
| 39 | static const QString ButtonWhiteboardShowWindow; | 39 | static const QString ButtonWhiteboardShowWindow; |
| 40 | static const QString ButtonFileTransferCancel; | 40 | static const QString ButtonFileTransferCancel; |
| 41 | static const QString ButtonFileTransferSetDescription; | 41 | static const QString ButtonFileTransferSetDescription; |
| 42 | static const QString ButtonFileTransferSendRequest; | 42 | static const QString ButtonFileTransferSendRequest; |
| 43 | static const QString ButtonFileTransferAcceptRequest; | 43 | static const QString ButtonFileTransferAcceptRequest; |
| 44 | static const QString ButtonFileTransferOpenFile; | ||
| 44 | static const QString ButtonMUCInvite; | 45 | static const QString ButtonMUCInvite; |
| 45 | public: | 46 | public: |
| 46 | QtWebKitChatView(QtChatWindow* window, UIEventStream* eventStream, QtChatTheme* theme, QWidget* parent, bool disableAutoScroll = false); | 47 | QtWebKitChatView(QtChatWindow* window, UIEventStream* eventStream, QtChatTheme* theme, QWidget* parent, bool disableAutoScroll = false); |
| 47 | ~QtWebKitChatView(); | 48 | ~QtWebKitChatView(); |
| 48 | 49 | ||
| @@ -94,10 +95,11 @@ namespace Swift { | |||
| 94 | void addToJSEnvironment(const QString&, QObject*); | 95 | void addToJSEnvironment(const QString&, QObject*); |
| 95 | void setFileTransferProgress(QString id, const int percentageDone); | 96 | void setFileTransferProgress(QString id, const int percentageDone); |
| 96 | void setFileTransferStatus(QString id, const ChatWindow::FileTransferState state, const QString& msg); | 97 | void setFileTransferStatus(QString id, const ChatWindow::FileTransferState state, const QString& msg); |
| 97 | void setWhiteboardSessionStatus(QString id, const ChatWindow::WhiteboardSessionState state); | 98 | void setWhiteboardSessionStatus(QString id, const ChatWindow::WhiteboardSessionState state); |
| 98 | void setMUCInvitationJoined(QString id); | 99 | void setMUCInvitationJoined(QString id); |
| 100 | void askDesktopToOpenFile(const QString& filename); | ||
| 99 | 101 | ||
| 100 | signals: | 102 | signals: |
| 101 | void gotFocus(); | 103 | void gotFocus(); |
| 102 | void fontResized(int); | 104 | void fontResized(int); |
| 103 | void logCleared(); | 105 | void logCleared(); |
| @@ -184,7 +186,8 @@ namespace Swift { | |||
| 184 | bool showEmoticons_; | 186 | bool showEmoticons_; |
| 185 | bool insertingLastLine_; | 187 | bool insertingLastLine_; |
| 186 | int idCounter_; | 188 | int idCounter_; |
| 187 | QString previousSenderName_; | 189 | QString previousSenderName_; |
| 188 | std::map<QString, QString> descriptions_; | 190 | std::map<QString, QString> descriptions_; |
| 191 | std::map<QString, QString> filePaths_; | ||
| 189 | }; | 192 | }; |
| 190 | } | 193 | } |
Swift