diff --git a/src/gui/ctrl/notification-hub.hpp b/src/gui/ctrl/notification-hub.hpp index 16d25de80..4e84afa0e 100644 --- a/src/gui/ctrl/notification-hub.hpp +++ b/src/gui/ctrl/notification-hub.hpp @@ -179,6 +179,15 @@ namespace ctrl { /** collaboration with a log display allocated elsewhere */ WLink widget_; + + widget::ErrorLogDisplay& + getWidget() + { + if (not widget_) + widget_.connect (allocateWidget_()); + return *widget_; + } + }; diff --git a/src/gui/workspace/dock-area.cpp b/src/gui/workspace/dock-area.cpp index 67918d2fc..e4e5abaff 100644 --- a/src/gui/workspace/dock-area.cpp +++ b/src/gui/workspace/dock-area.cpp @@ -42,6 +42,7 @@ #include "gui/panel/timeline-panel-obsolete.hpp" #include "include/logging.h" +#include "lib/util-foreach.hpp" using namespace boost; ////////////////////////////////////////////////////////////////////////////////TICKET #1071 no wildcard includes please! using namespace std; ////////////////////////////////////////////////////////////////////////////////TICKET #1071 no wildcard includes please! @@ -143,6 +144,15 @@ namespace workspace { } + bool + DockArea::hasPanel (const int description_index) + { + return util::has_any (panels_, [=](panel::Panel* panel) + { + return getPanelType(panel) == description_index; + }); + } + panel::Panel& DockArea::showPanel (const int description_index) { diff --git a/src/gui/workspace/dock-area.hpp b/src/gui/workspace/dock-area.hpp index aaf63275d..683d4cf91 100644 --- a/src/gui/workspace/dock-area.hpp +++ b/src/gui/workspace/dock-area.hpp @@ -125,6 +125,9 @@ namespace workspace { */ panel::Panel& showPanel (const int description_index); + /** was the indicated panel already allocated within this PanelManager's realm? */ + bool hasPanel (const int description_index); + /** * Switches a panel from one type to another, * without touching the underlying GdlDockItem. diff --git a/src/gui/workspace/panel-manager.cpp b/src/gui/workspace/panel-manager.cpp index 8691cac6c..87194261c 100644 --- a/src/gui/workspace/panel-manager.cpp +++ b/src/gui/workspace/panel-manager.cpp @@ -37,6 +37,7 @@ #include "gui/panel/timeline-panel-obsolete.hpp" #include "include/logging.h" +#include "lib/util-foreach.hpp" using namespace boost; ////////////////////////////////////////////////////////////////////////////////TICKET #1071 no wildcard includes please! using namespace std; ////////////////////////////////////////////////////////////////////////////////TICKET #1071 no wildcard includes please! @@ -139,7 +140,10 @@ namespace workspace { bool PanelManager::hasPanel (const int description_index) { - UNIMPLEMENTED ("search for a specific panel"); + return util::has_any (panels_, [=](panel::Panel* panel) + { + return getPanelType(panel) == description_index; + }); } panel::Panel& diff --git a/wiki/thinkPad.ichthyo.mm b/wiki/thinkPad.ichthyo.mm index beaab6ce8..b277797fe 100644 --- a/wiki/thinkPad.ichthyo.mm +++ b/wiki/thinkPad.ichthyo.mm @@ -1608,8 +1608,8 @@ - - + + @@ -1629,9 +1629,9 @@ - + - + @@ -1669,9 +1669,9 @@ - + - + @@ -1682,9 +1682,9 @@ - + - + @@ -1696,10 +1696,10 @@ - + - - + + @@ -1746,7 +1746,7 @@ - + @@ -1820,15 +1820,15 @@ - + - + - + - + @@ -1943,8 +1943,8 @@ - - + + @@ -14536,9 +14536,9 @@ - + - + @@ -14547,7 +14547,7 @@ - + @@ -14559,7 +14559,7 @@ - +