-/**
- * Handles the new name for this TimeAxis from the name prompt
- *
- * @see start_time_axis_rename()
- */
-void
-VisualTimeAxis::finish_time_axis_rename()
-{
- name_prompter->hide_all () ;
- ARDOUR_UI::instance()->allow_focus (false) ;
-
- if (name_prompter->status == Gtkmm2ext::Prompter::cancelled)
- {
- return;
- }
-
- string result ;
- name_prompter->get_result (result) ;
- //time_axis_name = result ;
-
- if (editor.get_named_time_axis(result) != 0) {
- ARDOUR_UI::instance()->popup_error (_("A track already exists with that name"));
- return ;
+ switch (name_prompter->run ()) {
+ case GTK_RESPONSE_ACCEPT:
+ string result;
+ name_prompter->get_result (result);
+ if (editor.get_named_time_axis(result) != 0) {
+ ARDOUR_UI::instance()->popup_error (_("A track already exists with that name"));
+ return ;
+ }
+
+ set_time_axis_name(result, this) ;