diff options
Diffstat (limited to 'gtk2_ardour/global_port_matrix.cc')
-rw-r--r-- | gtk2_ardour/global_port_matrix.cc | 37 |
1 files changed, 6 insertions, 31 deletions
diff --git a/gtk2_ardour/global_port_matrix.cc b/gtk2_ardour/global_port_matrix.cc index 64ed8e04d9..3e8eea8866 100644 --- a/gtk2_ardour/global_port_matrix.cc +++ b/gtk2_ardour/global_port_matrix.cc @@ -30,8 +30,8 @@ using namespace std; -GlobalPortMatrix::GlobalPortMatrix (ARDOUR::Session& s, ARDOUR::DataType t) - : PortMatrix (s, t) +GlobalPortMatrix::GlobalPortMatrix (Gtk::Window* p, ARDOUR::Session& s, ARDOUR::DataType t) + : PortMatrix (p, s, t) { setup_all_ports (); } @@ -110,7 +110,7 @@ GlobalPortMatrix::get_state (ARDOUR::BundleChannel c[2]) const } GlobalPortMatrixWindow::GlobalPortMatrixWindow (ARDOUR::Session& s, ARDOUR::DataType t) - : _port_matrix (s, t) + : _port_matrix (this, s, t) { switch (t) { case ARDOUR::DataType::AUDIO: @@ -128,36 +128,11 @@ GlobalPortMatrixWindow::GlobalPortMatrixWindow (ARDOUR::Session& s, ARDOUR::Data people with very large monitors */ resize (32768, 32768); - - _port_matrix.MaxSizeChanged.connect (mem_fun (*this, &GlobalPortMatrixWindow::max_size_changed)); -} - -void -GlobalPortMatrixWindow::on_realize () -{ - Window::on_realize (); - set_max_size (); -} - -void -GlobalPortMatrixWindow::max_size_changed () -{ - set_max_size (); - resize (32768, 32768); } void -GlobalPortMatrixWindow::set_max_size () +GlobalPortMatrixWindow::on_show () { - if ((get_flags() & Gtk::REALIZED) == 0) { - return; - } - - pair<uint32_t, uint32_t> const m = _port_matrix.max_size (); - - GdkGeometry g; - g.max_width = m.first; - g.max_height = m.second; - - set_geometry_hints (*this, g, Gdk::HINT_MAX_SIZE); + Gtk::Window::on_show (); + _port_matrix.setup_max_size (); } |