changes to help strp silence
[ardour.git] / gtk2_ardour / midi_port_dialog.cc
index 5fa11ce98779033c0037927e2626e0fa24438692..23fb6f1ef2fb25ae379e0cad235a974417e8f4de 100644 (file)
@@ -2,7 +2,7 @@
 #include <sigc++/bind.h>
 #include <gtkmm/stock.h>
 
-#include <pbd/convert.h>
+#include "pbd/convert.h"
 #include <gtkmm2ext/utils.h>
 
 #include "midi_port_dialog.h"
@@ -13,34 +13,40 @@ 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 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"));
+
+       set_title (_("Add MIDI Port"));
+
        vector<string> 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