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,11 +543,15 @@ void MainWindow::notificationsChanged()
break; 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(); box.exec();
if (box.clickedButton() == dontShowAgainButton)
{
shownNotifications.append(entry.id); shownNotifications.append(entry.id);
} }
} }
}
MMC->settings()->set("ShownNotifications", intListToString(shownNotifications)); MMC->settings()->set("ShownNotifications", intListToString(shownNotifications));
} }