alpha -> beta
[ardour.git] / gtk2_ardour / ardour_ui.cc
index e2da2454995b8208896c9dd2475b1c2d3e560fef..b4ae6131a0eef9bf6754d5c1354ec734ab749faf 100644 (file)
@@ -62,6 +62,7 @@
 #include "ardour/ardour.h"
 #include "ardour/callback.h"
 #include "ardour/profile.h"
+#include "ardour/plugin_manager.h"
 #include "ardour/session_directory.h"
 #include "ardour/session_route.h"
 #include "ardour/session_state_utils.h"
@@ -157,14 +158,14 @@ ARDOUR_UI::ARDOUR_UI (int *argcp, char **argvp[])
        , auto_play_button (ArdourButton::led_default_elements)
        , auto_input_button (ArdourButton::led_default_elements)
 
-       , time_master_button (_("time\nmaster"))
-
-       , auditioning_alert_button (_("AUDITION"))
-       , solo_alert_button (_("SOLO"))
+       , auditioning_alert_button (_("audition"))
+       , solo_alert_button (_("solo"))
+       , feedback_alert_button (_("feedback"))
 
        , error_log_button (_("Errors"))
 
        , _status_bar_visibility (X_("status-bar"))
+       , _feedback_exists (false)
 
 {
        using namespace Gtk::Menu_Helpers;
@@ -236,9 +237,11 @@ ARDOUR_UI::ARDOUR_UI (int *argcp, char **argvp[])
        play_selection_button.set_name ("transport button");
        rec_button.set_name ("transport recenable button");
        join_play_range_button.set_name ("transport button");
+       midi_panic_button.set_name ("transport button");
 
        goto_start_button.set_tweaks (ArdourButton::ShowClick);
        goto_end_button.set_tweaks (ArdourButton::ShowClick);
+       midi_panic_button.set_tweaks (ArdourButton::ShowClick);
        
        last_configure_time= 0;
        last_peak_grab = 0;
@@ -265,6 +268,7 @@ ARDOUR_UI::ARDOUR_UI (int *argcp, char **argvp[])
        /* tell the user about feedback */
 
        ARDOUR::Session::FeedbackDetected.connect (forever_connections, MISSING_INVALIDATOR, ui_bind (&ARDOUR_UI::feedback_detected, this), gui_context ());
+       ARDOUR::Session::SuccessfulGraphSort.connect (forever_connections, MISSING_INVALIDATOR, ui_bind (&ARDOUR_UI::successful_graph_sort, this), gui_context ());
 
        /* handle requests to deal with missing files */
 
@@ -336,6 +340,8 @@ ARDOUR_UI::ARDOUR_UI (int *argcp, char **argvp[])
 
        _process_thread = new ProcessThread ();
        _process_thread->init ();
+
+       DPIReset.connect (sigc::mem_fun (*this, &ARDOUR_UI::resize_text_widgets));
 }
 
 /** @return true if a session was chosen and `apply' clicked, otherwise false if `cancel' was clicked */
@@ -409,7 +415,10 @@ ARDOUR_UI::post_engine ()
 
        ARDOUR::init_post_engine ();
 
+       /* load up the UI manager */
+
        ActionManager::init ();
+
        _tooltips.enable();
 
        if (setup_windows ()) {
@@ -1062,7 +1071,7 @@ ARDOUR_UI::update_cpu_load ()
 {
        char buf[64];
 
-       /* If this text is changed, the set_size_request_to_display_given_text call in ARDOUR_UI::build_menu_bar
+       /* If this text is changed, the set_size_request_to_display_given_text call in ARDOUR_UI::resize_text_widgets
           should also be changed.
        */
 
@@ -1079,7 +1088,7 @@ ARDOUR_UI::update_buffer_load ()
        uint32_t const playback = _session ? _session->playback_load () : 100;
        uint32_t const capture = _session ? _session->capture_load () : 100;
 
-       /* If this text is changed, the set_size_request_to_display_given_text call in ARDOUR_UI::build_menu_bar
+       /* If this text is changed, the set_size_request_to_display_given_text call in ARDOUR_UI::resize_text_widgets
           should also be changed.
        */
        
@@ -1664,7 +1673,7 @@ ARDOUR_UI::transport_record (bool roll)
                switch (_session->record_status()) {
                case Session::Disabled:
                        if (_session->ntracks() == 0) {
-                               MessageDialog msg (*editor, _("Please create 1 or more track\nbefore trying to record.\nCheck the Session menu."));
+                               MessageDialog msg (*editor, _("Please create one or more tracks before trying to record.\nYou can do this with the \"Add Track or Bus\" option in the Session menu."));
                                msg.run ();
                                return;
                        }
@@ -3878,11 +3887,19 @@ ARDOUR_UI::drop_process_buffers ()
 void
 ARDOUR_UI::feedback_detected ()
 {
-       MessageDialog d (
-               _("Something you have just done has generated a feedback path within Ardour's "
-                 "routing.  Until this feedback is removed, Ardour's output will be as it was "
-                  "before you made the feedback-generating connection.")
-               );
+       _feedback_exists = true;
+}
 
-       d.run ();
+void
+ARDOUR_UI::successful_graph_sort ()
+{
+       _feedback_exists = false;
+}
+
+void
+ARDOUR_UI::midi_panic ()
+{
+       if (_session) {
+               _session->midi_panic();
+       }
 }