13
0

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
This commit is contained in:
Paul Davis 2012-12-13 13:44:11 +00:00
parent 17439ac72c
commit 341cbfbd19
6 changed files with 20 additions and 2 deletions

View File

@ -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*

View File

@ -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,

View File

@ -48,6 +48,7 @@ namespace ARDOUR {
class AudioEngine;
extern PBD::Signal1<void,std::string> BootMessage;
extern PBD::Signal0<void> GUIIdle;
int init (bool with_vst, bool try_optimization);
void init_post_engine ();

View File

@ -113,6 +113,7 @@ mix_buffers_with_gain_t ARDOUR::mix_buffers_with_gain = 0;
mix_buffers_no_gain_t ARDOUR::mix_buffers_no_gain = 0;
PBD::Signal1<void,std::string> ARDOUR::BootMessage;
PBD::Signal0<void> ARDOUR::GUIIdle;
namespace ARDOUR {
extern void setup_enum_writer ();

View File

@ -2012,8 +2012,11 @@ Session::new_audio_route (int input_channels, int output_channels, RouteGroup* r
bus->add_internal_return ();
ret.push_back (bus);
ARDOUR::GUIIdle ();
}
catch (failed_constructor &err) {
error << _("Session: could not create new audio route.") << endmsg;
goto failure;
@ -2241,6 +2244,8 @@ Session::add_routes_inner (RouteList& new_routes, bool input_auto_connect, bool
order++;
}
}
ARDOUR::GUIIdle ();
}
if (_monitor_out && IO::connecting_legal) {

View File

@ -318,6 +318,8 @@ PixFader::on_button_release_event (GdkEventButton* ev)
/* no motion - just a click */
cerr << "no motion click\n";
if (ev->state & Keyboard::TertiaryModifier) {
adjustment.set_value (default_value);
} else if (ev->state & Keyboard::GainFineScaleModifier) {