summaryrefslogtreecommitdiff
path: root/gtk2_ardour/global_port_matrix.cc
diff options
context:
space:
mode:
authorCarl Hetherington <carl@carlh.net>2009-07-17 22:54:45 +0000
committerCarl Hetherington <carl@carlh.net>2009-07-17 22:54:45 +0000
commit50437bff22279473cd364d007d5e474af2a542bc (patch)
tree4ebe55e6ac2ae8ded3dfd12a2f1b6e866a9dd6c4 /gtk2_ardour/global_port_matrix.cc
parentb89a786b3e300ce3eb28c4e6791e8e141afb19f9 (diff)
Various tweaks to the port matrix: open to full size; remove buttons and move their functionality into a context menu;
set maximum size hint to stop port matrix windows being resized beyond their useful size; remove visibility checkbuttons - visibility now controlled through menu or by clicking on group names; port groups fold down to a small tab when hidden; don't swap the orientation of the matrix once it has been opened. git-svn-id: svn://localhost/ardour2/branches/3.0@5373 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/global_port_matrix.cc')
-rw-r--r--gtk2_ardour/global_port_matrix.cc34
1 files changed, 17 insertions, 17 deletions
diff --git a/gtk2_ardour/global_port_matrix.cc b/gtk2_ardour/global_port_matrix.cc
index 2b3b9c2131..b19c383565 100644
--- a/gtk2_ardour/global_port_matrix.cc
+++ b/gtk2_ardour/global_port_matrix.cc
@@ -28,6 +28,8 @@
#include "i18n.h"
+using namespace std;
+
GlobalPortMatrix::GlobalPortMatrix (ARDOUR::Session& s, ARDOUR::DataType t)
: PortMatrix (s, t)
{
@@ -119,27 +121,25 @@ GlobalPortMatrixWindow::GlobalPortMatrixWindow (ARDOUR::Session& s, ARDOUR::Data
break;
}
- Gtk::HBox* buttons_hbox = Gtk::manage (new Gtk::HBox);
-
- _rescan_button.set_label (_("Rescan"));
- _rescan_button.set_image (*Gtk::manage (new Gtk::Image (Gtk::Stock::REFRESH, Gtk::ICON_SIZE_BUTTON)));
- _rescan_button.signal_clicked().connect (sigc::mem_fun (_port_matrix, &GlobalPortMatrix::setup_all_ports));
- buttons_hbox->pack_start (_rescan_button, Gtk::PACK_SHRINK);
+ add (_port_matrix);
+ show_all ();
- _show_ports_button.set_label (_("Show individual ports"));
- _show_ports_button.set_active (true);
- _show_ports_button.signal_toggled().connect (sigc::mem_fun (*this, &GlobalPortMatrixWindow::show_ports_toggled));
- buttons_hbox->pack_start (_show_ports_button, Gtk::PACK_SHRINK);
+ /* XXX: hack to make the window full-size on opening. This may not work for
+ people with very large monitors */
- Gtk::VBox* vbox = Gtk::manage (new Gtk::VBox);
- vbox->pack_start (_port_matrix);
- vbox->pack_start (*buttons_hbox, Gtk::PACK_SHRINK);
- add (*vbox);
- show_all ();
+ resize (32768, 32768);
}
void
-GlobalPortMatrixWindow::show_ports_toggled ()
+GlobalPortMatrixWindow::on_realize ()
{
- _port_matrix.set_show_only_bundles (!_show_ports_button.get_active());
+ Window::on_realize ();
+
+ 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);
}