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/QtRosterWidget.cpp | |
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/QtRosterWidget.cpp')
-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 @@ -16,6 +16,7 @@ #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" @@ -62,6 +63,10 @@ void QtRosterWidget::contextMenuEvent(QContextMenuEvent* event) { 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; @@ -85,6 +90,9 @@ void QtRosterWidget::contextMenuEvent(QContextMenuEvent* event) { 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) { |