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