summaryrefslogtreecommitdiff
path: root/gtk2_ardour/ardour_ui_session.cc
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2020-02-27 23:27:42 +0100
committerRobin Gareus <robin@gareus.org>2020-02-27 23:27:42 +0100
commit8710a2d9432469909eb51d0644f2f25133240dbb (patch)
tree5f0c9e1663df050249152ec48f75dfa554ce56f2 /gtk2_ardour/ardour_ui_session.cc
parente5c819956a95a1dc9dee8f805dc55757dc51233d (diff)
Dialog default to cancel (#7915)
There are various ways to cancel a dialog. Only checking for RESPONSE_CANCEL is not sufficient. e.g. Esc causes a delete-event. * Gtk::RESPONSE_CLOSE * Gtk::RESPONSE_REJECT * Gtk::RESPONSE_DELETE_EVENT * Gtk::RESPONSE_CANCEL * Gtk::RESPONSE_NO Among others this fixes "Clicking session > open, then hitting ESC opens the currently selected folder and session"
Diffstat (limited to 'gtk2_ardour/ardour_ui_session.cc')
-rw-r--r--gtk2_ardour/ardour_ui_session.cc15
1 files changed, 9 insertions, 6 deletions
diff --git a/gtk2_ardour/ardour_ui_session.cc b/gtk2_ardour/ardour_ui_session.cc
index dc1019ed5b..42214fac6c 100644
--- a/gtk2_ardour/ardour_ui_session.cc
+++ b/gtk2_ardour/ardour_ui_session.cc
@@ -857,10 +857,10 @@ If you still wish to proceed, please use the\n\n\
save_as_dialog->hide ();
switch (response) {
- case Gtk::RESPONSE_OK:
- break;
- default:
- return;
+ case Gtk::RESPONSE_OK:
+ break;
+ default:
+ return;
}
@@ -1055,8 +1055,11 @@ ARDOUR_UI::open_session ()
int response = open_session_selector.run();
open_session_selector.hide ();
- if (response == Gtk::RESPONSE_CANCEL) {
- return;
+ switch (response) {
+ case Gtk::RESPONSE_ACCEPT:
+ break;
+ default:
+ return;
}
string session_path = open_session_selector.get_filename();