summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swift/QtUI')
-rw-r--r--Swift/QtUI/QtChatTabs.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/Swift/QtUI/QtChatTabs.cpp b/Swift/QtUI/QtChatTabs.cpp
index 59a4b66..42c80a7 100644
--- a/Swift/QtUI/QtChatTabs.cpp
+++ b/Swift/QtUI/QtChatTabs.cpp
@@ -14,6 +14,7 @@
#include <QTabWidget>
#include <QLayout>
#include <QTabBar>
+#include <QApplication>
namespace Swift {
QtChatTabs::QtChatTabs() : QWidget() {
@@ -113,8 +114,9 @@ void QtChatTabs::handleTabTitleUpdated(QWidget* widget) {
}
tabs_->setTabText(index, widget->windowTitle());
QColor tabTextColor;
+ bool flash = false;
switch (tabbable->getWidgetAlertState()) {
- case QtTabbable::WaitingActivity : tabTextColor = QColor(255, 0, 0); break;
+ case QtTabbable::WaitingActivity : flash = true; tabTextColor = QColor(255, 0, 0); break;
case QtTabbable::ImpendingActivity : tabTextColor = QColor(0, 255, 0); break;
default : tabTextColor = QColor(-1,-1,-1);//invalid resets to default
}
@@ -122,6 +124,12 @@ void QtChatTabs::handleTabTitleUpdated(QWidget* widget) {
if (widget == tabs_->currentWidget()) {
setWindowTitle(widget->windowTitle());
}
+
+ if (flash) {
+#ifndef SWIFTEN_PLATFORM_MACOSX
+ QApplication::alert(this, 3000);
+#endif
+ }
}
void QtChatTabs::resizeEvent(QResizeEvent*) {