Commit 27130b8d authored by Anthony Fieroni's avatar Anthony Fieroni Committed by David Faure
Browse files

Restore saving of status bar


Signed-off-by: Anthony Fieroni's avatarAnthony Fieroni <bvbfan@abv.bg>
parent 71628283
......@@ -119,7 +119,7 @@ void KonqFrame::saveConfig(KConfigGroup &config, const QString &prefix, const Ko
if (m_pView) {
m_pView->saveConfig(config, prefix, options);
}
//config.writeEntry( QString::fromLatin1( "ShowStatusBar" ).prepend( prefix ), statusbar()->isVisible() );
config.writeEntry( QString::fromLatin1( "ShowStatusBar" ).prepend( prefix ), statusbar()->isVisible() );
if (this == docContainer) {
config.writeEntry(QStringLiteral("docContainer").prepend(prefix), true);
}
......
......@@ -3273,7 +3273,8 @@ void KonqMainWindow::slotClearLocationBar()
void KonqMainWindow::slotForceSaveMainWindowSettings()
{
if (autoSaveSettings()) { // don't do it on e.g. JS window.open windows with no toolbars!
saveAutoSaveSettings();
KConfigGroup config = KSharedConfig::openConfig()->group("MainWindow");
saveMainWindowSettings(config);
}
}
......@@ -4739,6 +4740,26 @@ void KonqMainWindow::readProperties(const KConfigGroup &configGroup)
applyMainWindowSettings(configGroup);
}
void KonqMainWindow::applyMainWindowSettings(const KConfigGroup &config)
{
KParts::MainWindow::applyMainWindowSettings(config);
if (m_currentView) {
/// @Note status bar isn't direct child to main window
QString entry = config.readEntry("StatusBar", "Enabled");
m_currentView->frame()->statusbar()->setVisible(entry != QLatin1String("Disabled"));
}
}
void KonqMainWindow::saveMainWindowSettings(KConfigGroup &config)
{
KParts::MainWindow::saveMainWindowSettings(config);
if (m_currentView) {
/// @Note status bar isn't direct child to main window
config.writeEntry("StatusBar", m_currentView->frame()->statusbar()->isHidden() ? "Disabled" : "Enabled");
config.sync();
}
}
void KonqMainWindow::setInitialFrameName(const QString &name)
{
m_initialFrameName = name;
......
......@@ -112,6 +112,13 @@ public:
*/
void openFilteredUrl(const QString &_url, const QString &_mimeType, bool inNewTab, bool tempFile);
void applyMainWindowSettings(const KConfigGroup &config) override;
/**
* It's not override since KMainWindow variant isn't virtual
*/
void saveMainWindowSettings(KConfigGroup &config);
public Q_SLOTS:
/**
* The main openUrl method.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment