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/route_ui.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/route_ui.cc')
-rw-r--r-- | gtk2_ardour/route_ui.cc | 24 |
1 files changed, 11 insertions, 13 deletions
diff --git a/gtk2_ardour/route_ui.cc b/gtk2_ardour/route_ui.cc index 9feca7e20e..a838934b27 100644 --- a/gtk2_ardour/route_ui.cc +++ b/gtk2_ardour/route_ui.cc @@ -687,26 +687,24 @@ void RouteUI::route_rename () { ArdourPrompter name_prompter (true); + string result; name_prompter.set_prompt (_("new name: ")); name_prompter.set_initial_text (_route.name()); - name_prompter.done.connect (Gtk::Main::quit.slot()); name_prompter.show_all (); - Gtk::Main::run(); - - if (name_prompter.status == Gtkmm2ext::Prompter::cancelled) { - return; - } - - string result; - name_prompter.get_result (result); + switch (name_prompter.run ()) { - if (result.length() == 0) { - return; + case GTK_RESPONSE_ACCEPT: + name_prompter.get_result (result); + if (result.length()) { + strip_whitespace_edges (result); + _route.set_name (result, this); + } + break; } - strip_whitespace_edges (result); - _route.set_name (result, this); + return; + } void |