diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2012-12-13 13:44:11 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2012-12-13 13:44:11 +0000 |
commit | 341cbfbd19dd9e885020c6fe1120fbcc497d621e (patch) | |
tree | 3e8233aa9ce5860ea487b890c3bd470fb7a3f956 /gtk2_ardour | |
parent | 17439ac72cbbfe70256d99c3380aa31a2eb7bd35 (diff) |
reinstate the windows way for GUIIdle's but limit the scope of the connection to just the time when a long-running action is active (for now, just adding > 8 routes)
git-svn-id: svn://localhost/ardour2/branches/3.0@13654 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour')
-rw-r--r-- | gtk2_ardour/ardour_ui.cc | 11 | ||||
-rw-r--r-- | gtk2_ardour/ardour_ui.h | 2 |
2 files changed, 11 insertions, 2 deletions
diff --git a/gtk2_ardour/ardour_ui.cc b/gtk2_ardour/ardour_ui.cc index 51a95c1250..831e95c997 100644 --- a/gtk2_ardour/ardour_ui.cc +++ b/gtk2_ardour/ardour_ui.cc @@ -325,10 +325,9 @@ 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 ARDOUR_UI::create_engine () { @@ -3150,6 +3149,12 @@ ARDOUR_UI::add_route (Gtk::Window* float_window) return; } + PBD::ScopedConnection idle_connection; + + if (count > 8) { + ARDOUR::GUIIdle.connect (idle_connection, MISSING_INVALIDATOR, boost::bind (&Gtkmm2ext::UI::flush_pending, this), gui_context()); + } + string template_path = add_route_dialog->track_template(); if (!template_path.empty()) { @@ -3187,6 +3192,8 @@ ARDOUR_UI::add_route (Gtk::Window* float_window) session_add_audio_bus (input_chan.n_audio(), output_chan.n_audio(), route_group, count, name_template); break; } + + /* idle connection will end at scope end */ } XMLNode* diff --git a/gtk2_ardour/ardour_ui.h b/gtk2_ardour/ardour_ui.h index 0af4cd6d2a..f6b312b993 100644 --- a/gtk2_ardour/ardour_ui.h +++ b/gtk2_ardour/ardour_ui.h @@ -210,6 +210,8 @@ class ARDOUR_UI : public Gtkmm2ext::UI, public ARDOUR::SessionHandlePtr void synchronize_sync_source_and_video_pullup (); void add_route (Gtk::Window* float_window); + void add_routes_part_two (); + void add_routes_thread (); void session_add_audio_track ( int input_channels, |