Unify the canvases by moving groups around rather than using set_scrolling_region...
[ardour.git] / gtk2_ardour / ardour_ui.cc
index 8c9a965826416272129538f94e7b24bc09b99d8b..ab4591177dafcecc6046835f5c309ba2d6e335b2 100644 (file)
@@ -82,6 +82,8 @@ typedef uint64_t microseconds_t;
 #include "gui_thread.h"
 #include "theme_manager.h"
 #include "engine_dialog.h"
+#include "gain_meter.h"
+#include "route_time_axis.h"
 
 #include "i18n.h"
 
@@ -237,6 +239,9 @@ ARDOUR_UI::ARDOUR_UI (int *argcp, char **argvp[])
                Config->set_current_owner (ConfigVariableBase::Interface);
                setup_profile ();
 
+               GainMeter::setup_slider_pix ();
+               RouteTimeAxisView::setup_slider_pix ();
+
        } catch (failed_constructor& err) {
                error << _("could not initialize Ardour.") << endmsg;
                // pass it on up
@@ -527,6 +532,14 @@ ARDOUR_UI::save_ardour_state ()
 gint
 ARDOUR_UI::autosave_session ()
 {
+       if (g_main_depth() > 1) {
+               /* inside a recursive main loop,
+                  give up because we may not be able to 
+                  take a lock.
+               */
+               return 1;
+       }
+
         if (!Config->get_periodic_safety_backups())
                 return 1;
         
@@ -1272,7 +1285,7 @@ ARDOUR_UI::do_transport_locate (nframes_t new_position)
 }
 
 void
-ARDOUR_UI::transport_goto_start ()
+ARDOUR_UI::transport_goto_start ()  
 {
        if (session) {
                session->goto_start();
@@ -2901,7 +2914,6 @@ ARDOUR_UI::keyboard_settings () const
 void
 ARDOUR_UI::create_xrun_marker(nframes_t where)
 {
-       ENSURE_GUI_THREAD (bind(mem_fun(*this, &ARDOUR_UI::create_xrun_marker), where));
        editor->mouse_add_new_marker (where, false, true);
 }
 
@@ -2916,6 +2928,8 @@ ARDOUR_UI::halt_on_xrun_message ()
 void
 ARDOUR_UI::xrun_handler(nframes_t where)
 {
+       ENSURE_GUI_THREAD (bind(mem_fun(*this, &ARDOUR_UI::xrun_handler), where));
+
        if (Config->get_create_xrun_marker() && session->actively_recording()) {
                create_xrun_marker(where);
        }