forwardport SVN commit 1185956 by aacid:

rembemer the values of m_menuBarWasShown and m_toolBarWasShown
Patch based in a patch by Victor Blazquez

svn path=/trunk/KDE/kdegraphics/okular/; revision=1185957
remotes/origin/KDE/4.6
Albert Astals Cid 16 years ago
parent 8a4e587931
commit 31dadc6ea3
  1. 16
      shell/shell.cpp

@ -47,6 +47,9 @@
#include "kdocumentviewer.h"
#include "shellutils.h"
static const char *shouldShowMenuBarComingFromFullScreen = "shouldShowMenuBarComingFromFullScreen";
static const char *shouldShowToolBarComingFromFullScreen = "shouldShowToolBarComingFromFullScreen";
Shell::Shell(KCmdLineArgs* args, int argIndex)
: KParts::MainWindow(), m_args(args), m_menuBarWasShown(true), m_toolBarWasShown(true)
{
@ -148,6 +151,12 @@ void Shell::readSettings()
const KConfigGroup group = KGlobal::config()->group( "Desktop Entry" );
bool fullScreen = group.readEntry( "FullScreen", false );
setFullScreen( fullScreen );
if (fullScreen)
{
m_menuBarWasShown = group.readEntry( shouldShowMenuBarComingFromFullScreen, true );
m_toolBarWasShown = group.readEntry( shouldShowToolBarComingFromFullScreen, true );
}
}
void Shell::writeSettings()
@ -155,6 +164,11 @@ void Shell::writeSettings()
m_recent->saveEntries( KGlobal::config()->group( "Recent Files" ) );
KConfigGroup group = KGlobal::config()->group( "Desktop Entry" );
group.writeEntry( "FullScreen", m_fullScreenAction->isChecked() );
if (m_fullScreenAction->isChecked())
{
group.writeEntry( shouldShowMenuBarComingFromFullScreen, m_menuBarWasShown );
group.writeEntry( shouldShowToolBarComingFromFullScreen, m_toolBarWasShown );
}
KGlobal::config()->sync();
}
@ -311,3 +325,5 @@ QSize Shell::sizeHint() const
}
#include "shell.moc"
/* kate: replace-tabs on; indent-width 4; */

Loading…
Cancel
Save