mirror of
https://invent.kde.org/network/falkon.git
synced 2024-12-20 18:56:34 +01:00
[Fix:] Fixed bug with showing/hiding navigation bars
after changing preferences
This commit is contained in:
parent
5330dea242
commit
2943c0ca93
@ -457,13 +457,9 @@ bool MainApplication::saveStateSlot()
|
|||||||
settings.endGroup();
|
settings.endGroup();
|
||||||
|
|
||||||
QupZilla* qupzilla_ = getWindow();
|
QupZilla* qupzilla_ = getWindow();
|
||||||
if (qupzilla_) {
|
if (qupzilla_)
|
||||||
qupzilla_->tabWidget()->savePinnedTabs();
|
qupzilla_->tabWidget()->savePinnedTabs();
|
||||||
settings.setValue("Browser-View-Settings/showBookmarksToolbar",qupzilla_->bookmarksToolbar()->isVisible());
|
|
||||||
settings.setValue("Browser-View-Settings/showNavigationToolbar",qupzilla_->navigationToolbar()->isVisible());
|
|
||||||
settings.setValue("Browser-View-Settings/showStatusbar",qupzilla_->statusBar()->isVisible());
|
|
||||||
settings.setValue("Browser-View-Settings/showMenubar",qupzilla_->menuBar()->isVisible());
|
|
||||||
}
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -544,13 +544,12 @@ void QupZilla::showPageInfo()
|
|||||||
|
|
||||||
void QupZilla::showBookmarksToolbar()
|
void QupZilla::showBookmarksToolbar()
|
||||||
{
|
{
|
||||||
if (m_bookmarksToolbar->isVisible()) {
|
bool status = m_bookmarksToolbar->isVisible();
|
||||||
m_bookmarksToolbar->setVisible(false);
|
m_bookmarksToolbar->setVisible(!status);
|
||||||
m_actionShowBookmarksToolbar->setChecked(false);
|
m_actionShowBookmarksToolbar->setChecked(!status);
|
||||||
}else{
|
|
||||||
m_bookmarksToolbar->setVisible(true);
|
QSettings settings(activeProfil()+"settings.ini", QSettings::IniFormat);
|
||||||
m_actionShowBookmarksToolbar->setChecked(true);
|
settings.setValue("Browser-View-Settings/showBookmarksToolbar", !status);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void QupZilla::showNavigationToolbar()
|
void QupZilla::showNavigationToolbar()
|
||||||
@ -558,13 +557,12 @@ void QupZilla::showNavigationToolbar()
|
|||||||
if (!menuBar()->isVisible() && !m_actionShowToolbar->isChecked())
|
if (!menuBar()->isVisible() && !m_actionShowToolbar->isChecked())
|
||||||
showMenubar();
|
showMenubar();
|
||||||
|
|
||||||
if (m_navigation->isVisible()) {
|
bool status = m_navigation->isVisible();
|
||||||
m_navigation->setVisible(false);
|
m_navigation->setVisible(!status);
|
||||||
m_actionShowToolbar->setChecked(false);
|
m_actionShowToolbar->setChecked(!status);
|
||||||
}else{
|
|
||||||
m_navigation->setVisible(true);
|
QSettings settings(activeProfil()+"settings.ini", QSettings::IniFormat);
|
||||||
m_actionShowToolbar->setChecked(true);
|
settings.setValue("Browser-View-Settings/showNavigationToolbar", !status);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void QupZilla::showMenubar()
|
void QupZilla::showMenubar()
|
||||||
@ -575,17 +573,19 @@ void QupZilla::showMenubar()
|
|||||||
menuBar()->setVisible(!menuBar()->isVisible());
|
menuBar()->setVisible(!menuBar()->isVisible());
|
||||||
m_navigation->actions().at(m_navigation->actions().count()-2)->setVisible(!menuBar()->isVisible());
|
m_navigation->actions().at(m_navigation->actions().count()-2)->setVisible(!menuBar()->isVisible());
|
||||||
m_actionShowMenubar->setChecked(menuBar()->isVisible());
|
m_actionShowMenubar->setChecked(menuBar()->isVisible());
|
||||||
|
|
||||||
|
QSettings settings(activeProfil()+"settings.ini", QSettings::IniFormat);
|
||||||
|
settings.setValue("Browser-View-Settings/showMenubar", menuBar()->isVisible());
|
||||||
}
|
}
|
||||||
|
|
||||||
void QupZilla::showStatusbar()
|
void QupZilla::showStatusbar()
|
||||||
{
|
{
|
||||||
if (statusBar()->isVisible()) {
|
bool status = statusBar()->isVisible();
|
||||||
statusBar()->setVisible(false);
|
statusBar()->setVisible(!status);
|
||||||
m_actionShowStatusbar->setChecked(false);
|
m_actionShowStatusbar->setChecked(!status);
|
||||||
}else{
|
|
||||||
statusBar()->setVisible(true);
|
QSettings settings(activeProfil()+"settings.ini", QSettings::IniFormat);
|
||||||
m_actionShowStatusbar->setChecked(true);
|
settings.setValue("Browser-View-Settings/showStatusbar", !status);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void QupZilla::showInspector()
|
void QupZilla::showInspector()
|
||||||
|
@ -466,6 +466,7 @@ void Preferences::deleteProfile()
|
|||||||
void Preferences::startProfileIndexChanged(QString index)
|
void Preferences::startProfileIndexChanged(QString index)
|
||||||
{
|
{
|
||||||
ui->deleteProfile->setEnabled(m_actProfileName != index);
|
ui->deleteProfile->setEnabled(m_actProfileName != index);
|
||||||
|
ui->cannotDeleteActiveProfileLabel->setVisible(m_actProfileName == index);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Preferences::saveSettings()
|
void Preferences::saveSettings()
|
||||||
|
@ -448,7 +448,7 @@
|
|||||||
</spacer>
|
</spacer>
|
||||||
</item>
|
</item>
|
||||||
<item row="9" column="1" colspan="2">
|
<item row="9" column="1" colspan="2">
|
||||||
<widget class="QLabel" name="label_36">
|
<widget class="QLabel" name="cannotDeleteActiveProfileLabel">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Note: You cannot delete active profile.</string>
|
<string>Note: You cannot delete active profile.</string>
|
||||||
</property>
|
</property>
|
||||||
|
Loading…
Reference in New Issue
Block a user