mirror of
https://github.com/Ardour/ardour.git
synced 2026-01-20 12:26:07 +01:00
[Summary] Adding on_default_response to provide chance for conditional ending of opened dialogs prs ENTER key presses
This commit is contained in:
parent
79784f9072
commit
2c19035194
2 changed files with 11 additions and 4 deletions
|
|
@ -140,8 +140,7 @@ WavesDialog::on_key_press_event (GdkEventKey* ev)
|
|||
{
|
||||
case GDK_Return:
|
||||
case GDK_KP_Enter:
|
||||
hide ();
|
||||
response (WavesDialog::RESPONSE_DEFAULT);
|
||||
on_default_response();
|
||||
return true;
|
||||
case GDK_Escape:
|
||||
hide ();
|
||||
|
|
@ -167,9 +166,16 @@ WavesDialog::on_delete_event (GdkEventAny*)
|
|||
return false;
|
||||
}
|
||||
|
||||
void
|
||||
WavesDialog::on_default_response ()
|
||||
{
|
||||
hide ();
|
||||
response (WavesDialog::RESPONSE_DEFAULT);
|
||||
}
|
||||
|
||||
void
|
||||
WavesDialog::on_response(int response_id)
|
||||
{
|
||||
Dialog::on_response (response_id);
|
||||
Gtk::Dialog::on_response (response_id);
|
||||
hide ();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -59,7 +59,8 @@ class WavesDialog : public Gtk::Dialog, public ARDOUR::SessionHandlePtr, public
|
|||
};
|
||||
|
||||
protected:
|
||||
void on_response(int response_id);
|
||||
virtual void on_default_response ();
|
||||
void on_response (int response_id);
|
||||
|
||||
private:
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue