hook-up GUI idle handler

This commit is contained in:
Robin Gareus 2014-02-25 12:56:20 +01:00
parent e63f3daa7e
commit 6471c94254
2 changed files with 12 additions and 0 deletions

View File

@ -308,6 +308,8 @@ ARDOUR_UI::ARDOUR_UI (int *argcp, char **argvp[], const char* localedir)
/* also plugin scan messages */
ARDOUR::PluginScanMessage.connect (forever_connections, MISSING_INVALIDATOR, boost::bind(&ARDOUR_UI::plugin_scan_dialog, this, _1, _2), gui_context());
ARDOUR::GUIIdle.connect (forever_connections, MISSING_INVALIDATOR, boost::bind(&ARDOUR_UI::gui_idle_handler, this), gui_context());
/* lets get this party started */
setup_gtk_ardour_enums ();
@ -3833,6 +3835,15 @@ ARDOUR_UI::plugin_scan_dialog (std::string type, std::string plugin)
}
}
void
ARDOUR_UI::gui_idle_handler ()
{
int timeout = 30;
while (gtk_events_pending() && --timeout) {
gtk_main_iteration ();
}
}
void
ARDOUR_UI::disk_underrun_handler ()
{

View File

@ -666,6 +666,7 @@ class ARDOUR_UI : public Gtkmm2ext::UI, public ARDOUR::SessionHandlePtr
void disk_speed_dialog_gone (int ignored_response, Gtk::MessageDialog*);
void disk_overrun_handler ();
void disk_underrun_handler ();
void gui_idle_handler ();
void cancel_plugin_scan ();
void plugin_scan_dialog (std::string type, std::string plugin);