Catch another windows no-top-level issue
GTK+ on windows is weird on occasion :)
This commit is contained in:
parent
4b30239275
commit
68d910d58c
|
@ -339,4 +339,15 @@ PortInsertWindow::PortInsertWindow (Gtk::Window& parent, ARDOUR::Session* s, std
|
||||||
{
|
{
|
||||||
set_name ("IOSelectorWindow");
|
set_name ("IOSelectorWindow");
|
||||||
add (_portinsertui);
|
add (_portinsertui);
|
||||||
|
_portinsertui.show ();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
PortInsertWindow::PortInsertWindow (ARDOUR::Session* s, std::shared_ptr<ARDOUR::PortInsert> pi)
|
||||||
|
: ArdourWindow (string_compose (_("Port Insert: %1"), pi->name ()))
|
||||||
|
, _portinsertui (this, s, pi)
|
||||||
|
{
|
||||||
|
set_name ("IOSelectorWindow");
|
||||||
|
add (_portinsertui);
|
||||||
|
_portinsertui.show ();
|
||||||
}
|
}
|
||||||
|
|
|
@ -91,6 +91,7 @@ class PortInsertWindow : public ArdourWindow
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
PortInsertWindow (Gtk::Window&, ARDOUR::Session*, std::shared_ptr<ARDOUR::PortInsert>);
|
PortInsertWindow (Gtk::Window&, ARDOUR::Session*, std::shared_ptr<ARDOUR::PortInsert>);
|
||||||
|
PortInsertWindow (ARDOUR::Session*, std::shared_ptr<ARDOUR::PortInsert>);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
PortInsertUI _portinsertui;
|
PortInsertUI _portinsertui;
|
||||||
|
|
|
@ -3984,8 +3984,11 @@ ProcessorBox::get_editor_window (std::shared_ptr<Processor> processor, bool use_
|
||||||
|
|
||||||
if (std::dynamic_pointer_cast<InternalSend> (processor) == 0) {
|
if (std::dynamic_pointer_cast<InternalSend> (processor) == 0) {
|
||||||
Gtk::Window* tlw = dynamic_cast<Gtk::Window*> (get_toplevel ());
|
Gtk::Window* tlw = dynamic_cast<Gtk::Window*> (get_toplevel ());
|
||||||
assert (tlw);
|
if (tlw) {
|
||||||
gidget = new SendUIWindow (*tlw, _session, send);
|
gidget = new SendUIWindow (*tlw, _session, send);
|
||||||
|
} else {
|
||||||
|
gidget = new SendUIWindow (_session, send);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
} else if ((retrn = std::dynamic_pointer_cast<Return> (processor)) != 0) {
|
} else if ((retrn = std::dynamic_pointer_cast<Return> (processor)) != 0) {
|
||||||
|
@ -4047,8 +4050,11 @@ ProcessorBox::get_editor_window (std::shared_ptr<Processor> processor, bool use_
|
||||||
|
|
||||||
if (w == 0) {
|
if (w == 0) {
|
||||||
Gtk::Window* tlw = dynamic_cast<Gtk::Window*> (get_toplevel ());
|
Gtk::Window* tlw = dynamic_cast<Gtk::Window*> (get_toplevel ());
|
||||||
assert (tlw);
|
if (tlw) {
|
||||||
io_selector = new PortInsertWindow (*tlw, _session, port_insert);
|
io_selector = new PortInsertWindow (*tlw, _session, port_insert);
|
||||||
|
} else {
|
||||||
|
io_selector = new PortInsertWindow (_session, port_insert);
|
||||||
|
}
|
||||||
set_processor_ui (port_insert, io_selector);
|
set_processor_ui (port_insert, io_selector);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -159,3 +159,12 @@ SendUIWindow::SendUIWindow (Gtk::Window& parent, ARDOUR::Session* session, std::
|
||||||
add (_ui);
|
add (_ui);
|
||||||
_ui.show ();
|
_ui.show ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
SendUIWindow::SendUIWindow (ARDOUR::Session* session, std::shared_ptr<Send> send)
|
||||||
|
: ArdourWindow (string_compose (_("Send: %1"), send->name ()))
|
||||||
|
, _ui (this, session, send)
|
||||||
|
{
|
||||||
|
set_name ("SendUIWindow");
|
||||||
|
add (_ui);
|
||||||
|
_ui.show ();
|
||||||
|
}
|
||||||
|
|
|
@ -65,6 +65,7 @@ class SendUIWindow : public ArdourWindow
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
SendUIWindow (Gtk::Window&, ARDOUR::Session*, std::shared_ptr<ARDOUR::Send>);
|
SendUIWindow (Gtk::Window&, ARDOUR::Session*, std::shared_ptr<ARDOUR::Send>);
|
||||||
|
SendUIWindow (ARDOUR::Session*, std::shared_ptr<ARDOUR::Send>);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
SendUI _ui;
|
SendUI _ui;
|
||||||
|
|
Loading…
Reference in New Issue