NotificationDisplay: turn the error log into an optional display
This commit is contained in:
parent
dcde80c4cd
commit
855944eff3
4 changed files with 83 additions and 12 deletions
|
|
@ -122,7 +122,7 @@ namespace interact {
|
|||
Wizard::allocateErrorLogView()
|
||||
{
|
||||
auto& infoBox = globalCtx_.windowLoc_.locatePanel().find_or_create<panel::InfoBoxPanel>();
|
||||
UNIMPLEMENTED("reach out to attach or allocate a display widget for the error log");
|
||||
return infoBox.getLog();
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -36,9 +36,13 @@
|
|||
|
||||
|
||||
#include "gui/panel/panel.hpp"
|
||||
#include "gui/widget/error-log-display.hpp"
|
||||
|
||||
#include <memory>
|
||||
|
||||
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<widget::ErrorLogDisplay> theLog_;
|
||||
|
||||
void experiment_1();
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1746,6 +1746,26 @@
|
|||
</node>
|
||||
<node COLOR="#338800" CREATED="1533689055601" ID="ID_335901895" MODIFIED="1533689061409" TEXT="InfoboxPanel anlegen">
|
||||
<icon BUILTIN="button_ok"/>
|
||||
<node COLOR="#338800" CREATED="1534523190695" ID="ID_1941760302" MODIFIED="1534524666023" TEXT="ErrorLog bei Bedarf belegen">
|
||||
<arrowlink COLOR="#88a8b3" DESTINATION="ID_1806645586" ENDARROW="Default" ENDINCLINATION="-186;-20;" ID="Arrow_ID_948128706" STARTARROW="None" STARTINCLINATION="-4;127;"/>
|
||||
<linktarget COLOR="#7ca8bc" DESTINATION="ID_1941760302" ENDARROW="Default" ENDINCLINATION="-1967;5936;" ID="Arrow_ID_192358692" SOURCE="ID_329149746" STARTARROW="None" STARTINCLINATION="670;0;"/>
|
||||
<icon BUILTIN="button_ok"/>
|
||||
<node COLOR="#338800" CREATED="1534523686836" ID="ID_1130300208" MODIFIED="1534524660559" TEXT="per smart-ptr halten">
|
||||
<icon BUILTIN="button_ok"/>
|
||||
</node>
|
||||
<node COLOR="#338800" CREATED="1534523712521" ID="ID_1958771642" MODIFIED="1534524648697" TEXT="access-API">
|
||||
<icon BUILTIN="button_ok"/>
|
||||
<node CREATED="1534523785342" ID="ID_1532375846" MODIFIED="1534524656476" TEXT="Löschen nicht vorgesehen">
|
||||
<icon BUILTIN="yes"/>
|
||||
</node>
|
||||
<node CREATED="1534523790798" ID="ID_497989103" MODIFIED="1534523799758" TEXT="man kann ja das Panel schließen">
|
||||
<icon BUILTIN="idea"/>
|
||||
</node>
|
||||
</node>
|
||||
<node BACKGROUND_COLOR="#eee5c3" COLOR="#990000" CREATED="1534523721263" ID="ID_830255345" MODIFIED="1534523747373" TEXT="zuklappbar">
|
||||
<icon BUILTIN="hourglass"/>
|
||||
</node>
|
||||
</node>
|
||||
</node>
|
||||
<node COLOR="#338800" CREATED="1533689065976" ID="ID_1456563113" MODIFIED="1534119944991" TEXT="NotificationController im Wizzard ansiedeln">
|
||||
<icon BUILTIN="full-1"/>
|
||||
|
|
@ -1811,8 +1831,9 @@
|
|||
<icon BUILTIN="flag-yellow"/>
|
||||
</node>
|
||||
</node>
|
||||
<node BACKGROUND_COLOR="#eee5c3" COLOR="#990000" CREATED="1533689120536" ID="ID_1806645586" MODIFIED="1534451691196" TEXT="View belegen">
|
||||
<node BACKGROUND_COLOR="#eee5c3" COLOR="#990000" CREATED="1533689120536" ID="ID_1806645586" MODIFIED="1534523234064" TEXT="View belegen">
|
||||
<linktarget COLOR="#726b86" DESTINATION="ID_1806645586" ENDARROW="Default" ENDINCLINATION="232;27;" ID="Arrow_ID_246715972" SOURCE="ID_1305015272" STARTARROW="None" STARTINCLINATION="180;-21;"/>
|
||||
<linktarget COLOR="#88a8b3" DESTINATION="ID_1806645586" ENDARROW="Default" ENDINCLINATION="-186;-20;" ID="Arrow_ID_948128706" SOURCE="ID_1941760302" STARTARROW="None" STARTINCLINATION="-4;127;"/>
|
||||
<icon BUILTIN="flag-yellow"/>
|
||||
</node>
|
||||
<node BACKGROUND_COLOR="#eee5c3" COLOR="#990000" CREATED="1533689125583" ID="ID_1077285383" MODIFIED="1533689142951" TEXT="mit close-signal verdrahten">
|
||||
|
|
@ -16243,7 +16264,23 @@
|
|||
</node>
|
||||
</node>
|
||||
</node>
|
||||
<node CREATED="1504200915915" ID="ID_335470074" MODIFIED="1518487921084" TEXT="später wird das ein nichtmodaler Parameter-Editor"/>
|
||||
<node CREATED="1534523269133" ID="ID_403796438" MODIFIED="1534523275983" TEXT="interne Struktur">
|
||||
<node CREATED="1534523277547" ID="ID_1662503806" MODIFIED="1534523282527" TEXT="FelerLog-Anzeige">
|
||||
<node COLOR="#338800" CREATED="1534523283443" ID="ID_329149746" MODIFIED="1534524676311" TEXT="erst bei Bedarf belegen">
|
||||
<arrowlink COLOR="#7ca8bc" DESTINATION="ID_1941760302" ENDARROW="Default" ENDINCLINATION="-1967;5936;" ID="Arrow_ID_192358692" STARTARROW="None" STARTINCLINATION="670;0;"/>
|
||||
<icon BUILTIN="button_ok"/>
|
||||
</node>
|
||||
<node BACKGROUND_COLOR="#eee5c3" COLOR="#990000" CREATED="1534523296448" ID="ID_734584528" MODIFIED="1534523306232" TEXT="zuklappbar">
|
||||
<icon BUILTIN="hourglass"/>
|
||||
</node>
|
||||
<node BACKGROUND_COLOR="#eee5c3" COLOR="#990000" CREATED="1534523292305" ID="ID_1595061322" MODIFIED="1534523310503" TEXT="Platzhalter">
|
||||
<icon BUILTIN="flag-yellow"/>
|
||||
</node>
|
||||
</node>
|
||||
</node>
|
||||
<node CREATED="1504200915915" ID="ID_335470074" MODIFIED="1534523149889" TEXT="später wird das ein nichtmodaler Parameter-Editor">
|
||||
<arrowlink DESTINATION="ID_1405249171" ENDARROW="Default" ENDINCLINATION="222;-82;" ID="Arrow_ID_1395046288" STARTARROW="None" STARTINCLINATION="644;0;"/>
|
||||
</node>
|
||||
</node>
|
||||
</node>
|
||||
<node CREATED="1504833434094" ID="ID_349655067" MODIFIED="1518487921084">
|
||||
|
|
@ -16486,7 +16523,16 @@
|
|||
<node CREATED="1504833565425" ID="ID_529173859" MODIFIED="1518487921084" TEXT="Timeline"/>
|
||||
<node CREATED="1504833569692" ID="ID_1708962269" MODIFIED="1518487921084" TEXT="Viewer"/>
|
||||
<node CREATED="1504833572687" ID="ID_57378390" MODIFIED="1518487921084" TEXT="(Asset)Bin"/>
|
||||
<node CREATED="1504833574246" ID="ID_897436866" MODIFIED="1518487921084" TEXT="Infobox"/>
|
||||
<node CREATED="1504833574246" ID="ID_897436866" MODIFIED="1518487921084" TEXT="Infobox">
|
||||
<node CREATED="1534523010591" ID="ID_1405249171" MODIFIED="1534523149890" TEXT="Zentrale Informationsanzeigen">
|
||||
<linktarget COLOR="#a9b4c1" DESTINATION="ID_1405249171" ENDARROW="Default" ENDINCLINATION="222;-82;" ID="Arrow_ID_1395046288" SOURCE="ID_335470074" STARTARROW="None" STARTINCLINATION="644;0;"/>
|
||||
</node>
|
||||
<node CREATED="1534523024189" ID="ID_215944418" MODIFIED="1534523027438" TEXT="Fehlerlog">
|
||||
<node CREATED="1534523031493" ID="ID_1146002742" MODIFIED="1534523041375" TEXT="wird bei erstem Bedarf belegt"/>
|
||||
<node CREATED="1534523042035" ID="ID_1292242862" MODIFIED="1534523047246" TEXT="klappt bei Fehlern auf"/>
|
||||
</node>
|
||||
<node CREATED="1534523020334" ID="ID_295859017" MODIFIED="1534523021658" TEXT="Status"/>
|
||||
</node>
|
||||
<node CREATED="1504833575700" ID="ID_1470115932" MODIFIED="1518487921084" TEXT="Playcontrol"/>
|
||||
</node>
|
||||
</node>
|
||||
|
|
|
|||
Loading…
Reference in a new issue