13
0

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
This commit is contained in:
Carl Hetherington 2009-08-20 21:38:59 +00:00
parent 58dad0c280
commit 4f3bddf7ef

View File

@ -4,6 +4,7 @@
#include "pbd/convert.h" #include "pbd/convert.h"
#include <gtkmm2ext/utils.h> #include <gtkmm2ext/utils.h>
#include <gtkmm2ext/window_title.h>
#include "midi_port_dialog.h" #include "midi_port_dialog.h"
@ -18,29 +19,38 @@ using namespace sigc;
static const char* mode_strings[] = { "duplex", "output", "input", (char*) 0 }; static const char* mode_strings[] = { "duplex", "output", "input", (char*) 0 };
MidiPortDialog::MidiPortDialog () MidiPortDialog::MidiPortDialog ()
: ArdourDialog ("Add MIDI port"), : ArdourDialog ("add MIDI port dialog")
port_label (_("Port name")) , 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<string> str = internationalize (PACKAGE, mode_strings); vector<string> str = internationalize (PACKAGE, mode_strings);
set_popdown_strings (port_mode_combo, str); set_popdown_strings (port_mode_combo, str);
port_mode_combo.set_active_text (str.front()); 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_label);
hpacker.pack_start (port_name); hpacker.pack_start (port_name);
hpacker.pack_start (port_mode_combo); hpacker.pack_start (port_mode_combo);
port_label.show ();
port_name.show ();
port_mode_combo.show ();
hpacker.show ();
get_vbox()->pack_start (hpacker); get_vbox()->pack_start (hpacker);
port_name.signal_activate().connect (mem_fun (*this, &MidiPortDialog::entry_activated)); port_name.signal_activate().connect (mem_fun (*this, &MidiPortDialog::entry_activated));
add_button (Stock::CANCEL, RESPONSE_CANCEL); add_button (Stock::CANCEL, RESPONSE_CANCEL);
add_button (Stock::ADD, RESPONSE_ACCEPT); add_button (Stock::ADD, RESPONSE_ACCEPT);
show_all_children ();
} }
void void