summaryrefslogtreecommitdiffstats
path: root/pica-client/mainwindow.cpp
diff options
context:
space:
mode:
authorAnton <anton@picapica>2016-08-13 19:39:27 +0400
committerAnton <anton@picapica>2016-08-13 19:39:27 +0400
commitdc932321943129297cd9b32184134b86fb72aa37 (patch)
tree12f3009d15a54c901ef9471f55705c9f34763e57 /pica-client/mainwindow.cpp
parentc78395ea13aead21e7041f42699fcbf3753f1832 (diff)
downloadpica-pica-dc932321943129297cd9b32184134b86fb72aa37.tar.gz
pica-pica-dc932321943129297cd9b32184134b86fb72aa37.zip
show only critical messages, other messages are available on clicking "show notifications" button
Diffstat (limited to 'pica-client/mainwindow.cpp')
-rw-r--r--pica-client/mainwindow.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/pica-client/mainwindow.cpp b/pica-client/mainwindow.cpp
index c440e20..2081dbc 100644
--- a/pica-client/mainwindow.cpp
+++ b/pica-client/mainwindow.cpp
@@ -138,11 +138,13 @@ void MainWindow::showhide_click()
hide_notifications();
}
-void MainWindow::AddNotification(QString &text)
+void MainWindow::AddNotification(QString &text, bool is_critical)
{
notifications->addItem(text);
notifications->item(notifications->count() -1) ->setForeground(QBrush(QColor(230, 10, 10, 196)));
- show_notifications();
+
+ if (is_critical)
+ show_notifications();
}