diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2012-12-12 18:59:47 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2012-12-12 18:59:47 +0000 |
commit | 75f3005c67f5c8ea883c0e24e9832b59c5ced13f (patch) | |
tree | 7f8ce77feb7f292488e5a104c0486d226604d9d5 /gtk2_ardour | |
parent | 8e8b296bb424972d2cddba4ef56fbdb3388fb36d (diff) |
sometimes, you just have to do what a windows programmer would do. add a global signal, ARDOUR::GUIIdle() which can be used in the middle of long-running backend operations to give the GUI a chance to update. use it while adding routes.
git-svn-id: svn://localhost/ardour2/branches/3.0@13650 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour')
-rw-r--r-- | gtk2_ardour/ardour_ui.cc | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/gtk2_ardour/ardour_ui.cc b/gtk2_ardour/ardour_ui.cc index c144c930b3..8d672e0f70 100644 --- a/gtk2_ardour/ardour_ui.cc +++ b/gtk2_ardour/ardour_ui.cc @@ -325,6 +325,8 @@ ARDOUR_UI::ARDOUR_UI (int *argcp, char **argvp[]) _process_thread->init (); DPIReset.connect (sigc::mem_fun (*this, &ARDOUR_UI::resize_text_widgets)); + + ARDOUR::GUIIdle.connect (forever_connections, MISSING_INVALIDATOR, boost::bind (&Gtkmm2ext::UI::flush_pending, this), gui_context()); } int @@ -3148,16 +3150,6 @@ ARDOUR_UI::add_route (Gtk::Window* float_window) return; } - if (count > 8) { - /* 8 is arbitrary - we just need a threshold for where - we start caring that this operation might take - a long time - */ - flush_pending(); - flush_pending(); - flush_pending(); - } - string template_path = add_route_dialog->track_template(); if (!template_path.empty()) { @@ -3170,7 +3162,6 @@ ARDOUR_UI::add_route (Gtk::Window* float_window) string name_template = add_route_dialog->name_template (); PluginInfoPtr instrument = add_route_dialog->requested_instrument (); RouteGroup* route_group = add_route_dialog->route_group (); - AutoConnectOption oac = Config->get_output_auto_connect(); if (oac & AutoConnectMaster) { |