From 0c082361f360df8f9af3fdbf0278e92ddf2adb8f Mon Sep 17 00:00:00 2001 From: Ichthyostega Date: Tue, 25 Sep 2018 06:06:54 +0200 Subject: [PATCH] TestControl: hooked up a simple child-dialog (see #1174) ...which gives us already the base functionality required to run the first tests - can be triggered from the Help menu - non-modal dialog (Gtk::Dialog) - attached as child / slave-Window to the current active workspace window - window manager hint to keep it on top - have a notebook control within the dialog - attached (passively) to the UI-Bus --- src/gui/dialog/test-control.hpp | 7 +++-- src/gui/interact/wizard.cpp | 7 ++++- src/gui/interact/wizard.hpp | 1 + wiki/thinkPad.ichthyo.mm | 45 ++++++++++++++++++++++++--------- 4 files changed, 45 insertions(+), 15 deletions(-) diff --git a/src/gui/dialog/test-control.hpp b/src/gui/dialog/test-control.hpp index 8a80485f1..c8d242f8c 100644 --- a/src/gui/dialog/test-control.hpp +++ b/src/gui/dialog/test-control.hpp @@ -39,6 +39,7 @@ #include "gui/gtk-base.hpp" #include "gui/dialog/dialog.hpp" +#include "gui/ctrl/bus-term.hpp" namespace gui { namespace dialog { @@ -46,6 +47,7 @@ namespace dialog { class TestControl : public Gtk::Dialog + , ctrl::BusTerm { Gtk::Notebook notebook_; @@ -53,8 +55,9 @@ namespace dialog { Gtk::Button trigger_1_; public: - TestControl (Gtk::Window &parent) + TestControl (ctrl::BusTerm& upLink, Gtk::Window& parent) : Dialog(_("Test and Diagnostics"), parent, Gtk::DIALOG_DESTROY_WITH_PARENT) + , ctrl::BusTerm{lib::idi::EntryID{}, upLink} , page_1_{Gtk::ORIENTATION_VERTICAL} { using namespace Gtk; @@ -74,7 +77,7 @@ namespace dialog { notebook_.append_page (page_1_, _("#1099")); - show_all_children(); + show_all(); } diff --git a/src/gui/interact/wizard.cpp b/src/gui/interact/wizard.cpp index 88f5d144d..ec5a96871 100644 --- a/src/gui/interact/wizard.cpp +++ b/src/gui/interact/wizard.cpp @@ -34,6 +34,7 @@ #include "gui/interact/spot-locator.hpp" #include "gui/workspace/workspace-window.hpp" #include "gui/panel/infobox-panel.hpp" +#include "gui/dialog/test-control.hpp" #include "gui/ctrl/notification-hub.hpp" #include "gui/ctrl/global-ctx.hpp" #include "lib/format-string.hpp" @@ -124,7 +125,11 @@ namespace interact { void Wizard::launchTestCtrl() { - UNIMPLEMENTED ("create and attach a non-modal child dialog box page"); + if (testControlWindow_) + testControlWindow_->present(); // just (re)show the existing window + else + testControlWindow_ = std::make_unique (globalCtx_.uiBus_.getAccessPoint(), + globalCtx_.windowLoc_.findActiveWindow()); } diff --git a/src/gui/interact/wizard.hpp b/src/gui/interact/wizard.hpp index d57741d45..525ef30b7 100644 --- a/src/gui/interact/wizard.hpp +++ b/src/gui/interact/wizard.hpp @@ -87,6 +87,7 @@ namespace interact { { ctrl::GlobalCtx& globalCtx_; unique_ptr notificationHub_; + unique_ptr testControlWindow_; public: Wizard (ctrl::GlobalCtx&); diff --git a/wiki/thinkPad.ichthyo.mm b/wiki/thinkPad.ichthyo.mm index 8db9c8117..03cdaa014 100644 --- a/wiki/thinkPad.ichthyo.mm +++ b/wiki/thinkPad.ichthyo.mm @@ -2712,10 +2712,10 @@ - - - - + + + + @@ -2723,12 +2723,12 @@ - - + + - + @@ -2746,12 +2746,30 @@ - + + + + + + + + + + + + + - - + + + + + + + + @@ -2759,8 +2777,11 @@ - - + + + + +