From 7632d0df7c9f839e7a436b4a0170830d751f5008 Mon Sep 17 00:00:00 2001 From: Scott Gilbertson Date: Sat, 3 Feb 2024 13:13:25 -0500 Subject: [PATCH] Got template help show/hide working (I had been hiding the wrong widget) --- rtgui/batchqueuepanel.cc | 9 +++++++-- rtgui/batchqueuepanel.h | 1 + 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/rtgui/batchqueuepanel.cc b/rtgui/batchqueuepanel.cc index 4e03b2a74..8dfde876c 100644 --- a/rtgui/batchqueuepanel.cc +++ b/rtgui/batchqueuepanel.cc @@ -152,7 +152,7 @@ BatchQueuePanel::BatchQueuePanel (FileCatalog* aFileCatalog) : parent(nullptr) templateHelpTextView = Gtk::manage (new Gtk::TextView()); templateHelpTextView->set_editable(false); templateHelpTextView->set_wrap_mode(Gtk::WRAP_WORD); - Gtk::ScrolledWindow* scrolledTemplateHelpWindow = Gtk::manage(new Gtk::ScrolledWindow()); + scrolledTemplateHelpWindow = Gtk::manage(new Gtk::ScrolledWindow()); scrolledTemplateHelpWindow->add(*templateHelpTextView); { auto helptext = M("QUEUE_LOCATION_TEMPLATE_TOOLTIP"); @@ -388,7 +388,12 @@ bool BatchQueuePanel::canStartNext () void BatchQueuePanel::setDestinationPreviewText(const Glib::ustring &destinationPath) { destinationPreviewLabel->set_text(destinationPath); - templateHelpTextView->hide(); // FIXME: REMOVE TESTING THING + static bool remove_me = false; + remove_me = !remove_me; + if(remove_me) + scrolledTemplateHelpWindow->hide(); // FIXME: REMOVE TESTING THING + else + scrolledTemplateHelpWindow->show(); // FIXME: REMOVE TESTING THING } void BatchQueuePanel::pathFolderButtonPressed () diff --git a/rtgui/batchqueuepanel.h b/rtgui/batchqueuepanel.h index ce04b2257..70cf5d506 100644 --- a/rtgui/batchqueuepanel.h +++ b/rtgui/batchqueuepanel.h @@ -53,6 +53,7 @@ class BatchQueuePanel : public Gtk::Box, RTWindow* parent; BatchQueue* batchQueue; Gtk::TextView* templateHelpTextView; + Gtk::ScrolledWindow* scrolledTemplateHelpWindow; Gtk::Box* bottomBox; Gtk::Box* topBox; Gtk::Paned* middleSplitPane;