another redirect dialog fix
[ardour.git] / gtk2_ardour / add_route_dialog.cc
index 1dcddaa8309209e0b65e412838882fa29f410eba..ea8233ff5216a85d4d6497b6e9752b3af46e6322 100644 (file)
@@ -15,7 +15,6 @@
     along with this program; if not, write to the Free Software
     Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 
-    $Id$
 */
 
 #include <cstdio>
@@ -38,19 +37,20 @@ using namespace std;
 using namespace PBD;
 
 static const char* channel_setup_names[] = {
-       "Mono",
-       "Stereo",
-       "3 Channels",
-       "4 Channels",
-       "6 Channels",
-       "8 Channels",
-       "Manual Setup",
+       N_("Mono"),
+       N_("Stereo"),
+       N_("3 Channels"),
+       N_("4 Channels"),
+       N_("6 Channels"),
+       N_("8 Channels"),
+       N_("Manual Setup"),
+       "MIDI",
        0
 };
 
 static const char* track_mode_names[] = {
-       "Normal",
-       "Tape",
+       N_("Normal"),
+       N_("Tape"),
        0
 };
 
@@ -148,7 +148,7 @@ AddRouteDialog::track_type_chosen ()
        if (track_button.get_active()) {
                track_mode_combo.set_sensitive (true);
        } else {
-               track_mode_combo.set_sensitive (true);
+               track_mode_combo.set_sensitive (false);
        }
 }
 
@@ -158,6 +158,18 @@ AddRouteDialog::track ()
        return track_button.get_active ();
 }
 
+ARDOUR::DataType
+AddRouteDialog::type ()
+{
+       // FIXME: ew
+       
+       const string str = channel_combo.get_active_text();
+       if (str == _("MIDI"))
+               return ARDOUR::DataType::MIDI;
+       else
+               return ARDOUR::DataType::AUDIO;
+}
+
 string
 AddRouteDialog::name_template ()
 {
@@ -193,7 +205,7 @@ AddRouteDialog::channels ()
        string str = channel_combo.get_active_text();
        int chns;
 
-       if (str == _("Mono")) {
+       if (str == _("Mono") || str == _("MIDI")) {
                return 1;
        } else if (str == _("Stereo")) {
                return 2;