diff options
author | Mateusz Piekos <mateuszpiekos@gmail.com> | 2012-07-29 15:26:00 (GMT) |
---|---|---|
committer | Mateusz Piekos <mateuszpiekos@gmail.com> | 2012-07-29 15:26:00 (GMT) |
commit | 944b240a9f72f967f3fd2a840e4efbd2f0ef4183 (patch) | |
tree | 6e7c55d20b1cbb0e4fe0ec7674ce46a43108c502 /Swift/QtUI/Roster | |
parent | c524d03d94afb0c303ca8f21024df6aabc5ccf22 (diff) | |
download | swift-contrib-944b240a9f72f967f3fd2a840e4efbd2f0ef4183.zip swift-contrib-944b240a9f72f967f3fd2a840e4efbd2f0ef4183.tar.bz2 |
Added whiteboard discovery information
Diffstat (limited to 'Swift/QtUI/Roster')
-rw-r--r-- | Swift/QtUI/Roster/QtRosterWidget.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/Swift/QtUI/Roster/QtRosterWidget.cpp b/Swift/QtUI/Roster/QtRosterWidget.cpp index a7767fe..7149f6a 100644 --- a/Swift/QtUI/Roster/QtRosterWidget.cpp +++ b/Swift/QtUI/Roster/QtRosterWidget.cpp @@ -63,7 +63,10 @@ void QtRosterWidget::contextMenuEvent(QContextMenuEvent* event) { sendFile = contextMenu.addAction(tr("Send File")); } #endif - QAction* startWhiteboardChat = contextMenu.addAction(tr("Start Whiteboard Chat")); + QAction* startWhiteboardChat = NULL; + if (contact->supportsFeature(ContactRosterItem::WhiteboardFeature)) { + startWhiteboardChat = contextMenu.addAction(tr("Start Whiteboard Chat")); + } QAction* result = contextMenu.exec(event->globalPos()); if (result == editContact) { eventStream_->send(boost::make_shared<RequestContactEditorUIEvent>(contact->getJID())); @@ -81,7 +84,7 @@ void QtRosterWidget::contextMenuEvent(QContextMenuEvent* event) { } } #endif - else if (result == startWhiteboardChat) { + else if (startWhiteboardChat && result == startWhiteboardChat) { eventStream_->send(boost::make_shared<RequestWhiteboardUIEvent>(contact->getJID())); } } |