+ bpm_spinner.set_alignment (1.0);
+
+ end_bpm_spinner.set_numeric (true);
+ end_bpm_spinner.set_digits (3);
+ end_bpm_spinner.set_wrap (true);
+ end_bpm_spinner.set_value (end_bpm);
+ end_bpm_spinner.set_alignment (1.0);
+
+ Gtkmm2ext::set_size_request_to_display_given_text (pulse_selector, _("one-hundred-twenty-eighth"), 3, 6);
+
+ note_types.insert (make_pair (_("whole"), 1.0));
+ strings.push_back (_("whole"));
+ note_types.insert (make_pair (_("second"), 2.0));
+ strings.push_back (_("second"));
+ note_types.insert (make_pair (_("third"), 3.0));
+ strings.push_back (_("third"));
+ note_types.insert (make_pair (_("quarter"), 4.0));
+ strings.push_back (_("quarter"));
+ note_types.insert (make_pair (_("eighth"), 8.0));
+ strings.push_back (_("eighth"));
+ note_types.insert (make_pair (_("sixteenth"), 16.0));
+ strings.push_back (_("sixteenth"));
+ note_types.insert (make_pair (_("thirty-second"), 32.0));
+ strings.push_back (_("thirty-second"));
+ note_types.insert (make_pair (_("sixty-fourth"), 64.0));
+ strings.push_back (_("sixty-fourth"));
+ note_types.insert (make_pair (_("one-hundred-twenty-eighth"), 128.0));
+ strings.push_back (_("one-hundred-twenty-eighth"));
+
+ set_popdown_strings (pulse_selector, strings);
+
+ for (x = note_types.begin(); x != note_types.end(); ++x) {
+ if (x->second == note_type) {
+ pulse_selector.set_active_text (x->first);
+ break;
+ }
+ }
+
+ if (x == note_types.end()) {
+ pulse_selector.set_active_text (strings[3]); // "quarter"
+ }
+
+ strings.clear();
+
+ tempo_types.insert (make_pair (_("ramped"), TempoSection::Ramp));
+ strings.push_back (_("ramped"));
+ tempo_types.insert (make_pair (_("constant"), TempoSection::Constant));
+ strings.push_back (_("constant"));
+ set_popdown_strings (tempo_type, strings);
+ TempoTypes::iterator tt;
+ for (tt = tempo_types.begin(); tt != tempo_types.end(); ++tt) {
+ if (tt->second == type) {
+ tempo_type.set_active_text (tt->first);
+ break;
+ }
+ }
+ if (tt == tempo_types.end()) {
+ tempo_type.set_active_text (strings[1]); // "constant"
+ }
+
+ strings.clear();
+
+ lock_styles.insert (make_pair (_("music"), MusicTime));
+ strings.push_back (_("music"));
+ lock_styles.insert (make_pair (_("audio"), AudioTime));
+ strings.push_back (_("audio"));
+ set_popdown_strings (lock_style, strings);
+ LockStyles::iterator ls;
+ for (ls = lock_styles.begin(); ls != lock_styles.end(); ++ls) {
+ if (ls->second == style) {
+ lock_style.set_active_text (ls->first);
+ break;
+ }
+ }
+ if (ls == lock_styles.end()) {
+ lock_style.set_active_text (strings[0]); // "music"
+ }
+
+ Table* table;
+
+ if (UIConfiguration::instance().get_allow_non_quarter_pulse()) {
+ table = manage (new Table (5, 7));
+ } else {
+ table = manage (new Table (5, 6));
+ }
+
+ table->set_spacings (6);
+ table->set_homogeneous (false);
+
+ int row = 0;
+
+ if (UIConfiguration::instance().get_allow_non_quarter_pulse()) {
+ table->attach (pulse_selector_label, 0, 1, row, row + 1);
+ table->attach (pulse_selector, 1, 5, row, row + 1);
+
+ ++row;
+ }
+
+ Label* bpm_label = manage (new Label(_("Start Beats per Minute:"), ALIGN_LEFT, ALIGN_CENTER));
+ table->attach (*bpm_label, 0, 1, row, row + 1);
+ table->attach (bpm_spinner, 1, 5, row, row + 1);
+ ++row;
+
+ table->attach (_end_bpm_label, 0, 1, row, row + 1);
+ table->attach (end_bpm_spinner, 1, 5, row, row + 1);
+ ++row;
+
+ Label* tempo_type_label = manage (new Label(_("Tempo Type:"), ALIGN_LEFT, ALIGN_CENTER));
+ table->attach (*tempo_type_label, 0, 1, row, row + 1);
+ table->attach (tempo_type, 1, 5, row, row + 1);
+
+ ++row;
+
+ char buf[64];
+
+ snprintf (buf, sizeof (buf), "%" PRIu32, when.bars);
+ when_bar_entry.set_text (buf);
+ snprintf (buf, sizeof (buf), "%" PRIu32, when.beats);
+ when_beat_entry.set_text (buf);
+
+ if (!initial) {
+ when_bar_entry.set_width_chars(4);
+ when_beat_entry.set_width_chars (4);
+ when_bar_entry.set_alignment (1.0);
+ when_beat_entry.set_alignment (1.0);