enough with umpteen "i18n.h" files. Consolidate on pbd/i18n.h
[ardour.git] / gtk2_ardour / midi_port_dialog.cc
index dd74b2cf4d10809771dcc6cb43ca9816aab84eab..20904faa59dadea727921305321118c0a1767fde 100644 (file)
@@ -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 <string>
 #include <sigc++/bind.h>
 #include <gtkmm/stock.h>
 
 #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 ("add MIDI port dialog")
+       : ArdourDialog (_("Add MIDI Port"))
        , 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());
@@ -42,7 +57,7 @@ MidiPortDialog::MidiPortDialog ()
 
        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::CANCEL, RESPONSE_CANCEL);
        add_button (Stock::ADD, RESPONSE_ACCEPT);