summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin Smith <git@kismith.co.uk>2009-07-04 21:13:56 (GMT)
committerKevin Smith <git@kismith.co.uk>2009-07-04 21:13:56 (GMT)
commita5853e88be12bce08b84f76452e5d2576cf9d10b (patch)
treedd3ff7e5a33b0f6b7526b4c398c4d94c3fb19144 /Swift/QtUI/QtChatWindow.cpp
parent83ca0f4806ed30fb974420db4171201c451fb583 (diff)
downloadswift-a5853e88be12bce08b84f76452e5d2576cf9d10b.zip
swift-a5853e88be12bce08b84f76452e5d2576cf9d10b.tar.bz2
Notify chat tabs even if the parent tabset has focus. issue#150.
Diffstat (limited to 'Swift/QtUI/QtChatWindow.cpp')
-rw-r--r--Swift/QtUI/QtChatWindow.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/Swift/QtUI/QtChatWindow.cpp b/Swift/QtUI/QtChatWindow.cpp
index e6e0100..6328156 100644
--- a/Swift/QtUI/QtChatWindow.cpp
+++ b/Swift/QtUI/QtChatWindow.cpp
@@ -106,7 +106,7 @@ void QtChatWindow::convertToMUC() {
void QtChatWindow::qAppFocusChanged(QWidget *old, QWidget *now) {
Q_UNUSED(old);
- if (now == this || now == messageLog_ || now == input_) {
+ if (isWidgetSelected()) {
onAllMessagesRead();
}
@@ -133,7 +133,7 @@ void QtChatWindow::updateTitleWithUnreadCount() {
}
void QtChatWindow::addMessage(const String &message, const String &senderName, bool senderIsSelf, const boost::optional<SecurityLabel>& label, const String& avatarPath) {
- if (isActiveWindow()) {
+ if (isWidgetSelected()) {
onAllMessagesRead();
}
@@ -156,7 +156,7 @@ void QtChatWindow::addMessage(const String &message, const String &senderName, b
}
void QtChatWindow::addErrorMessage(const String& errorMessage) {
- if (isActiveWindow()) {
+ if (isWidgetSelected()) {
onAllMessagesRead();
}
@@ -169,7 +169,7 @@ void QtChatWindow::addErrorMessage(const String& errorMessage) {
}
void QtChatWindow::addSystemMessage(const String& message) {
- if (isActiveWindow()) {
+ if (isWidgetSelected()) {
onAllMessagesRead();
}