From df1186e0212efc99fb0125380f2da0a3ac85fe5a Mon Sep 17 00:00:00 2001 From: Jan Dalheimer Date: Fri, 3 Jan 2014 21:05:03 +0100 Subject: [PATCH] Add the option to disable a certain message --- gui/MainWindow.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/gui/MainWindow.cpp b/gui/MainWindow.cpp index cf34a46b..826cbc04 100644 --- a/gui/MainWindow.cpp +++ b/gui/MainWindow.cpp @@ -543,9 +543,13 @@ void MainWindow::notificationsChanged() break; } - QMessageBox box(icon, tr("Notification"), entry.message, QMessageBox::Ok, this); + QMessageBox box(icon, tr("Notification"), entry.message, QMessageBox::Close, this); + QPushButton *dontShowAgainButton = box.addButton(tr("Don't show again"), QMessageBox::AcceptRole); box.exec(); - shownNotifications.append(entry.id); + if (box.clickedButton() == dontShowAgainButton) + { + shownNotifications.append(entry.id); + } } } MMC->settings()->set("ShownNotifications", intListToString(shownNotifications));