summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin Smith <git@kismith.co.uk>2010-10-03 14:46:20 (GMT)
committerKevin Smith <git@kismith.co.uk>2010-10-03 14:46:20 (GMT)
commit0a88cbb890213472c4e780593f4bd3866f7588e4 (patch)
treefd3d36a34bac4cc1d74d13feb3e843e73742e06d /Swift/QtUI/QtChatTabs.cpp
parentacebcadf74116468f018e2d040f817ac421ee14d (diff)
downloadswift-0a88cbb890213472c4e780593f4bd3866f7588e4.zip
swift-0a88cbb890213472c4e780593f4bd3866f7588e4.tar.bz2
Only jump the Mac dock when a Notice is generated.
Release-Notes: The Mac Dock icon has stopped jumping when it shouldn't. Resolves: #444 Resolves: #453
Diffstat (limited to 'Swift/QtUI/QtChatTabs.cpp')
-rw-r--r--Swift/QtUI/QtChatTabs.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/Swift/QtUI/QtChatTabs.cpp b/Swift/QtUI/QtChatTabs.cpp
index 937e5e0..86a6ab3 100644
--- a/Swift/QtUI/QtChatTabs.cpp
+++ b/Swift/QtUI/QtChatTabs.cpp
@@ -69,6 +69,7 @@ void QtChatTabs::addTab(QtTabbable* tab) {
connect(tab, SIGNAL(requestNextTab()), this, SLOT(handleRequestedNextTab()), Qt::UniqueConnection);
connect(tab, SIGNAL(requestActiveTab()), this, SLOT(handleRequestedActiveTab()), Qt::UniqueConnection);
connect(tab, SIGNAL(requestPreviousTab()), this, SLOT(handleRequestedPreviousTab()), Qt::UniqueConnection);
+ connect(tab, SIGNAL(requestFlash()), this, SLOT(flash()), Qt::UniqueConnection);
setSizePolicy(policy);
}
@@ -168,9 +169,8 @@ void QtChatTabs::handleTabTitleUpdated(QWidget* widget) {
}
tabs_->setTabText(index, tabbable->getCount() > 0 ? QString("(%1) %2").arg(tabbable->getCount()).arg(tabbable->windowTitle()) : tabbable->windowTitle());
QColor tabTextColor;
- bool flash = false;
switch (tabbable->getWidgetAlertState()) {
- case QtTabbable::WaitingActivity : flash = true; tabTextColor = QColor(217, 20, 43); break;
+ case QtTabbable::WaitingActivity : tabTextColor = QColor(217, 20, 43); break;
case QtTabbable::ImpendingActivity : tabTextColor = QColor(27, 171, 32); break;
default : tabTextColor = QColor();
}
@@ -185,12 +185,12 @@ void QtChatTabs::handleTabTitleUpdated(QWidget* widget) {
QtTabbable* current = qobject_cast<QtTabbable*>(tabs_->currentWidget());
setWindowTitle(unread > 0 ? QString("(%1) %2").arg(unread).arg(current->windowTitle()) : current->windowTitle());
+}
- if (flash) {
+void QtChatTabs::flash() {
#ifndef SWIFTEN_PLATFORM_MACOSX
- QApplication::alert(this, 3000);
+ QApplication::alert(this, 3000);
#endif
- }
}
void QtChatTabs::resizeEvent(QResizeEvent*) {