diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2006-03-21 21:08:24 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2006-03-21 21:08:24 +0000 |
commit | 004a49b0c7051a4d0f8972b0aff0ef8fa9cab03d (patch) | |
tree | 714a876b19460d82f5793f68bc4c3bfefb480d32 /gtk2_ardour/editor_ops.cc | |
parent | d63c0fa328429ff0d7917fe3f4458c97063ba450 (diff) |
Gtkmm2ext::Choice now inherits from Gtk::Dialog; embed/import rate mismatch dialog no longer hangs in recursive Main::run() call
git-svn-id: svn://localhost/trunk/ardour2@414 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/editor_ops.cc')
-rw-r--r-- | gtk2_ardour/editor_ops.cc | 29 |
1 files changed, 16 insertions, 13 deletions
diff --git a/gtk2_ardour/editor_ops.cc b/gtk2_ardour/editor_ops.cc index cb9f19c5ed..f5baecb373 100644 --- a/gtk2_ardour/editor_ops.cc +++ b/gtk2_ardour/editor_ops.cc @@ -199,10 +199,9 @@ Do you really want to destroy %1 ?"), Gtkmm2ext::Choice prompter (prompt, choices); - prompter.chosen.connect (ptr_fun (Main::quit)); - prompter.show_all (); - - Main::run (); + if (prompter.run () != RESPONSE_ACCEPT) { + return; + } if (prompter.get_choice() != 0) { return; @@ -2128,10 +2127,16 @@ Editor::reject_because_rate_differs (const string & path, SoundFileInfo& finfo, string_compose (_("%1\nThis audiofile's sample rate doesn't match the session sample rate!"), path), choices); - rate_choice.chosen.connect (ptr_fun (Main::quit)); - rate_choice.show_all (); + int response = rate_choice.run(); - Main::run (); + switch (response) { + case RESPONSE_ACCEPT: + break; + default: + /* stop all that might come after this */ + return -2; + break; + } switch (rate_choice.get_choice()) { case 0: /* do it anyway */ @@ -3546,13 +3551,11 @@ Editor::remove_last_capture () choices.push_back (_("No, do nothing.")); Gtkmm2ext::Choice prompter (prompt, choices); - prompter.chosen.connect (ptr_fun (Main::quit)); - prompter.show_all (); - - Main::run (); - if (prompter.get_choice() == 0) { - session->remove_last_capture (); + if (prompter.run () == RESPONSE_ACCEPT) { + if (prompter.get_choice() == 0) { + session->remove_last_capture (); + } } } else { |