2005-12-31 13:20:42 -05:00
|
|
|
/*
|
2008-08-04 18:37:24 -04:00
|
|
|
Copyright (C) 2005 Paul Davis
|
2005-12-31 13:20:42 -05:00
|
|
|
|
|
|
|
This program is free software; you can redistribute it and/or modify
|
|
|
|
it under the terms of the GNU General Public License as published by
|
|
|
|
the Free Software Foundation; either version 2 of the License, or
|
|
|
|
(at your option) any later version.
|
|
|
|
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
GNU General Public License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
|
|
along with this program; if not, write to the Free Software
|
|
|
|
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
2009-07-12 20:26:28 -04:00
|
|
|
#ifdef WAF_BUILD
|
|
|
|
#include "gtk2ardour-config.h"
|
|
|
|
#endif
|
|
|
|
|
2009-02-25 13:26:51 -05:00
|
|
|
#include "pbd/convert.h"
|
|
|
|
#include "pbd/stacktrace.h"
|
2006-04-25 16:23:50 -04:00
|
|
|
|
2006-01-07 21:56:49 -05:00
|
|
|
#include <gtkmm2ext/utils.h>
|
|
|
|
|
2009-02-25 13:26:51 -05:00
|
|
|
#include "ardour/configuration.h"
|
|
|
|
#include "ardour/session.h"
|
|
|
|
#include "ardour/audioengine.h"
|
2005-12-31 13:20:42 -05:00
|
|
|
|
2007-12-15 18:29:30 -05:00
|
|
|
#ifdef HAVE_LIBLO
|
2009-02-25 13:26:51 -05:00
|
|
|
#include "ardour/osc.h"
|
2007-12-15 18:29:30 -05:00
|
|
|
#endif
|
|
|
|
|
2005-12-31 13:20:42 -05:00
|
|
|
#include "ardour_ui.h"
|
|
|
|
#include "actions.h"
|
2006-01-07 21:56:49 -05:00
|
|
|
#include "gui_thread.h"
|
2008-01-10 16:20:59 -05:00
|
|
|
#include "public_editor.h"
|
2006-01-07 21:56:49 -05:00
|
|
|
|
|
|
|
#include "i18n.h"
|
2005-12-31 13:20:42 -05:00
|
|
|
|
|
|
|
using namespace Gtk;
|
2006-01-07 21:56:49 -05:00
|
|
|
using namespace Gtkmm2ext;
|
2005-12-31 13:20:42 -05:00
|
|
|
using namespace ARDOUR;
|
2006-06-21 19:01:03 -04:00
|
|
|
using namespace PBD;
|
2006-09-25 17:24:00 -04:00
|
|
|
using namespace sigc;
|
2005-12-31 13:20:42 -05:00
|
|
|
|
2009-11-09 23:30:08 -05:00
|
|
|
void
|
|
|
|
ARDOUR_UI::toggle_external_sync()
|
|
|
|
{
|
|
|
|
ActionManager::toggle_config_state_foo ("Transport", "ToggleExternalSync", mem_fun (session->config, &SessionConfiguration::set_external_sync), mem_fun (session->config, &SessionConfiguration::get_external_sync));
|
|
|
|
}
|
|
|
|
|
2006-09-25 17:24:00 -04:00
|
|
|
void
|
|
|
|
ARDOUR_UI::toggle_time_master ()
|
|
|
|
{
|
2009-05-15 21:53:43 -04:00
|
|
|
ActionManager::toggle_config_state_foo ("Transport", "ToggleTimeMaster", mem_fun (session->config, &SessionConfiguration::set_jack_time_master), mem_fun (session->config, &SessionConfiguration::get_jack_time_master));
|
2006-09-25 17:24:00 -04:00
|
|
|
}
|
|
|
|
|
2005-12-31 13:20:42 -05:00
|
|
|
void
|
|
|
|
ARDOUR_UI::toggle_send_mtc ()
|
|
|
|
{
|
2009-05-13 20:13:27 -04:00
|
|
|
ActionManager::toggle_config_state ("options", "SendMTC", &RCConfiguration::set_send_mtc, &RCConfiguration::get_send_mtc);
|
2005-12-31 13:20:42 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
ARDOUR_UI::toggle_send_mmc ()
|
|
|
|
{
|
2009-05-13 20:13:27 -04:00
|
|
|
ActionManager::toggle_config_state ("options", "SendMMC", &RCConfiguration::set_send_mmc, &RCConfiguration::get_send_mmc);
|
2005-12-31 13:20:42 -05:00
|
|
|
}
|
|
|
|
|
2008-11-26 18:32:55 -05:00
|
|
|
void
|
|
|
|
ARDOUR_UI::toggle_send_midi_clock ()
|
|
|
|
{
|
2009-05-13 20:13:27 -04:00
|
|
|
ActionManager::toggle_config_state ("options", "SendMidiClock", &RCConfiguration::set_send_midi_clock, &RCConfiguration::get_send_midi_clock);
|
2008-11-26 18:32:55 -05:00
|
|
|
}
|
|
|
|
|
2005-12-31 13:20:42 -05:00
|
|
|
void
|
|
|
|
ARDOUR_UI::toggle_use_mmc ()
|
|
|
|
{
|
2009-05-13 20:13:27 -04:00
|
|
|
ActionManager::toggle_config_state ("options", "UseMMC", &RCConfiguration::set_mmc_control, &RCConfiguration::get_mmc_control);
|
2005-12-31 13:20:42 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
ARDOUR_UI::toggle_send_midi_feedback ()
|
|
|
|
{
|
2009-05-13 20:13:27 -04:00
|
|
|
ActionManager::toggle_config_state ("options", "SendMIDIfeedback", &RCConfiguration::set_midi_feedback, &RCConfiguration::get_midi_feedback);
|
2006-09-29 17:39:39 -04:00
|
|
|
}
|
|
|
|
|
2006-01-08 00:19:38 -05:00
|
|
|
void
|
|
|
|
ARDOUR_UI::toggle_auto_input ()
|
|
|
|
{
|
2009-05-13 20:13:27 -04:00
|
|
|
ActionManager::toggle_config_state_foo ("Transport", "ToggleAutoInput", mem_fun (session->config, &SessionConfiguration::set_auto_input), mem_fun (session->config, &SessionConfiguration::get_auto_input));
|
2006-01-08 00:19:38 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
ARDOUR_UI::toggle_auto_play ()
|
|
|
|
{
|
2009-05-13 20:13:27 -04:00
|
|
|
ActionManager::toggle_config_state_foo ("Transport", "ToggleAutoPlay", mem_fun (session->config, &SessionConfiguration::set_auto_play), mem_fun (session->config, &SessionConfiguration::get_auto_play));
|
2006-01-08 00:19:38 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
ARDOUR_UI::toggle_auto_return ()
|
|
|
|
{
|
2009-05-13 20:13:27 -04:00
|
|
|
ActionManager::toggle_config_state_foo ("Transport", "ToggleAutoReturn", mem_fun (session->config, &SessionConfiguration::set_auto_return), mem_fun (session->config, &SessionConfiguration::get_auto_return));
|
2006-01-08 00:19:38 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
ARDOUR_UI::toggle_click ()
|
|
|
|
{
|
2009-05-13 20:13:27 -04:00
|
|
|
ActionManager::toggle_config_state ("Transport", "ToggleClick", &RCConfiguration::set_clicking, &RCConfiguration::get_clicking);
|
2006-01-08 00:19:38 -05:00
|
|
|
}
|
|
|
|
|
2008-03-17 16:54:03 -04:00
|
|
|
void
|
|
|
|
ARDOUR_UI::unset_dual_punch ()
|
|
|
|
{
|
|
|
|
Glib::RefPtr<Action> action = ActionManager::get_action ("Transport", "TogglePunch");
|
2008-08-04 18:37:24 -04:00
|
|
|
|
2008-03-17 16:54:03 -04:00
|
|
|
if (action) {
|
|
|
|
Glib::RefPtr<ToggleAction> tact = Glib::RefPtr<ToggleAction>::cast_dynamic(action);
|
|
|
|
if (tact) {
|
|
|
|
ignore_dual_punch = true;
|
|
|
|
tact->set_active (false);
|
|
|
|
ignore_dual_punch = false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
ARDOUR_UI::toggle_punch ()
|
|
|
|
{
|
|
|
|
if (ignore_dual_punch) {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
Glib::RefPtr<Action> action = ActionManager::get_action ("Transport", "TogglePunch");
|
|
|
|
|
|
|
|
if (action) {
|
|
|
|
|
|
|
|
Glib::RefPtr<ToggleAction> tact = Glib::RefPtr<ToggleAction>::cast_dynamic(action);
|
|
|
|
|
|
|
|
if (!tact) {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* drive the other two actions from this one */
|
|
|
|
|
|
|
|
Glib::RefPtr<Action> in_action = ActionManager::get_action ("Transport", "TogglePunchIn");
|
|
|
|
Glib::RefPtr<Action> out_action = ActionManager::get_action ("Transport", "TogglePunchOut");
|
|
|
|
|
|
|
|
if (in_action && out_action) {
|
|
|
|
Glib::RefPtr<ToggleAction> tiact = Glib::RefPtr<ToggleAction>::cast_dynamic(in_action);
|
|
|
|
Glib::RefPtr<ToggleAction> toact = Glib::RefPtr<ToggleAction>::cast_dynamic(out_action);
|
|
|
|
tiact->set_active (tact->get_active());
|
|
|
|
toact->set_active (tact->get_active());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2006-01-08 00:19:38 -05:00
|
|
|
void
|
|
|
|
ARDOUR_UI::toggle_punch_in ()
|
|
|
|
{
|
2009-10-20 17:58:46 -04:00
|
|
|
Glib::RefPtr<Action> act = ActionManager::get_action (X_("Transport"), X_("TogglePunchIn"));
|
|
|
|
if (!act) {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
Glib::RefPtr<ToggleAction> tact = Glib::RefPtr<ToggleAction>::cast_dynamic (act);
|
|
|
|
if (!tact) {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (tact->get_active() != session->config.get_punch_in()) {
|
|
|
|
session->config.set_punch_in (tact->get_active ());
|
|
|
|
}
|
|
|
|
|
|
|
|
if (tact->get_active()) {
|
|
|
|
/* if punch-in is turned on, make sure the loop/punch ruler is visible, and stop it being hidden,
|
|
|
|
to avoid confusing the user */
|
|
|
|
show_loop_punch_ruler_and_disallow_hide ();
|
|
|
|
}
|
|
|
|
|
|
|
|
reenable_hide_loop_punch_ruler_if_appropriate ();
|
2006-01-08 00:19:38 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
ARDOUR_UI::toggle_punch_out ()
|
|
|
|
{
|
2009-10-20 17:58:46 -04:00
|
|
|
Glib::RefPtr<Action> act = ActionManager::get_action (X_("Transport"), X_("TogglePunchOut"));
|
|
|
|
if (!act) {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
Glib::RefPtr<ToggleAction> tact = Glib::RefPtr<ToggleAction>::cast_dynamic (act);
|
|
|
|
if (!tact) {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (tact->get_active() != session->config.get_punch_out()) {
|
|
|
|
session->config.set_punch_out (tact->get_active ());
|
|
|
|
}
|
|
|
|
|
|
|
|
if (tact->get_active()) {
|
|
|
|
/* if punch-out is turned on, make sure the loop/punch ruler is visible, and stop it being hidden,
|
|
|
|
to avoid confusing the user */
|
|
|
|
show_loop_punch_ruler_and_disallow_hide ();
|
|
|
|
}
|
|
|
|
|
|
|
|
reenable_hide_loop_punch_ruler_if_appropriate ();
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
ARDOUR_UI::show_loop_punch_ruler_and_disallow_hide ()
|
|
|
|
{
|
|
|
|
Glib::RefPtr<Action> act = ActionManager::get_action (X_("Rulers"), "toggle-loop-punch-ruler");
|
|
|
|
if (!act) {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
act->set_sensitive (false);
|
|
|
|
|
|
|
|
Glib::RefPtr<ToggleAction> tact = Glib::RefPtr<ToggleAction>::cast_dynamic (act);
|
|
|
|
if (!tact) {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (!tact->get_active()) {
|
|
|
|
tact->set_active ();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/* This is a bit of a silly name for a method */
|
|
|
|
void
|
|
|
|
ARDOUR_UI::reenable_hide_loop_punch_ruler_if_appropriate ()
|
|
|
|
{
|
|
|
|
if (!session->config.get_punch_in() && !session->config.get_punch_out()) {
|
|
|
|
/* if punch in/out are now both off, reallow hiding of the loop/punch ruler */
|
|
|
|
Glib::RefPtr<Action> act = ActionManager::get_action (X_("Rulers"), "toggle-loop-punch-ruler");
|
|
|
|
if (act) {
|
|
|
|
act->set_sensitive (true);
|
|
|
|
}
|
|
|
|
}
|
2006-01-08 00:19:38 -05:00
|
|
|
}
|
|
|
|
|
2006-09-25 17:24:00 -04:00
|
|
|
void
|
2006-08-31 09:23:43 -04:00
|
|
|
ARDOUR_UI::toggle_video_sync()
|
|
|
|
{
|
|
|
|
Glib::RefPtr<Action> act = ActionManager::get_action ("Transport", "ToggleVideoSync");
|
|
|
|
if (act) {
|
|
|
|
Glib::RefPtr<ToggleAction> tact = Glib::RefPtr<ToggleAction>::cast_dynamic(act);
|
2009-05-15 21:53:43 -04:00
|
|
|
session->config.set_use_video_sync (tact->get_active());
|
2006-08-31 09:23:43 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2006-01-19 13:05:31 -05:00
|
|
|
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()) {
|
|
|
|
maximise_editing_space ();
|
|
|
|
} else {
|
|
|
|
restore_editing_space ();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2006-01-07 21:56:49 -05:00
|
|
|
void
|
2009-11-09 15:05:18 -05:00
|
|
|
ARDOUR_UI::setup_session_options ()
|
2006-01-07 21:56:49 -05:00
|
|
|
{
|
2009-11-09 15:05:18 -05:00
|
|
|
session->config.ParameterChanged.connect (mem_fun (*this, &ARDOUR_UI::parameter_changed));
|
|
|
|
session->config.map_parameters (mem_fun (*this, &ARDOUR_UI::parameter_changed));
|
2006-01-07 21:56:49 -05:00
|
|
|
}
|
|
|
|
|
2009-11-09 15:05:18 -05:00
|
|
|
#if 0
|
2006-01-07 21:56:49 -05:00
|
|
|
void
|
2009-11-09 15:05:18 -05:00
|
|
|
ARDOUR_UI::handle_sync_change ()
|
2006-01-07 21:56:49 -05:00
|
|
|
{
|
2009-11-09 15:05:18 -05:00
|
|
|
if (!session) {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
if (!session->config.get_external_sync()) {
|
|
|
|
sync_button.set_label (_("Internal"));
|
|
|
|
ActionManager::get_action ("Transport", "ToggleAutoPlay")->set_sensitive (true);
|
|
|
|
ActionManager::get_action ("Transport", "ToggleAutoReturn")->set_sensitive (true);
|
|
|
|
} else {
|
|
|
|
sync_button.set_label (_("External"));
|
|
|
|
/* XXX need to make auto-play is off as well as insensitive */
|
|
|
|
ActionManager::get_action ("Transport", "ToggleAutoPlay")->set_sensitive (false);
|
|
|
|
ActionManager::get_action ("Transport", "ToggleAutoReturn")->set_sensitive (false);
|
|
|
|
}
|
2006-01-07 21:56:49 -05:00
|
|
|
|
|
|
|
}
|
2009-11-09 15:05:18 -05:00
|
|
|
#endif
|
2006-01-07 21:56:49 -05:00
|
|
|
|
|
|
|
void
|
2009-05-15 21:22:43 -04:00
|
|
|
ARDOUR_UI::parameter_changed (std::string p)
|
2006-09-25 17:24:00 -04:00
|
|
|
{
|
2009-05-15 21:22:43 -04:00
|
|
|
ENSURE_GUI_THREAD (bind (mem_fun (*this, &ARDOUR_UI::parameter_changed), p));
|
2007-01-17 15:20:19 -05:00
|
|
|
|
2009-11-09 15:05:18 -05:00
|
|
|
if (p == "external-sync") {
|
2009-11-09 23:30:08 -05:00
|
|
|
|
|
|
|
ActionManager::map_some_state ("Transport", "ToggleExternalSync", mem_fun (session->config, &SessionConfiguration::get_external_sync));
|
|
|
|
|
2009-11-09 15:05:18 -05:00
|
|
|
if (!session->config.get_external_sync()) {
|
|
|
|
sync_button.set_label (_("Internal"));
|
2007-04-11 09:07:51 -04:00
|
|
|
ActionManager::get_action ("Transport", "ToggleAutoPlay")->set_sensitive (true);
|
|
|
|
ActionManager::get_action ("Transport", "ToggleAutoReturn")->set_sensitive (true);
|
2009-11-09 15:05:18 -05:00
|
|
|
} else {
|
|
|
|
sync_button.set_label (sync_source_to_string (session->config.get_sync_source()));
|
2007-04-11 09:07:51 -04:00
|
|
|
/* XXX need to make auto-play is off as well as insensitive */
|
|
|
|
ActionManager::get_action ("Transport", "ToggleAutoPlay")->set_sensitive (false);
|
|
|
|
ActionManager::get_action ("Transport", "ToggleAutoReturn")->set_sensitive (false);
|
|
|
|
}
|
2009-11-09 15:05:18 -05:00
|
|
|
|
2009-05-15 21:22:43 -04:00
|
|
|
} else if (p == "send-mtc") {
|
2006-09-25 17:24:00 -04:00
|
|
|
|
2009-05-13 20:13:27 -04:00
|
|
|
ActionManager::map_some_state ("options", "SendMTC", &RCConfiguration::get_send_mtc);
|
2006-09-25 17:24:00 -04:00
|
|
|
|
2009-05-15 21:22:43 -04:00
|
|
|
} else if (p == "send-mmc") {
|
2006-09-25 17:24:00 -04:00
|
|
|
|
2009-05-13 20:13:27 -04:00
|
|
|
ActionManager::map_some_state ("options", "SendMMC", &RCConfiguration::get_send_mmc);
|
2006-09-25 17:24:00 -04:00
|
|
|
|
2009-05-15 21:22:43 -04:00
|
|
|
} else if (p == "use-osc") {
|
2007-04-11 09:07:51 -04:00
|
|
|
|
|
|
|
#ifdef HAVE_LIBLO
|
|
|
|
if (Config->get_use_osc()) {
|
|
|
|
osc->start ();
|
|
|
|
} else {
|
|
|
|
osc->stop ();
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
2009-05-15 21:22:43 -04:00
|
|
|
} else if (p == "mmc-control") {
|
2009-05-13 20:13:27 -04:00
|
|
|
ActionManager::map_some_state ("options", "UseMMC", &RCConfiguration::get_mmc_control);
|
2009-05-15 21:22:43 -04:00
|
|
|
} else if (p == "midi-feedback") {
|
2009-05-13 20:13:27 -04:00
|
|
|
ActionManager::map_some_state ("options", "SendMIDIfeedback", &RCConfiguration::get_midi_feedback);
|
2009-05-15 21:22:43 -04:00
|
|
|
} else if (p == "auto-play") {
|
2009-05-13 20:13:27 -04:00
|
|
|
ActionManager::map_some_state ("Transport", "ToggleAutoPlay", mem_fun (session->config, &SessionConfiguration::get_auto_play));
|
2009-05-15 21:22:43 -04:00
|
|
|
} else if (p == "auto-return") {
|
2009-05-13 20:13:27 -04:00
|
|
|
ActionManager::map_some_state ("Transport", "ToggleAutoReturn", mem_fun (session->config, &SessionConfiguration::get_auto_return));
|
2009-05-15 21:22:43 -04:00
|
|
|
} else if (p == "auto-input") {
|
2009-05-13 20:13:27 -04:00
|
|
|
ActionManager::map_some_state ("Transport", "ToggleAutoInput", mem_fun (session->config, &SessionConfiguration::get_auto_input));
|
2009-05-15 21:22:43 -04:00
|
|
|
} else if (p == "punch-out") {
|
2009-05-13 20:13:27 -04:00
|
|
|
ActionManager::map_some_state ("Transport", "TogglePunchOut", mem_fun (session->config, &SessionConfiguration::get_punch_out));
|
|
|
|
if (!session->config.get_punch_out()) {
|
2008-03-17 16:54:03 -04:00
|
|
|
unset_dual_punch ();
|
|
|
|
}
|
2009-05-15 21:22:43 -04:00
|
|
|
} else if (p == "punch-in") {
|
2009-05-13 20:13:27 -04:00
|
|
|
ActionManager::map_some_state ("Transport", "TogglePunchIn", mem_fun (session->config, &SessionConfiguration::get_punch_in));
|
|
|
|
if (!session->config.get_punch_in()) {
|
2008-03-17 16:54:03 -04:00
|
|
|
unset_dual_punch ();
|
|
|
|
}
|
2009-05-15 21:22:43 -04:00
|
|
|
} else if (p == "clicking") {
|
2009-05-13 20:13:27 -04:00
|
|
|
ActionManager::map_some_state ("Transport", "ToggleClick", &RCConfiguration::get_clicking);
|
2009-05-15 21:22:43 -04:00
|
|
|
} else if (p == "jack-time-master") {
|
2009-05-15 21:53:43 -04:00
|
|
|
ActionManager::map_some_state ("Transport", "ToggleTimeMaster", mem_fun (session->config, &SessionConfiguration::get_jack_time_master));
|
2009-05-15 21:22:43 -04:00
|
|
|
} else if (p == "use-video-sync") {
|
2009-05-15 21:53:43 -04:00
|
|
|
ActionManager::map_some_state ("Transport", "ToggleVideoSync", mem_fun (session->config, &SessionConfiguration::get_use_video_sync));
|
2009-05-15 21:22:43 -04:00
|
|
|
} else if (p == "shuttle-behaviour") {
|
2006-09-25 17:24:00 -04:00
|
|
|
|
|
|
|
switch (Config->get_shuttle_behaviour ()) {
|
|
|
|
case Sprung:
|
|
|
|
shuttle_style_button.set_active_text (_("sprung"));
|
|
|
|
shuttle_fract = 0.0;
|
|
|
|
shuttle_box.queue_draw ();
|
|
|
|
if (session) {
|
|
|
|
if (session->transport_rolling()) {
|
|
|
|
shuttle_fract = SHUTTLE_FRACT_SPEED1;
|
|
|
|
session->request_transport_speed (1.0);
|
|
|
|
}
|
|
|
|
}
|
2006-01-07 21:56:49 -05:00
|
|
|
break;
|
2006-09-25 17:24:00 -04:00
|
|
|
case Wheel:
|
|
|
|
shuttle_style_button.set_active_text (_("wheel"));
|
2006-01-07 21:56:49 -05:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
2009-05-15 21:22:43 -04:00
|
|
|
} else if (p == "shuttle-units") {
|
2008-08-04 18:37:24 -04:00
|
|
|
|
2006-09-25 17:24:00 -04:00
|
|
|
switch (Config->get_shuttle_units()) {
|
|
|
|
case Percentage:
|
|
|
|
shuttle_units_button.set_label("% ");
|
2006-01-07 21:56:49 -05:00
|
|
|
break;
|
2006-09-25 17:24:00 -04:00
|
|
|
case Semitones:
|
|
|
|
shuttle_units_button.set_label(_("ST"));
|
2006-01-07 21:56:49 -05:00
|
|
|
break;
|
|
|
|
}
|
2009-10-26 10:38:58 -04:00
|
|
|
} else if (p == "video-pullup" || p == "timecode-format") {
|
2009-12-01 08:21:41 -05:00
|
|
|
reset_main_clocks ();
|
2009-05-15 21:22:43 -04:00
|
|
|
} else if (p == "show-track-meters") {
|
2008-01-10 16:20:59 -05:00
|
|
|
editor->toggle_meter_updating();
|
2007-10-11 18:07:47 -04:00
|
|
|
}
|
2006-01-07 21:56:49 -05:00
|
|
|
}
|
2009-12-01 08:21:41 -05:00
|
|
|
|
|
|
|
void
|
|
|
|
ARDOUR_UI::reset_main_clocks ()
|
|
|
|
{
|
|
|
|
ENSURE_GUI_THREAD (mem_fun (*this, &ARDOUR_UI::reset_main_clocks));
|
|
|
|
|
|
|
|
if (session) {
|
|
|
|
primary_clock.set (session->audible_frame(), true);
|
|
|
|
secondary_clock.set (session->audible_frame(), true);
|
|
|
|
} else {
|
|
|
|
primary_clock.set (0, true);
|
|
|
|
secondary_clock.set (0, true);
|
|
|
|
}
|
|
|
|
}
|