[Summary] Fix bug. Allow to add tracks on Enter press. Deleted unnecessary functions.

[Reviewed] VKamyshniy
This commit is contained in:
Nikolay 2014-12-17 13:13:10 +02:00
parent e2cab0c884
commit 1d17bd3321
3 changed files with 3 additions and 21 deletions

View file

@ -79,7 +79,7 @@ void
AddTracksDialog::on_ok_button (WavesButton*) AddTracksDialog::on_ok_button (WavesButton*)
{ {
hide(); hide();
response (Gtk::RESPONSE_YES); response (WavesDialog::RESPONSE_DEFAULT);
} }
void void
@ -156,18 +156,4 @@ AddTracksDialog::setup ()
{ {
set_track_count(1); set_track_count(1);
_tracks_format_dropdown.set_text(TrackFormat::FormatMono); _tracks_format_dropdown.set_text(TrackFormat::FormatMono);
} }
void
AddTracksDialog::on_enter_pressed ()
{
hide();
response (Gtk::RESPONSE_YES);
}
void
AddTracksDialog::on_esc_pressed ()
{
hide();
response (Gtk::RESPONSE_CANCEL);
}

View file

@ -38,10 +38,6 @@ public:
ARDOUR::ChanCount input_channels (); ARDOUR::ChanCount input_channels ();
void on_show (); void on_show ();
protected:
void on_enter_pressed ();
void on_esc_pressed ();
private: private:
WavesButton& _decrement_button; WavesButton& _decrement_button;
WavesButton& _increment_button; WavesButton& _increment_button;

View file

@ -3451,7 +3451,7 @@ ARDOUR_UI::add_route (Gtk::Window* float_window)
int r = _add_tracks_dialog->run(); int r = _add_tracks_dialog->run();
switch (r) { switch (r) {
case Gtk::RESPONSE_YES: case WavesDialog::RESPONSE_DEFAULT:
break; break;
default: default:
return; return;