From 7ee66e0a35a49f71bc93f8dd6eed77efd8f4e1c1 Mon Sep 17 00:00:00 2001 From: Mateusz Piekos Date: Tue, 7 Aug 2012 08:32:43 +0200 Subject: Added option to cancel outgoing whiteboard session request diff --git a/Swift/Controllers/WhiteboardManager.cpp b/Swift/Controllers/WhiteboardManager.cpp index c62ce3d..142239e 100644 --- a/Swift/Controllers/WhiteboardManager.cpp +++ b/Swift/Controllers/WhiteboardManager.cpp @@ -86,7 +86,7 @@ namespace Swift { } void WhiteboardManager::cancelSession(const JID& from) { - IncomingWhiteboardSession::ref session = boost::dynamic_pointer_cast(whiteboardSessionManager_->getSession(from)); + WhiteboardSession::ref session = whiteboardSessionManager_->getSession(from); if (session) { session->cancel(); } diff --git a/Swift/QtUI/QtChatView.cpp b/Swift/QtUI/QtChatView.cpp index ef55dff..375a1ad 100644 --- a/Swift/QtUI/QtChatView.cpp +++ b/Swift/QtUI/QtChatView.cpp @@ -365,8 +365,8 @@ void QtChatView::setWhiteboardSessionStatus(QString id, const ChatWindow::Whiteb QWebElement divElement = findDivElementWithID(document_, id); QString newInnerHTML; if (state == ChatWindow::WhiteboardAccepted) { - newInnerHTML = tr("Started whiteboard session") + "
" + - QtChatWindow::buildChatWindowButton(tr("Show whitebaord"), QtChatWindow::ButtonWhiteboardShowWindow, id); + newInnerHTML = tr("Started whiteboard chat") + "
" + + QtChatWindow::buildChatWindowButton(tr("Show whiteboard"), QtChatWindow::ButtonWhiteboardShowWindow, id); } else if (state == ChatWindow::WhiteboardCanceled) { newInnerHTML = tr("Whiteboard session has been canceled"); } else if (state == ChatWindow::WhiteboardRejected) { diff --git a/Swift/QtUI/QtChatWindow.cpp b/Swift/QtUI/QtChatWindow.cpp index fbbbf34..027962d 100644 --- a/Swift/QtUI/QtChatWindow.cpp +++ b/Swift/QtUI/QtChatWindow.cpp @@ -600,7 +600,9 @@ std::string QtChatWindow::addWhiteboardRequest(bool senderIsSelf) { QString wb_id = QString("wb%1").arg(P2QSTRING(boost::lexical_cast(idCounter_++))); QString htmlString; if (senderIsSelf) { - htmlString = "
Sent session request
"; + htmlString = "
" + tr("Sent session request") + "
"+ + buildChatWindowButton(tr("Cancel"), ButtonWhiteboardSessionCancel, wb_id) + + "
"; } else { htmlString = "
" + Qt::escape(contact_) + tr(" would like to start whiteboard session") + ":
" + buildChatWindowButton(tr("Cancel"), ButtonWhiteboardSessionCancel, wb_id) + -- cgit v0.10.2-6-g49f6