mirror of
https://invent.kde.org/network/falkon.git
synced 2024-11-11 09:32:12 +01:00
Preferences: Remember last selected section.
This commit is contained in:
parent
616afd57bc
commit
064fa19097
|
@ -154,6 +154,7 @@ Preferences::Preferences(QupZilla* mainClass, QWidget* parent)
|
||||||
ui->showAddTabButton->setChecked(settings.value("showAddTabButton", false).toBool());
|
ui->showAddTabButton->setChecked(settings.value("showAddTabButton", false).toBool());
|
||||||
ui->showWebSearchBar->setChecked(settings.value("showWebSearchBar", true).toBool());
|
ui->showWebSearchBar->setChecked(settings.value("showWebSearchBar", true).toBool());
|
||||||
ui->useTransparentBg->setChecked(settings.value("useTransparentBackground", false).toBool());
|
ui->useTransparentBg->setChecked(settings.value("useTransparentBackground", false).toBool());
|
||||||
|
int currentSettingsPage = settings.value("settingsDialogPage", 0).toInt(0);
|
||||||
settings.endGroup();
|
settings.endGroup();
|
||||||
#ifdef Q_WS_WIN
|
#ifdef Q_WS_WIN
|
||||||
ui->useTransparentBg->setEnabled(QtWin::isCompositionEnabled());
|
ui->useTransparentBg->setEnabled(QtWin::isCompositionEnabled());
|
||||||
|
@ -424,7 +425,7 @@ Preferences::Preferences(QupZilla* mainClass, QWidget* parent)
|
||||||
ui->listWidget->setItemSelected(ui->listWidget->itemAt(5, 5), true);
|
ui->listWidget->setItemSelected(ui->listWidget->itemAt(5, 5), true);
|
||||||
|
|
||||||
ui->version->setText(" QupZilla v" + QupZilla::VERSION);
|
ui->version->setText(" QupZilla v" + QupZilla::VERSION);
|
||||||
showStackedPage(ui->listWidget->item(0));
|
ui->listWidget->setCurrentRow(currentSettingsPage);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Preferences::showStackedPage(QListWidgetItem* item)
|
void Preferences::showStackedPage(QListWidgetItem* item)
|
||||||
|
@ -773,6 +774,7 @@ void Preferences::saveSettings()
|
||||||
settings.setValue("showWebSearchBar", ui->showWebSearchBar->isChecked());
|
settings.setValue("showWebSearchBar", ui->showWebSearchBar->isChecked());
|
||||||
settings.setValue("useTransparentBackground", ui->useTransparentBg->isChecked());
|
settings.setValue("useTransparentBackground", ui->useTransparentBg->isChecked());
|
||||||
settings.setValue("showAddTabButton", ui->showAddTabButton->isChecked());
|
settings.setValue("showAddTabButton", ui->showAddTabButton->isChecked());
|
||||||
|
settings.setValue("settingsDialogPage", ui->stackedWidget->currentIndex());
|
||||||
settings.endGroup();
|
settings.endGroup();
|
||||||
|
|
||||||
//TABS
|
//TABS
|
||||||
|
|
Loading…
Reference in New Issue
Block a user