missing drag-end (fix possible crash)
[ardour.git] / gtk2_ardour / tempo_dialog.cc
index d430f2252316160d85bc3abf15555194cbad2190..0b570abdaa2fcc780de2b5dc78beb8ee8411db21 100644 (file)
@@ -23,8 +23,8 @@
 
 #include "gtkmm2ext/utils.h"
 
-#include "ardour_ui.h"
 #include "tempo_dialog.h"
+#include "ui_config.h"
 
 #include "i18n.h"
 
@@ -105,10 +105,10 @@ TempoDialog::init (const Timecode::BBT_Time& when, double bpm, double note_type,
        if (x == note_types.end()) {
                pulse_selector.set_active_text (strings[3]); // "quarter"
        }
-       
+
        Table* table;
 
-       if (ARDOUR_UI::config()->get_allow_non_quarter_pulse()) {
+       if (UIConfiguration::instance().get_allow_non_quarter_pulse()) {
                table = manage (new Table (5, 5));
        } else {
                table = manage (new Table (5, 4));
@@ -122,7 +122,7 @@ TempoDialog::init (const Timecode::BBT_Time& when, double bpm, double note_type,
        table->attach (*bpm_label, 0, 1, 0, 1);
        table->attach (bpm_spinner, 1, 5, 0, 1);
 
-       if (ARDOUR_UI::config()->get_allow_non_quarter_pulse()) {
+       if (UIConfiguration::instance().get_allow_non_quarter_pulse()) {
                table->attach (pulse_selector_label, 0, 1, 1, 2);
                table->attach (pulse_selector, 1, 5, 1, 2);
                row = 2;
@@ -249,7 +249,7 @@ double
 TempoDialog::get_note_type ()
 {
        NoteTypes::iterator x = note_types.find (pulse_selector.get_active_text());
-       
+
        if (x == note_types.end()) {
                error << string_compose(_("incomprehensible pulse note type (%1)"), pulse_selector.get_active_text()) << endmsg;
                return 0;
@@ -300,6 +300,8 @@ TempoDialog::tap_tempo_button_press (GdkEventButton *ev)
                tapped = true;
        }
        last_tap = now;
+
+       return true;
 }
 
 bool
@@ -365,7 +367,7 @@ MeterDialog::init (const Timecode::BBT_Time& when, double bpb, double divisor, b
                        break;
                }
        }
-       
+
        if (x == note_types.end()) {
                note_type.set_active_text (strings[3]); // "quarter"
        }
@@ -496,7 +498,7 @@ double
 MeterDialog::get_note_type ()
 {
        NoteTypes::iterator x = note_types.find (note_type.get_active_text());
-       
+
        if (x == note_types.end()) {
                error << string_compose(_("incomprehensible meter note type (%1)"), note_type.get_active_text()) << endmsg;
                return 0;