From ccc9042bf27f47628836dac33a52f71f9af96587 Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Tue, 24 Mar 2020 00:00:33 -0600 Subject: detect whether or not user edited the name for a new session Suprisingly hard/irritating. Thanks, GTK! (Gtk::Entry::set_text() emits all the same signals that actual user interaction can trigger, except for key events) --- gtk2_ardour/session_dialog.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'gtk2_ardour/session_dialog.h') diff --git a/gtk2_ardour/session_dialog.h b/gtk2_ardour/session_dialog.h index 49a0084f52..728572bee7 100644 --- a/gtk2_ardour/session_dialog.h +++ b/gtk2_ardour/session_dialog.h @@ -65,6 +65,7 @@ public: void set_provided_session (std::string const & name, std::string const & path); void clear_name (); + bool was_new_name_edited() const { return new_name_was_edited; } private: bool new_only; @@ -143,6 +144,9 @@ private: void setup_new_session_page (); Gtk::Entry new_name_entry; + bool new_name_was_edited; + bool new_name_edited (GdkEventKey*); + Gtk::FileChooserButton new_folder_chooser; struct SessionTemplateColumns : public Gtk::TreeModel::ColumnRecord { -- cgit v1.2.3