diff --git a/src/frontends/qt4/GuiProgressView.cpp b/src/frontends/qt4/GuiProgressView.cpp index 2e1bb86d0a..4a4c40ab57 100644 --- a/src/frontends/qt4/GuiProgressView.cpp +++ b/src/frontends/qt4/GuiProgressView.cpp @@ -17,6 +17,7 @@ #include "support/debug.h" +#include #include @@ -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) diff --git a/src/frontends/qt4/GuiProgressView.h b/src/frontends/qt4/GuiProgressView.h index 81107521fd..9a22b71307 100644 --- a/src/frontends/qt4/GuiProgressView.h +++ b/src/frontends/qt4/GuiProgressView.h @@ -20,9 +20,6 @@ #include -#include -#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: diff --git a/src/frontends/qt4/GuiView.cpp b/src/frontends/qt4/GuiView.cpp index 00ca3b55be..f6d38e216f 100644 --- a/src/frontends/qt4/GuiView.cpp +++ b/src/frontends/qt4/GuiView.cpp @@ -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();