mirror of
https://github.com/Ardour/ardour.git
synced 2026-01-09 23:25:43 +01:00
[Summary] Reworked implementation on Esc and on Enter pressed according to new possibilities in parent class WavesDialog
[Reviewed] Nobody
This commit is contained in:
parent
22e5ec45a6
commit
5391c2f4a8
2 changed files with 15 additions and 19 deletions
|
|
@ -140,22 +140,16 @@ AddTracksDialog::setup ()
|
|||
_tracks_format_dropdown.set_text(TrackFormat::FormatMono);
|
||||
}
|
||||
|
||||
bool
|
||||
AddTracksDialog::on_key_press_event (GdkEventKey* ev)
|
||||
void
|
||||
AddTracksDialog::on_enter_pressed ()
|
||||
{
|
||||
switch (ev->keyval)
|
||||
{
|
||||
case GDK_Return:
|
||||
hide();
|
||||
response (Gtk::RESPONSE_YES);
|
||||
return true;
|
||||
case GDK_Escape:
|
||||
hide();
|
||||
response (Gtk::RESPONSE_CANCEL);
|
||||
return true;
|
||||
}
|
||||
|
||||
Gtk::Widget::on_key_press_event(ev);
|
||||
|
||||
return true; // do not propagate event
|
||||
hide();
|
||||
response (Gtk::RESPONSE_YES);
|
||||
}
|
||||
|
||||
void
|
||||
AddTracksDialog::on_esc_pressed ()
|
||||
{
|
||||
hide();
|
||||
response (Gtk::RESPONSE_CANCEL);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -26,8 +26,10 @@ public:
|
|||
int count();
|
||||
ARDOUR::ChanCount input_channels ();
|
||||
|
||||
bool on_key_press_event (GdkEventKey* ev);
|
||||
|
||||
protected:
|
||||
void on_enter_pressed ();
|
||||
void on_esc_pressed ();
|
||||
|
||||
private:
|
||||
WavesButton& _decrement_button;
|
||||
WavesButton& _increment_button;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue