X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=gtk2_ardour%2Fmidi_port_dialog.cc;h=0f19fde9d6cf83c2b86656fe8667cf0f541919c4;hb=b461bc1dc1970a9e147c43a721d3155f6215f8c7;hp=5fa11ce98779033c0037927e2626e0fa24438692;hpb=77459de9810e5dded2a7375a04f8f856c708b169;p=ardour.git diff --git a/gtk2_ardour/midi_port_dialog.cc b/gtk2_ardour/midi_port_dialog.cc index 5fa11ce987..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 ("Add MIDI port"), - 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