diff options
author | Kevin Smith <git@kismith.co.uk> | 2009-08-29 21:28:20 (GMT) |
---|---|---|
committer | Kevin Smith <git@kismith.co.uk> | 2009-08-29 21:28:20 (GMT) |
commit | 509c20d24b59e09e7aeb5045abebad8a370bb3ba (patch) | |
tree | e063f3fa2060f09474aeb9d8fe4c68dbeb54ac35 /Swift/Controllers | |
parent | 0d6f71fadac786fb94302e8f5762e37f7e598e53 (diff) | |
download | swift-509c20d24b59e09e7aeb5045abebad8a370bb3ba.zip swift-509c20d24b59e09e7aeb5045abebad8a370bb3ba.tar.bz2 |
Experimental fix for stuff in background, chats coming to front when opened etc.
Diffstat (limited to 'Swift/Controllers')
-rw-r--r-- | Swift/Controllers/ChatControllerBase.cpp | 3 | ||||
-rw-r--r-- | Swift/Controllers/ChatControllerBase.h | 1 | ||||
-rw-r--r-- | Swift/Controllers/ChatWindow.h | 1 | ||||
-rw-r--r-- | Swift/Controllers/MainController.cpp | 4 |
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) { |