From 2165f3ffaa4b30a6e6a4ae8b3d85d194b14bd194 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Thu, 30 May 2024 20:16:29 +0200 Subject: [PATCH] T: Select name-entry when switching to "new session" tab --- gtk2_ardour/session_dialog.cc | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/gtk2_ardour/session_dialog.cc b/gtk2_ardour/session_dialog.cc index 27b88bdcc8..840713d6e1 100644 --- a/gtk2_ardour/session_dialog.cc +++ b/gtk2_ardour/session_dialog.cc @@ -240,9 +240,17 @@ SessionDialog::tab_page_switched(GtkNotebookPage*, guint page_number) //check the status of each tab and sensitize the 'open' button appropriately open_button->set_sensitive(false); switch (page_number) { - case 0: new_name_changed(); break; - case 1: recent_session_row_selected(); break; - case 2: existing_file_selected(); break; + case 0: + new_name_changed(); + new_name_entry.select_region (0, -1); + new_name_entry.grab_focus (); + break; + case 1: + recent_session_row_selected(); + break; + case 2: + existing_file_selected(); + break; } } @@ -605,10 +613,7 @@ void SessionDialog::setup_untitled_session () { new_name_entry.set_text (string_compose (_("Untitled-%1"), Glib::DateTime::create_now_local().format ("%F-%H-%M-%S"))); - new_name_entry.select_region (0, -1); new_name_was_edited = false; - - new_name_entry.grab_focus (); } void