Provide dialogs to edit pan values numerically, at least for
[ardour.git] / gtk2_ardour / ardour_ui_options.cc
index 866cb6afb4b8b3ea8711fee67b3e888ce8414a1a..f2f7d397df257af797c3d1fcf46df764a1367823 100644 (file)
 
 #include <gtkmm2ext/utils.h>
 
-#include "ardour/configuration.h"
-#include "ardour/session.h"
-#include "ardour/audioengine.h"
 #include "ardour/rc_configuration.h"
+#include "ardour/session.h"
 
 #ifdef HAVE_LIBLO
 #include "ardour/osc.h"
@@ -40,6 +38,7 @@
 #include "actions.h"
 #include "gui_thread.h"
 #include "public_editor.h"
+#include "main_clock.h"
 
 #include "i18n.h"
 
@@ -279,6 +278,7 @@ void
 ARDOUR_UI::toggle_editing_space()
 {
        Glib::RefPtr<Action> act = ActionManager::get_action ("Common", "ToggleMaximalEditor");
+
        if (act) {
                Glib::RefPtr<ToggleAction> tact = Glib::RefPtr<ToggleAction>::cast_dynamic(act);
                if (tact->get_active()) {
@@ -292,7 +292,7 @@ ARDOUR_UI::toggle_editing_space()
 void
 ARDOUR_UI::setup_session_options ()
 {
-       _session->config.ParameterChanged.connect (_session_connections, MISSING_INVALIDATOR, ui_bind (&ARDOUR_UI::parameter_changed, this, _1), gui_context());
+       _session->config.ParameterChanged.connect (_session_connections, MISSING_INVALIDATOR, boost::bind (&ARDOUR_UI::parameter_changed, this, _1), gui_context());
        boost::function<void (std::string)> pc (boost::bind (&ARDOUR_UI::parameter_changed, this, _1));
        _session->config.map_parameters (pc);
 }
@@ -317,6 +317,10 @@ ARDOUR_UI::parameter_changed (std::string p)
                        ActionManager::get_action ("Transport", "ToggleAutoReturn")->set_sensitive (false);
                }
 
+       } else if (p == "always-play-range") {
+
+               ActionManager::map_some_state ("Transport", "AlwaysPlayRange", &RCConfiguration::get_always_play_range);
+
        } else if (p == "send-mtc") {
 
                ActionManager::map_some_state ("options", "SendMTC", &RCConfiguration::get_send_mtc);
@@ -359,8 +363,6 @@ ARDOUR_UI::parameter_changed (std::string p)
                }
        } else if (p == "clicking") {
                ActionManager::map_some_state ("Transport", "ToggleClick", &RCConfiguration::get_clicking);
-       } else if (p == "jack-time-master") {
-               ActionManager::map_some_state ("Transport",  "ToggleTimeMaster", sigc::mem_fun (_session->config, &SessionConfiguration::get_jack_time_master));
        } else if (p == "use-video-sync") {
                ActionManager::map_some_state ("Transport",  "ToggleVideoSync", sigc::mem_fun (_session->config, &SessionConfiguration::get_use_video_sync));
        } else if (p == "video-pullup" || p == "timecode-format") {
@@ -375,9 +377,25 @@ ARDOUR_UI::parameter_changed (std::string p)
        } else if (p == "show-track-meters") {
                editor->toggle_meter_updating();
        } else if (p == "primary-clock-delta-edit-cursor") {
-               primary_clock->set_is_duration (Config->get_primary_clock_delta_edit_cursor());
+               if (Config->get_primary_clock_delta_edit_cursor()) {
+                       primary_clock->set_is_duration (true);
+                       primary_clock->set_editable (false);
+                       primary_clock->set_widget_name ("transport delta");
+               } else {
+                       primary_clock->set_is_duration (false);
+                       primary_clock->set_editable (true);
+                       primary_clock->set_widget_name ("transport");
+               }
        } else if (p == "secondary-clock-delta-edit-cursor") {
-               secondary_clock->set_is_duration (Config->get_secondary_clock_delta_edit_cursor());
+               if (Config->get_secondary_clock_delta_edit_cursor()) {
+                       secondary_clock->set_is_duration (true);
+                       secondary_clock->set_editable (false);
+                       secondary_clock->set_widget_name ("secondary delta");
+               } else {
+                       secondary_clock->set_is_duration (false);
+                       secondary_clock->set_editable (true);
+                       secondary_clock->set_widget_name ("secondary");
+               }
        }
 }