Switch off fullscreen before closing a window.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@24957 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Abdelrazak Younes 2008-05-27 12:01:50 +00:00
parent 0b5323587f
commit 5c0c53ccf8
2 changed files with 12 additions and 5 deletions

View File

@ -512,9 +512,9 @@ void GuiView::closeEvent(QCloseEvent * close_event)
// Make sure that nothing will use this close to be closed View.
guiApp->unregisterView(this);
// Save toolbars configuration
if (isFullScreen()) {
// d.toolbars_->toggleFullScreen(!isFullScreen());
// Switch off fullscreen before closing.
toggleFullScreen();
updateDialogs();
}
@ -1980,11 +1980,17 @@ void GuiView::lfunUiToggle(FuncRequest const & cmd)
return;
}
#endif
if (arg != "fullscreen") {
message(bformat("LFUN_UI_TOGGLE " + _("%1$s unknown command!"), from_utf8(arg)));
if (arg == "fullscreen") {
toggleFullScreen();
return;
}
message(bformat("LFUN_UI_TOGGLE " + _("%1$s unknown command!"), from_utf8(arg)));
}
void GuiView::toggleFullScreen()
{
QSettings settings;
QString const key = "view-" + QString::number(id_);

View File

@ -253,7 +253,8 @@ private:
void initToolbars();
///
void lfunUiToggle(FuncRequest const & cmd);
///
void toggleFullScreen();
///
void insertLyXFile(docstring const & fname);
///