X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=gtk2_ardour%2Fmidi_port_dialog.cc;h=0f19fde9d6cf83c2b86656fe8667cf0f541919c4;hb=e12432cc632125821d6ed192d129ef385fb25002;hp=2bb686d70bd46dfcb61e92722260410d3a557c25;hpb=b9b6ba8be490622dff662c23d9c77c9eee1291b3;p=ardour.git diff --git a/gtk2_ardour/midi_port_dialog.cc b/gtk2_ardour/midi_port_dialog.cc index 2bb686d70b..0f19fde9d6 100644 --- a/gtk2_ardour/midi_port_dialog.cc +++ b/gtk2_ardour/midi_port_dialog.cc @@ -2,7 +2,7 @@ #include #include -#include +#include "pbd/convert.h" #include #include "midi_port_dialog.h" @@ -13,34 +13,38 @@ using namespace std; using namespace PBD; using namespace Gtk; using namespace Gtkmm2ext; -using namespace sigc; static const char* mode_strings[] = { "duplex", "output", "input", (char*) 0 }; MidiPortDialog::MidiPortDialog () - : ArdourDialog ("midi_port_dialog"), - port_label (_("Port name")) - + : ArdourDialog (_("Add MIDI Port")) + , port_label (_("Port name:")) { + set_modal (true); + set_skip_taskbar_hint (true); + set_resizable (false); + set_position (Gtk::WIN_POS_MOUSE); + set_name (N_("MidiPortDialog")); + vector str = internationalize (PACKAGE, mode_strings); set_popdown_strings (port_mode_combo, str); port_mode_combo.set_active_text (str.front()); + hpacker.set_spacing (6); + hpacker.set_border_width (5); + hpacker.pack_start (port_label); hpacker.pack_start (port_name); hpacker.pack_start (port_mode_combo); - port_label.show (); - port_name.show (); - port_mode_combo.show (); - hpacker.show (); - get_vbox()->pack_start (hpacker); - port_name.signal_activate().connect (mem_fun (*this, &MidiPortDialog::entry_activated)); + port_name.signal_activate().connect (sigc::mem_fun (*this, &MidiPortDialog::entry_activated)); - add_button (Stock::ADD, RESPONSE_ACCEPT); add_button (Stock::CANCEL, RESPONSE_CANCEL); + add_button (Stock::ADD, RESPONSE_ACCEPT); + + show_all_children (); } void