summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swift/Controllers')
-rw-r--r--Swift/Controllers/ChatControllerBase.cpp3
-rw-r--r--Swift/Controllers/ChatControllerBase.h1
-rw-r--r--Swift/Controllers/ChatWindow.h1
-rw-r--r--Swift/Controllers/MainController.cpp4
4 files changed, 8 insertions, 1 deletions
diff --git a/Swift/Controllers/ChatControllerBase.cpp b/Swift/Controllers/ChatControllerBase.cpp
index 1780680..92b77b5 100644
--- a/Swift/Controllers/ChatControllerBase.cpp
+++ b/Swift/Controllers/ChatControllerBase.cpp
@@ -80,6 +80,9 @@ void ChatControllerBase::showChatWindow() {
chatWindow_->show();
}
+void ChatControllerBase::activateChatWindow() {
+ chatWindow_->activate();
+}
void ChatControllerBase::handleIncomingMessage(boost::shared_ptr<MessageEvent> messageEvent) {
unreadMessages_.push_back(messageEvent);
diff --git a/Swift/Controllers/ChatControllerBase.h b/Swift/Controllers/ChatControllerBase.h
index 144572b..3eadcc5 100644
--- a/Swift/Controllers/ChatControllerBase.h
+++ b/Swift/Controllers/ChatControllerBase.h
@@ -26,6 +26,7 @@ namespace Swift {
public:
virtual ~ChatControllerBase();
void showChatWindow();
+ void activateChatWindow();
void setAvailableServerFeatures(boost::shared_ptr<DiscoInfo> info);
void handleIncomingMessage(boost::shared_ptr<MessageEvent> message);
diff --git a/Swift/Controllers/ChatWindow.h b/Swift/Controllers/ChatWindow.h
index 36788cf..816b843 100644
--- a/Swift/Controllers/ChatWindow.h
+++ b/Swift/Controllers/ChatWindow.h
@@ -24,6 +24,7 @@ namespace Swift {
virtual void setName(const String& name) = 0;
virtual void show() = 0;
+ virtual void activate() = 0;
virtual void setAvailableSecurityLabels(const std::vector<SecurityLabel>& labels) = 0;
virtual void setSecurityLabelsEnabled(bool enabled) = 0;
virtual void setUnreadMessageCount(int count) = 0;
diff --git a/Swift/Controllers/MainController.cpp b/Swift/Controllers/MainController.cpp
index 78f5f65..873023a 100644
--- a/Swift/Controllers/MainController.cpp
+++ b/Swift/Controllers/MainController.cpp
@@ -244,7 +244,9 @@ void MainController::logout() {
void MainController::handleChatRequest(const String &contact) {
- getChatController(JID(contact))->showChatWindow();
+ ChatController* controller = getChatController(JID(contact));
+ controller->showChatWindow();
+ controller->activateChatWindow();
}
ChatController* MainController::getChatController(const JID &contact) {