Session info for debug window

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32664 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Pavel Sanda 2009-12-28 21:55:50 +00:00
parent 3f8620eb33
commit 0e85a05d42
3 changed files with 20 additions and 3 deletions

View File

@ -17,6 +17,7 @@
#include "support/debug.h"
#include <QSettings>
#include <QTime>
@ -71,6 +72,21 @@ void GuiProgressView::appendText(QString const & text)
widget_->outTE->ensureCursorVisible();
}
void GuiProgressView::saveSession() const
{
Dialog::saveSession();
QSettings settings;
settings.setValue(
sessionKey() + "/autoclear", widget_->autoClearCB->isChecked());
}
void GuiProgressView::restoreSession()
{
DockView::restoreSession();
QSettings settings;
widget_->autoClearCB->setChecked(
settings.value(sessionKey() + "/autoclear", true).toBool());
}
Dialog * createGuiProgressView(GuiView & guiview)

View File

@ -20,9 +20,6 @@
#include <string>
#include <QDockWidget>
#include "qt_helpers.h"
namespace lyx {
namespace frontend {
@ -57,6 +54,8 @@ public:
bool canApplyToReadOnly() const { return true; }
void updateView() {}
bool wantInitialFocus() const { return false; }
void restoreSession();
void saveSession() const;
///@}
private Q_SLOTS:

View File

@ -466,6 +466,8 @@ bool GuiView::restoreLayout()
dialog->prepareView();
if ((dialog = findOrBuild("view-source", true)))
dialog->prepareView();
if ((dialog = findOrBuild("progress", true)))
dialog->prepareView();
if (!restoreState(settings.value("layout").toByteArray(), 0))
initToolbars();