+
+TransportMastersWidget::AddTransportMasterDialog::AddTransportMasterDialog ()
+ : ArdourDialog (_("Add Transport Master"), true, false)
+ , name_label (_("Name"))
+ , type_label (_("Type"))
+{
+ name_hbox.set_spacing (6);
+ name_hbox.pack_start (name_label, false, false);
+ name_hbox.pack_start (name_entry, true, true);
+
+ type_hbox.set_spacing (6);
+ type_hbox.pack_start (type_label, false, false);
+ type_hbox.pack_start (type_combo, true, true);
+
+ vector<string> s;
+
+ s.push_back (X_("MTC"));
+ s.push_back (X_("LTC"));
+ s.push_back (X_("MIDI Clock"));
+
+ set_popdown_strings (type_combo, s);
+ type_combo.set_active_text (X_("LTC"));
+
+ get_vbox()->pack_start (name_hbox, false, false);
+ get_vbox()->pack_start (type_hbox, false, false);
+
+ add_button (_("Cancel"), RESPONSE_CANCEL);
+ add_button (_("Add"), RESPONSE_ACCEPT);
+
+ name_entry.show ();
+ type_combo.show ();
+ name_label.show ();
+ type_label.show ();
+ name_hbox.show ();
+ type_hbox.show ();
+
+ name_entry.signal_activate().connect (sigc::bind (sigc::mem_fun (*this, &Gtk::Dialog::response), Gtk::RESPONSE_ACCEPT));
+}
+
+string
+TransportMastersWidget::AddTransportMasterDialog::get_name () const
+{
+ return name_entry.get_text ();
+}
+
+SyncSource
+TransportMastersWidget::AddTransportMasterDialog::get_type() const
+{
+ string t = type_combo.get_active_text ();
+
+ if (t == X_("MTC")) {
+ return MTC;
+ } else if (t == X_("MIDI Clock")) {
+ return MIDIClock;
+ }
+
+ return LTC;
+}