From 4f3bddf7ef163c3106ba973123cbc657ebaf4b74 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Thu, 20 Aug 2009 21:38:59 +0000 Subject: [PATCH] Apply patch from mantis 2761 from tinram to add padding and make a string translatable. git-svn-id: svn://localhost/ardour2/branches/3.0@5561 d708f5d6-7413-0410-9779-e7cbd77b26cf --- gtk2_ardour/midi_port_dialog.cc | 26 ++++++++++++++++++-------- 1 file changed, 18 insertions(+), 8 deletions(-) diff --git a/gtk2_ardour/midi_port_dialog.cc b/gtk2_ardour/midi_port_dialog.cc index d118f1dd8f..26971ffbab 100644 --- a/gtk2_ardour/midi_port_dialog.cc +++ b/gtk2_ardour/midi_port_dialog.cc @@ -4,6 +4,7 @@ #include "pbd/convert.h" #include +#include #include "midi_port_dialog.h" @@ -18,29 +19,38 @@ 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 dialog") + , 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")); + + WindowTitle title(Glib::get_application_name()); + title += _("Add MIDI port"); + set_title(title.get_string()); + 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)); add_button (Stock::CANCEL, RESPONSE_CANCEL); add_button (Stock::ADD, RESPONSE_ACCEPT); + + show_all_children (); } void