X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=gtk2_ardour%2Fmidi_port_dialog.cc;h=20904faa59dadea727921305321118c0a1767fde;hb=bcee4e151867dab8c54b38efe101f90e34b1b70e;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..20904faa59 100644 --- a/gtk2_ardour/midi_port_dialog.cc +++ b/gtk2_ardour/midi_port_dialog.cc @@ -1,46 +1,68 @@ +/* + Copyright (C) 2012 Paul Davis + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + +*/ + #include #include #include -#include +#include "pbd/convert.h" #include #include "midi_port_dialog.h" -#include "i18n.h" +#include "pbd/i18n.h" 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_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