fix import/embed with "sequence files" option
[ardour2.git] / gtk2_ardour / midi_port_dialog.cc
blob2bb686d70bd46dfcb61e92722260410d3a557c25
1 #include <string>
2 #include <sigc++/bind.h>
3 #include <gtkmm/stock.h>
5 #include <pbd/convert.h>
6 #include <gtkmm2ext/utils.h>
8 #include "midi_port_dialog.h"
10 #include "i18n.h"
12 using namespace std;
13 using namespace PBD;
14 using namespace Gtk;
15 using namespace Gtkmm2ext;
16 using namespace sigc;
18 static const char* mode_strings[] = { "duplex", "output", "input", (char*) 0 };
20 MidiPortDialog::MidiPortDialog ()
21 : ArdourDialog ("midi_port_dialog"),
22 port_label (_("Port name"))
25 vector<string> str = internationalize (PACKAGE, mode_strings);
26 set_popdown_strings (port_mode_combo, str);
27 port_mode_combo.set_active_text (str.front());
29 hpacker.pack_start (port_label);
30 hpacker.pack_start (port_name);
31 hpacker.pack_start (port_mode_combo);
33 port_label.show ();
34 port_name.show ();
35 port_mode_combo.show ();
36 hpacker.show ();
38 get_vbox()->pack_start (hpacker);
40 port_name.signal_activate().connect (mem_fun (*this, &MidiPortDialog::entry_activated));
42 add_button (Stock::ADD, RESPONSE_ACCEPT);
43 add_button (Stock::CANCEL, RESPONSE_CANCEL);
46 void
47 MidiPortDialog::entry_activated ()
49 response (RESPONSE_ACCEPT);
52 MidiPortDialog::~MidiPortDialog ()