- 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);
-
- 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)"));
+ 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 (note_type, strings);
+
+ for (x = note_types.begin(); x != note_types.end(); ++x) {
+ if (x->second == divisor) {
+ note_type.set_active_text (x->first);
+ break;
+ }
+ }
+
+ if (x == note_types.end()) {
+ note_type.set_active_text (strings[3]); // "quarter"