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"
15 using namespace Gtkmm2ext
;
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
);
35 port_mode_combo
.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
);
47 MidiPortDialog::entry_activated ()
49 response (RESPONSE_ACCEPT
);
52 MidiPortDialog::~MidiPortDialog ()