diff options
| author | dknn <yoann.blein@free.fr> | 2012-08-04 09:25:47 (GMT) |
|---|---|---|
| committer | dknn <yoann.blein@free.fr> | 2012-09-22 09:15:48 (GMT) |
| commit | 343f88e3048887e83cc91bb710510b3aa618f779 (patch) | |
| tree | c9a5d4cd3b9804c31074ffeec9f2953eedd45042 /Swift/QtUI/Roster | |
| parent | 5ed2b62239eda07de84142e63fad31ccc194d379 (diff) | |
| download | swift-contrib-343f88e3048887e83cc91bb710510b3aa618f779.zip swift-contrib-343f88e3048887e83cc91bb710510b3aa618f779.tar.bz2 | |
Add basic UI for viewing remote screen
Diffstat (limited to 'Swift/QtUI/Roster')
| -rw-r--r-- | Swift/QtUI/Roster/QtRosterWidget.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Swift/QtUI/Roster/QtRosterWidget.cpp b/Swift/QtUI/Roster/QtRosterWidget.cpp index 1cf073b..0e75057 100644 --- a/Swift/QtUI/Roster/QtRosterWidget.cpp +++ b/Swift/QtUI/Roster/QtRosterWidget.cpp @@ -15,8 +15,9 @@ #include "Swift/Controllers/UIEvents/RemoveRosterItemUIEvent.h" #include "Swift/Controllers/UIEvents/RenameGroupUIEvent.h" #include "Swift/Controllers/UIEvents/SendFileUIEvent.h" #include "Swift/Controllers/UIEvents/RequestWhiteboardUIEvent.h" +#include "Swift/Controllers/UIEvents/ShareScreenUIEvent.h" #include "QtContactEditWindow.h" #include "Swift/Controllers/Roster/ContactRosterItem.h" #include "Swift/Controllers/Roster/GroupRosterItem.h" #include "Swift/Controllers/UIEvents/UIEventStream.h" @@ -61,8 +62,12 @@ void QtRosterWidget::contextMenuEvent(QContextMenuEvent* event) { QAction* sendFile = NULL; if (contact->supportsFeature(ContactRosterItem::FileTransferFeature)) { sendFile = contextMenu.addAction(tr("Send File")); } + QAction* shareScreen = NULL; + if (contact->supportsFeature(ContactRosterItem::ScreenSharingFeature)) { + shareScreen = contextMenu.addAction(tr("Share my screen")); + } #endif #ifdef SWIFT_EXPERIMENTAL_WB QAction* startWhiteboardChat = NULL; if (contact->supportsFeature(ContactRosterItem::WhiteboardFeature)) { @@ -84,8 +89,11 @@ void QtRosterWidget::contextMenuEvent(QContextMenuEvent* event) { if (!fileName.isEmpty()) { eventStream_->send(boost::make_shared<SendFileUIEvent>(contact->getJID(), Q2PSTRING(fileName))); } } + else if (shareScreen && result == shareScreen) { + eventStream_->send(boost::make_shared<ShareScreenUIEvent>(contact->getJID())); + } #endif #ifdef SWIFT_EXPERIMENTAL_WB else if (startWhiteboardChat && result == startWhiteboardChat) { eventStream_->send(boost::make_shared<RequestWhiteboardUIEvent>(contact->getJID())); |
Swift