summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swift/QtUI/Roster/QtRosterWidget.cpp')
-rw-r--r--Swift/QtUI/Roster/QtRosterWidget.cpp8
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) {