-
- note_types.set_popdown_strings (strings);
-
- if (note_type==1.0f)
- note_types.get_entry()->set_text(_("whole (1)"));
- else if (note_type==2.0f)
- note_types.get_entry()->set_text(_("second (2)"));
- else if (note_type==3.0f)
- note_types.get_entry()->set_text(_("third (3)"));
- else if (note_type==4.0f)
- note_types.get_entry()->set_text(_("quarter (4)"));
- else if (note_type==8.0f)
- note_types.get_entry()->set_text(_("eighth (8)"));
- else if (note_type==16.0f)
- note_types.get_entry()->set_text(_("sixteenth (16)"));
- else if (note_type==32.0f)
- note_types.get_entry()->set_text(_("thirty-second (32)"));
- else
- note_types.get_entry()->set_text(_("quarter (4)"));
-
- /* strings.back() just happens to be the longest one to display */
- Gtkmmext::set_usize_to_display_given_text (*(note_types.get_entry()), strings.back(), 7, 7);
-
- hspacer1.set_border_width (5);
- hspacer1.pack_start (note_types, false, false);
- vspacer1.set_border_width (5);
- vspacer1.pack_start (hspacer1, false, false);
-
- hspacer2.set_border_width (5);
- hspacer2.pack_start (bpb_entry, false, false);
- vspacer2.set_border_width (5);
- vspacer2.pack_start (hspacer2, false, false);
-
- note_frame.add (vspacer1);
- bpb_frame.add (vspacer2);
-
- 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);
-
+
+ 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)"));
+ }
+
+ Label* note_label = manage (new Label (_("Note value:"), ALIGN_LEFT, ALIGN_CENTER));
+ Label* bpb_label = manage (new Label (_("Beats per bar:"), ALIGN_LEFT, ALIGN_CENTER));
+ Table* table = manage (new Table (3, 2));
+ table->set_spacings (6);
+
+ table->attach (*bpb_label, 0, 1, 0, 1, FILL|EXPAND, FILL|EXPAND);
+ table->attach (bpb_entry, 1, 2, 0, 1, FILL|EXPAND, FILL|EXPAND);
+ table->attach (*note_label, 0, 1, 1, 2, FILL|EXPAND, FILL|EXPAND);
+ table->attach (note_types, 1, 2, 1, 2, FILL|EXPAND, SHRINK);
+