restore defaults to second settings page

--restore default values to options found at
second settings (PreferencesPage)
pull/2/head
Michail Vourlakos 7 years ago
parent edc8905ea8
commit 04bae04d56

@ -644,6 +644,8 @@ void SettingsDialog::restoreDefaults()
{ {
qDebug() << Q_FUNC_INFO; qDebug() << Q_FUNC_INFO;
if (ui->tabWidget->currentIndex() == 0) {
//! Default layouts missing from layouts list
foreach (auto preset, m_corona->layoutManager()->presetsPaths()) { foreach (auto preset, m_corona->layoutManager()->presetsPaths()) {
QString presetName = Layout::layoutName(preset); QString presetName = Layout::layoutName(preset);
QByteArray presetNameChars = presetName.toUtf8(); QByteArray presetNameChars = presetName.toUtf8();
@ -654,6 +656,12 @@ void SettingsDialog::restoreDefaults()
addLayoutForFile(preset, presetName); addLayoutForFile(preset, presetName);
} }
} }
} else if (ui->tabWidget->currentIndex() == 1) {
//! Defaults for general Latte settings
ui->autostartChkBox->setChecked(true);
ui->infoWindowChkBox->setChecked(true);
ui->highSensitivityBtn->setChecked(true);
}
} }
void SettingsDialog::addLayoutForFile(QString file, QString layoutName, bool newTempDirectory, bool showNotification) void SettingsDialog::addLayoutForFile(QString file, QString layoutName, bool newTempDirectory, bool showNotification)

Loading…
Cancel
Save