summaryrefslogtreecommitdiff
path: root/gtk2_ardour/global_port_matrix.cc
diff options
context:
space:
mode:
authorCarl Hetherington <carl@carlh.net>2009-07-22 01:28:31 +0000
committerCarl Hetherington <carl@carlh.net>2009-07-22 01:28:31 +0000
commit272cad6241ababb0e2033f27e0511596b3e32b15 (patch)
tree2f76ee12d5d0a28846b29bdcf811369c4f0d386a /gtk2_ardour/global_port_matrix.cc
parent718659344277514acd05fbb8ffee30134a6cf66a (diff)
Various fixups to bundle manager. Add a separator between the benign and more serious menu options on the port matrix context menu. Finally (maybe) fix port matrix sizing issues relatively nicely.
git-svn-id: svn://localhost/ardour2/branches/3.0@5409 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/global_port_matrix.cc')
-rw-r--r--gtk2_ardour/global_port_matrix.cc37
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 ();
}