roundabout,
created on Monday, 3 March 2025, 19:34:32 (1741030472),
received on Monday, 3 March 2025, 19:34:34 (1741030474)
Author identity: vlad <vlad.muntoiu@gmail.com>
c28219f3c736424c263d7b38b31c79594de29d28
gpanthera.cc
@@ -122,6 +122,7 @@ namespace gPanthera {
this->stack->remove(*this);
}
this->stack = stack;
this->last_stack = stack;
this->stack->add(*this, this->get_identifier());
if(this->window != nullptr) {
this->window->destroy();
@@ -183,6 +184,13 @@ namespace gPanthera {
DockWindow::DockWindow(DockablePane *pane) {
this->pane = pane;
this->set_child(*pane);
// Can redock, but not disappear
this->set_deletable(false);
this->signal_close_request().connect([this]() {
this->pane->redock(this->pane->last_stack);
return true;
}, false);
}
DockStackSwitcher::DockStackSwitcher(DockStack *stack, Gtk::Orientation orientation) : Gtk::Box(orientation), stack(stack) {
gpanthera.hh
@@ -26,6 +26,7 @@ namespace gPanthera {
Gtk::Widget *child;
std::shared_ptr<LayoutManager> layout;
public:
DockStack *last_stack = nullptr;
DockablePane(std::shared_ptr<LayoutManager> layout, Gtk::Widget &child, const Glib::ustring &name, const Glib::ustring &label, Gtk::Image *icon, DockStack *stack = nullptr, Gtk::Widget *custom_header = nullptr);
Glib::ustring get_identifier() const;
Gtk::Image *get_icon() const;