diff --git a/src/gui/interact/wizard.cpp b/src/gui/interact/wizard.cpp index 35f288963..16aee2056 100644 --- a/src/gui/interact/wizard.cpp +++ b/src/gui/interact/wizard.cpp @@ -122,7 +122,7 @@ namespace interact { Wizard::allocateErrorLogView() { auto& infoBox = globalCtx_.windowLoc_.locatePanel().find_or_create(); - UNIMPLEMENTED("reach out to attach or allocate a display widget for the error log"); + return infoBox.getLog(); } diff --git a/src/gui/panel/infobox-panel.cpp b/src/gui/panel/infobox-panel.cpp index 0f4330e50..7e3d2c0d4 100644 --- a/src/gui/panel/infobox-panel.cpp +++ b/src/gui/panel/infobox-panel.cpp @@ -27,6 +27,7 @@ #include "gui/gtk-base.hpp" #include "gui/panel/infobox-panel.hpp" +#include "gui/widget/error-log-display.hpp" #include "lib/format-string.hpp" using util::_Fmt; @@ -35,12 +36,15 @@ using Glib::ustring; namespace gui { namespace panel{ + using widget::ErrorLogDisplay; + + InfoBoxPanel::InfoBoxPanel (workspace::PanelManager& panelManager, Gdl::DockItem& dockItem) : Panel(panelManager, dockItem, getTitle(), getStockID()) , twoParts_{Gtk::ORIENTATION_VERTICAL} , buttons_{} , frame_{"UI Integration Experiments"} - , errorLog_{} + , theLog_{} { twoParts_.pack_start(frame_); twoParts_.pack_start(buttons_, Gtk::PACK_SHRINK); @@ -56,10 +60,7 @@ namespace panel{ buttons_.add (button_1_); //(End)buttons... - frame_.set_border_width (5); - frame_.add (errorLog_); - - // show everything.... + // show initial configuration.... this->add (twoParts_); this->show_all(); } @@ -77,6 +78,23 @@ namespace panel{ } + /** on demand allocate display of information / error log + * @note we assume it stays alive forever, once allocated + * @todo add possibility to collapse it + */ + ErrorLogDisplay& + InfoBoxPanel::getLog() + { + if (not theLog_) + { + theLog_.reset (new ErrorLogDisplay{}); + frame_.set_border_width (5); + frame_.add (*theLog_); + frame_.show_all(); ///////////////TODO necessary? + } + return *theLog_; + } + void InfoBoxPanel::experiment_1() @@ -86,7 +104,7 @@ namespace panel{ static uint bangNo{0}; static _Fmt msgTemplate{"Bang #%d\n"}; - errorLog_.showMsg(NOTE_WARN, msgTemplate % ++bangNo); + getLog().showMsg(NOTE_WARN, msgTemplate % ++bangNo); } diff --git a/src/gui/panel/infobox-panel.hpp b/src/gui/panel/infobox-panel.hpp index b97060852..eeaa43df9 100644 --- a/src/gui/panel/infobox-panel.hpp +++ b/src/gui/panel/infobox-panel.hpp @@ -36,9 +36,13 @@ #include "gui/panel/panel.hpp" -#include "gui/widget/error-log-display.hpp" + +#include namespace gui { +namespace widget { + class ErrorLogDisplay; +} namespace panel{ class InfoBoxPanel @@ -57,12 +61,15 @@ namespace panel{ static const char* getTitle(); ///< @deprecated need better design of the PanelManager /////TICKET #1026 static const gchar* getStockID(); + widget::ErrorLogDisplay& getLog(); + private: Gtk::Box twoParts_; Gtk::ButtonBox buttons_; Gtk::Button button_1_; Gtk::Frame frame_; - widget::ErrorLogDisplay errorLog_; + + std::unique_ptr theLog_; void experiment_1(); }; diff --git a/wiki/thinkPad.ichthyo.mm b/wiki/thinkPad.ichthyo.mm index 60a3d07f4..c7d05857e 100644 --- a/wiki/thinkPad.ichthyo.mm +++ b/wiki/thinkPad.ichthyo.mm @@ -1746,6 +1746,26 @@ + + + + + + + + + + + + + + + + + + + + @@ -1811,8 +1831,9 @@ - + + @@ -16243,7 +16264,23 @@ - + + + + + + + + + + + + + + + + + @@ -16486,7 +16523,16 @@ - + + + + + + + + + +