Added option to remove read messages on exit.

This commit is contained in:
Martin Rotter 2014-02-02 21:04:15 +01:00
parent 898a8eb6f3
commit ee6e40fbbb
2 changed files with 6 additions and 3 deletions

View File

@ -188,11 +188,12 @@ void FormMain::onAboutToQuit() {
}
qDebug("Cleaning up resources and saving application state.");
m_ui->m_tabWidget->feedMessageViewer()->quitDownloader();
// TODO: podle nastaveni
if (Settings::instance()->value(APP_CFG_MESSAGES, "clear_read_on_exit", false).toBool()) {
m_ui->m_tabWidget->feedMessageViewer()->feedsView()->clearAllReadMessages();
}
DatabaseFactory::instance()->saveMemoryDatabase();
saveSize();
}

View File

@ -153,9 +153,11 @@ void FormSettings::selectBrowserExecutable() {
}
void FormSettings::loadFeedsMessages() {
m_ui->m_checkRemoveReadMessagesOnExit->setChecked(Settings::instance()->value(APP_CFG_MESSAGES, "clear_read_on_exit", false).toBool());
}
void FormSettings::saveFeedsMessages() {
Settings::instance()->setValue(APP_CFG_MESSAGES, "clear_read_on_exit", m_ui->m_checkRemoveReadMessagesOnExit->isChecked());
}
void FormSettings::displayProxyPassword(int state) {