diff options
author | David Robillard <d@drobilla.net> | 2009-10-27 02:36:42 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2009-10-27 02:36:42 +0000 |
commit | d46998dae789491e54749e4ff9823948185f81be (patch) | |
tree | 61630c437e83c75fe8706f821e9c356383f4efb6 | |
parent | fc912ee219c8b443b5da38fd4e2b94f0bfb85797 (diff) |
Add OK/Cancel buttons to quantize dialog.
git-svn-id: svn://localhost/ardour2/branches/3.0@5939 d708f5d6-7413-0410-9779-e7cbd77b26cf
-rw-r--r-- | gtk2_ardour/editor_ops.cc | 14 | ||||
-rw-r--r-- | gtk2_ardour/quantize_dialog.cc | 4 |
2 files changed, 12 insertions, 6 deletions
diff --git a/gtk2_ardour/editor_ops.cc b/gtk2_ardour/editor_ops.cc index a128ed6cf2..9de3d0138f 100644 --- a/gtk2_ardour/editor_ops.cc +++ b/gtk2_ardour/editor_ops.cc @@ -4848,15 +4848,17 @@ Editor::quantize_region () QuantizeDialog* qd = new QuantizeDialog (*this); qd->present (); - qd->run (); + const int r = qd->run (); qd->hide (); - Quantize quant (*session, Plain, - qd->snap_start(), qd->snap_end(), - qd->start_grid_size(), qd->end_grid_size(), - qd->strength(), qd->swing(), qd->threshold()); + if (r == Gtk::RESPONSE_OK) { + Quantize quant (*session, Plain, + qd->snap_start(), qd->snap_end(), + qd->start_grid_size(), qd->end_grid_size(), + qd->strength(), qd->swing(), qd->threshold()); - apply_midi_note_edit_op (quant); + apply_midi_note_edit_op (quant); + } } void diff --git a/gtk2_ardour/quantize_dialog.cc b/gtk2_ardour/quantize_dialog.cc index 5ed867c4c3..f8a6d3a516 100644 --- a/gtk2_ardour/quantize_dialog.cc +++ b/gtk2_ardour/quantize_dialog.cc @@ -17,6 +17,7 @@ */ +#include <gtkmm/stock.h> #include "gtkmm2ext/utils.h" #include "quantize_dialog.h" @@ -147,6 +148,9 @@ QuantizeDialog::QuantizeDialog (PublicEditor& e) snap_start_button.set_active (true); snap_end_button.set_active (false); + + add_button (Stock::CANCEL, RESPONSE_CANCEL); + add_button (Stock::OK, RESPONSE_OK); } QuantizeDialog::~QuantizeDialog() |