diff options
author | Nick Mainsbridge <beatroute@iprimus.com.au> | 2005-10-27 01:10:36 +0000 |
---|---|---|
committer | Nick Mainsbridge <beatroute@iprimus.com.au> | 2005-10-27 01:10:36 +0000 |
commit | c71fc0272da4196f4bc14060f2c6bddcce76f823 (patch) | |
tree | 5f20154d48f1119c59b81a68ab36cfd66c6f1ff0 /gtk2_ardour/visual_time_axis.cc | |
parent | a0ee84a67358a7614cfa1b5e0df9af7e28072490 (diff) |
option editor and some prompters, misc stuff. this commit message contains no apostrophes.
git-svn-id: svn://localhost/trunk/ardour2@69 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/visual_time_axis.cc')
-rw-r--r-- | gtk2_ardour/visual_time_axis.cc | 44 |
1 files changed, 15 insertions, 29 deletions
diff --git a/gtk2_ardour/visual_time_axis.cc b/gtk2_ardour/visual_time_axis.cc index 429049dbf2..8508b6cb3a 100644 --- a/gtk2_ardour/visual_time_axis.cc +++ b/gtk2_ardour/visual_time_axis.cc @@ -360,46 +360,32 @@ VisualTimeAxis::start_time_axis_rename() name_prompter->set_prompt (_("new name: ")) ; ARDOUR_UI::instance()->allow_focus(true) ; - name_prompter->done.connect (mem_fun(*this, &VisualTimeAxis::finish_time_axis_rename)) ; name_prompter->show_all() ; -} -/** - * 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; + 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) ; } - - 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 ; - } - - set_time_axis_name(result, this) ; - delete name_prompter ; name_prompter = 0 ; label_view() ; + + } /** - * Handle the (re-)displaying of the TimeAxis name label + * Handles the new name for this TimeAxis from the name prompt * + * @see start_time_axis_rename() */ + void VisualTimeAxis::label_view() { |