summaryrefslogtreecommitdiff
path: root/gtk2_ardour/global_port_matrix.cc
diff options
context:
space:
mode:
authorCarl Hetherington <carl@carlh.net>2009-02-10 15:45:06 +0000
committerCarl Hetherington <carl@carlh.net>2009-02-10 15:45:06 +0000
commiteef922383510830de4efa8a3096fce011b2e6b9f (patch)
tree0a15339dbe5d1714dcda2ef88216924e64fba05a /gtk2_ardour/global_port_matrix.cc
parentd9b7f2f2457c8c58e8b248d14f850db60df2382c (diff)
Add a rescan button.
git-svn-id: svn://localhost/ardour2/branches/3.0@4519 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/global_port_matrix.cc')
-rw-r--r--gtk2_ardour/global_port_matrix.cc16
1 files changed, 16 insertions, 0 deletions
diff --git a/gtk2_ardour/global_port_matrix.cc b/gtk2_ardour/global_port_matrix.cc
index 24ff101c61..10a28b128d 100644
--- a/gtk2_ardour/global_port_matrix.cc
+++ b/gtk2_ardour/global_port_matrix.cc
@@ -17,6 +17,8 @@
*/
+#include <gtkmm/image.h>
+#include <gtkmm/stock.h>
#include "global_port_matrix.h"
#include "i18n.h"
#include "ardour/bundle.h"
@@ -113,9 +115,23 @@ GlobalPortMatrixWindow::GlobalPortMatrixWindow (ARDOUR::Session& s, ARDOUR::Data
set_title (_("MIDI Connections Manager"));
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 (*this, &GlobalPortMatrixWindow::rescan));
+ buttons_hbox->pack_start (_rescan_button, Gtk::PACK_SHRINK);
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 ();
}
+
+void
+GlobalPortMatrixWindow::rescan ()
+{
+ _port_matrix.setup_all_ports ();
+}