Add the option to disable a certain message

This commit is contained in:
Jan Dalheimer 2014-01-03 21:05:03 +01:00
parent 71e1410b9f
commit df1186e021

View File

@ -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));