X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=gtk2_ardour%2Fmidi_port_dialog.cc;h=cbf2ca571b146d0295bb03958a735202cbd409c4;hb=14fb1367a2fa1d79c282be36df0d7443c081aee2;hp=6e692c6eac2bc86489524c77159f362e0e3b6ac2;hpb=e0aaed6d65f160c328cb8b56d7c6552ee15d65e2;p=ardour.git diff --git a/gtk2_ardour/midi_port_dialog.cc b/gtk2_ardour/midi_port_dialog.cc index 6e692c6eac..cbf2ca571b 100644 --- a/gtk2_ardour/midi_port_dialog.cc +++ b/gtk2_ardour/midi_port_dialog.cc @@ -1,3 +1,22 @@ +/* + 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 @@ -13,34 +32,37 @@ 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_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