1
mirror of https://invent.kde.org/network/falkon.git synced 2024-11-11 01:22:10 +01:00

[Fix:] Fixed bug with showing/hiding navigation bars

after changing preferences
This commit is contained in:
nowrep 2011-04-04 20:04:29 +02:00
parent 5330dea242
commit 2943c0ca93
4 changed files with 25 additions and 28 deletions

View File

@ -457,13 +457,9 @@ bool MainApplication::saveStateSlot()
settings.endGroup();
QupZilla* qupzilla_ = getWindow();
if (qupzilla_) {
if (qupzilla_)
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;
}

View File

@ -544,13 +544,12 @@ void QupZilla::showPageInfo()
void QupZilla::showBookmarksToolbar()
{
if (m_bookmarksToolbar->isVisible()) {
m_bookmarksToolbar->setVisible(false);
m_actionShowBookmarksToolbar->setChecked(false);
}else{
m_bookmarksToolbar->setVisible(true);
m_actionShowBookmarksToolbar->setChecked(true);
}
bool status = m_bookmarksToolbar->isVisible();
m_bookmarksToolbar->setVisible(!status);
m_actionShowBookmarksToolbar->setChecked(!status);
QSettings settings(activeProfil()+"settings.ini", QSettings::IniFormat);
settings.setValue("Browser-View-Settings/showBookmarksToolbar", !status);
}
void QupZilla::showNavigationToolbar()
@ -558,13 +557,12 @@ void QupZilla::showNavigationToolbar()
if (!menuBar()->isVisible() && !m_actionShowToolbar->isChecked())
showMenubar();
if (m_navigation->isVisible()) {
m_navigation->setVisible(false);
m_actionShowToolbar->setChecked(false);
}else{
m_navigation->setVisible(true);
m_actionShowToolbar->setChecked(true);
}
bool status = m_navigation->isVisible();
m_navigation->setVisible(!status);
m_actionShowToolbar->setChecked(!status);
QSettings settings(activeProfil()+"settings.ini", QSettings::IniFormat);
settings.setValue("Browser-View-Settings/showNavigationToolbar", !status);
}
void QupZilla::showMenubar()
@ -575,17 +573,19 @@ void QupZilla::showMenubar()
menuBar()->setVisible(!menuBar()->isVisible());
m_navigation->actions().at(m_navigation->actions().count()-2)->setVisible(!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()
{
if (statusBar()->isVisible()) {
statusBar()->setVisible(false);
m_actionShowStatusbar->setChecked(false);
}else{
statusBar()->setVisible(true);
m_actionShowStatusbar->setChecked(true);
}
bool status = statusBar()->isVisible();
statusBar()->setVisible(!status);
m_actionShowStatusbar->setChecked(!status);
QSettings settings(activeProfil()+"settings.ini", QSettings::IniFormat);
settings.setValue("Browser-View-Settings/showStatusbar", !status);
}
void QupZilla::showInspector()

View File

@ -466,6 +466,7 @@ void Preferences::deleteProfile()
void Preferences::startProfileIndexChanged(QString index)
{
ui->deleteProfile->setEnabled(m_actProfileName != index);
ui->cannotDeleteActiveProfileLabel->setVisible(m_actProfileName == index);
}
void Preferences::saveSettings()

View File

@ -448,7 +448,7 @@
</spacer>
</item>
<item row="9" column="1" colspan="2">
<widget class="QLabel" name="label_36">
<widget class="QLabel" name="cannotDeleteActiveProfileLabel">
<property name="text">
<string>Note: You cannot delete active profile.</string>
</property>