summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMateusz Piekos <mateuszpiekos@gmail.com>2012-08-07 17:52:36 (GMT)
committerMateusz Piekos <mateuszpiekos@gmail.com>2012-08-07 17:52:36 (GMT)
commita7a2f6124fd733926a0effe486cffee03bf9fde0 (patch)
treed028d9613b72f4fbaca031b33b718eb5ca6666e9 /Swift/QtUI/ChatList/QtChatListWindow.cpp
parent4239fd83f1774cbcae15a501a4aa8d9fa4925181 (diff)
downloadswift-contrib-a7a2f6124fd733926a0effe486cffee03bf9fde0.zip
swift-contrib-a7a2f6124fd733926a0effe486cffee03bf9fde0.tar.bz2
"Chats" tab shows opened whiteboard sessions
Diffstat (limited to 'Swift/QtUI/ChatList/QtChatListWindow.cpp')
-rw-r--r--Swift/QtUI/ChatList/QtChatListWindow.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/Swift/QtUI/ChatList/QtChatListWindow.cpp b/Swift/QtUI/ChatList/QtChatListWindow.cpp
index 42eb43b..7561820 100644
--- a/Swift/QtUI/ChatList/QtChatListWindow.cpp
+++ b/Swift/QtUI/ChatList/QtChatListWindow.cpp
@@ -13,6 +13,7 @@
#include <Swift/QtUI/ChatList/ChatListMUCItem.h>
#include <Swift/QtUI/ChatList/ChatListRecentItem.h>
+#include <Swift/QtUI/ChatList/ChatListWhiteboardItem.h>
#include <Swift/QtUI/QtAddBookmarkWindow.h>
#include <Swift/QtUI/QtEditBookmarkWindow.h>
#include <Swift/QtUI/QtUISettingConstants.h>
@@ -97,6 +98,11 @@ void QtChatListWindow::handleItemActivated(const QModelIndex& index) {
onRecentActivated(recentItem->getChat());
}
}
+ else if (ChatListWhiteboardItem* whiteboardItem = dynamic_cast<ChatListWhiteboardItem*>(item)) {
+ if (!whiteboardItem->getChat().isMUC || bookmarksEnabled_) {
+ onWhiteboardActivated(whiteboardItem->getChat().jid);
+ }
+ }
}
void QtChatListWindow::clearBookmarks() {
@@ -111,6 +117,14 @@ void QtChatListWindow::removeMUCBookmark(const MUCBookmark& bookmark) {
model_->removeMUCBookmark(bookmark);
}
+void QtChatListWindow::addWhiteboardSession(const ChatListWindow::Chat& chat) {
+ model_->addWhiteboardSession(chat);
+}
+
+void QtChatListWindow::removeWhiteboardSession(const JID& jid) {
+ model_->removeWhiteboardSession(jid);
+}
+
void QtChatListWindow::setRecents(const std::list<ChatListWindow::Chat>& recents) {
model_->setRecents(recents);
}