don't loose a redraw.
[ardour.git] / gtk2_ardour / quantize_dialog.cc
index 397eb23145d42a235c7fffd6d344dd119bbb62c7..98514326d5e9b6ef7c7a7ea081ef4a8a930876ac 100644 (file)
@@ -46,27 +46,18 @@ static const gchar *_grid_strings[] = {
        0
 };
 
-static const gchar *_type_strings[] = {
-       N_("Grid"),
-       N_("Legato"),
-       N_("Groove"),
-       0
-};
-
 std::vector<std::string> QuantizeDialog::grid_strings;
-std::vector<std::string> QuantizeDialog::type_strings;
 
 QuantizeDialog::QuantizeDialog (PublicEditor& e)
        : ArdourDialog (_("Quantize"), false, false)
        , editor (e)
-       , type_label (_("Quantize Type"))
        , strength_adjustment (100.0, 0.0, 100.0, 1.0, 10.0)
        , strength_spinner (strength_adjustment)
        , strength_label (_("Strength"))
        , swing_adjustment (100.0, -130.0, 130.0, 1.0, 10.0)
        , swing_spinner (swing_adjustment)
        , swing_button (_("Swing"))
-       , threshold_adjustment (0.0, -1920.0, 1920.0, 1.0, 10.0) // XXX MAGIC TICK NUMBER FIX ME
+       , threshold_adjustment (0.0, -Timecode::BBT_Time::ticks_per_beat, Timecode::BBT_Time::ticks_per_beat, 1.0, 10.0)
        , threshold_spinner (threshold_adjustment)
        , threshold_label (_("Threshold (ticks)"))
        , snap_start_button (_("Snap note start"))
@@ -74,7 +65,6 @@ QuantizeDialog::QuantizeDialog (PublicEditor& e)
 {
        if (grid_strings.empty()) {
                grid_strings =  I18N (_grid_strings);
-               type_strings =  I18N (_type_strings);
        }
 
        set_popdown_strings (start_grid_combo, grid_strings);
@@ -82,20 +72,12 @@ QuantizeDialog::QuantizeDialog (PublicEditor& e)
        set_popdown_strings (end_grid_combo, grid_strings);
        end_grid_combo.set_active_text (grid_strings.front());
 
-       set_popdown_strings (type_combo, type_strings);
-       type_combo.set_active_text (type_strings.front());
-
        Table* table = manage (new Table (6, 2));
        table->set_spacings (12);
        table->set_border_width (12);
 
        int r = 0;
 
-       type_label.set_alignment (0, 0.5);
-       table->attach (type_label, 0, 1, r, r + 1);
-       table->attach (type_combo, 1, 2, r, r + 1);
-       ++r;
-
        table->attach (snap_start_button, 0, 1, r, r + 1);
        table->attach (start_grid_combo, 1, 2, r, r + 1);
        ++r;
@@ -124,7 +106,7 @@ QuantizeDialog::QuantizeDialog (PublicEditor& e)
        show_all ();
 
        add_button (Stock::CANCEL, RESPONSE_CANCEL);
-       add_button (Stock::OK, RESPONSE_OK);
+       add_button (_("Quantize"), RESPONSE_OK);
 }
 
 QuantizeDialog::~QuantizeDialog()