- snprintf (buf, sizeof (buf), "%.2f", bpm);
- bpm_entry.set_text (buf);
- bpm_entry.select_region (0, -1);
-
- hspacer1.set_border_width (5);
- hspacer1.pack_start (bpm_entry, false, false);
- vspacer1.set_border_width (5);
- vspacer1.pack_start (hspacer1, false, false);
-
- bpm_frame.add (vspacer1);
-
- button_box.set_border_width (10);
- button_box.set_spacing (5);
- button_box.set_homogeneous (true);
- button_box.pack_start (ok_button);
- button_box.pack_start (cancel_button);
-
- vpacker.set_border_width (10);
- vpacker.set_spacing (5);
+ bpm_spinner.set_numeric (true);
+ bpm_spinner.set_digits (2);
+ bpm_spinner.set_wrap (true);
+ bpm_spinner.set_value (bpm);
+
+ strings.push_back (_("whole (1)"));
+ strings.push_back (_("second (2)"));
+ strings.push_back (_("third (3)"));
+ strings.push_back (_("quarter (4)"));
+ strings.push_back (_("eighth (8)"));
+ strings.push_back (_("sixteenth (16)"));
+ strings.push_back (_("thirty-second (32)"));
+
+ set_popdown_strings (note_types, strings, true);
+
+ if (note_type == 1.0f) {
+ note_types.set_active_text (_("whole (1)"));
+ } else if (note_type == 2.0f) {
+ note_types.set_active_text (_("second (2)"));
+ } else if (note_type == 3.0f) {
+ note_types.set_active_text (_("third (3)"));
+ } else if (note_type == 4.0f) {
+ note_types.set_active_text (_("quarter (4)"));
+ } else if (note_type == 8.0f) {
+ note_types.set_active_text (_("eighth (8)"));
+ } else if (note_type == 16.0f) {
+ note_types.set_active_text (_("sixteenth (16)"));
+ } else if (note_type == 32.0f) {
+ note_types.set_active_text (_("thirty-second (32)"));
+ } else {
+ note_types.set_active_text (_("quarter (4)"));
+ }
+
+ Table* table = manage (new Table (3, 3));
+ table->set_spacings (6);
+
+ Label* bpm_label = manage (new Label(_("Beats per minute:"), ALIGN_LEFT, ALIGN_CENTER));
+ table->attach (*bpm_label, 0, 2, 0, 1);
+ table->attach (bpm_spinner, 2, 3, 0, 1);