ARDOUR_UI::ARDOUR_UI (int *argcp, char **argvp[], const char* localedir)
- : Gtkmm2ext::UI (PROGRAM_NAME, argcp, argvp)
+ : Gtkmm2ext::UI (PROGRAM_NAME, X_("gui"), argcp, argvp)
, session_loaded (false)
, gui_object_state (new GUIObjectState)
, primary_clock (new MainClock (X_("primary"), X_("transport"), true ))
if (affect_transport) {
if (rolling) {
_session->request_stop (with_abort, true);
- } else if (!_session->config.get_external_sync()) {
+ } else {
+ /* the only external sync condition we can be in here
+ * would be Engine (JACK) sync, in which case we still
+ * want to do this.
+ */
+
if (UIConfiguration::instance().get_follow_edits() && ( editor->get_selection().time.front().start == _session->transport_frame() ) ) { //if playhead is exactly at the start of a range, we can assume it was placed there by follow_edits
_session->request_play_range (&editor->get_selection().time, true);
_session->set_requested_return_frame( editor->get_selection().time.front().start ); //force an auto-return here
void
ARDOUR_UI::toggle_session_auto_loop ()
{
+ if (!_session) {
+ return;
+ }
+
Location * looploc = _session->locations()->auto_loop_location();
- if (!_session || !looploc) {
+ if (!looploc) {
return;
}
if ((r = _session->route_by_remote_id (rid)) != 0) {
- Track* t;
+ boost::shared_ptr<Track> t;
- if ((t = dynamic_cast<Track*>(r.get())) != 0) {
- t->set_record_enabled (!t->record_enabled(), this);
+ if ((t = boost::dynamic_pointer_cast<Track>(r)) != 0) {
+ t->set_record_enabled (!t->record_enabled(), Controllable::UseGroup);
}
}
}
}
}
+void
+ARDOUR_UI::quick_snapshot_session (bool switch_to_it)
+{
+ char timebuf[128];
+ time_t n;
+ struct tm local_time;
+
+ time (&n);
+ localtime_r (&n, &local_time);
+ strftime (timebuf, sizeof(timebuf), "%FT%H.%M.%S", &local_time);
+
+ save_state (timebuf, switch_to_it);
+}
+
+
bool
ARDOUR_UI::process_snapshot_session_prompter (ArdourPrompter& prompter, bool switch_to_it)
{
prompter.set_prompt (_("Name of new snapshot"));
}
- if (!switch_to_it) {
+ if (switch_to_it) {
+ prompter.set_initial_text (_session->snap_name());
+ } else {
char timebuf[128];
time_t n;
struct tm local_time;
void
ARDOUR_UI::load_from_application_api (const std::string& path)
{
- printf("ARDOUR_UI::load_from_application_api\n");
ARDOUR_COMMAND_LINE::session_name = path;
/* Cancel SessionDialog if it's visible to make OSX delegates work.
*
}
void
-ARDOUR_UI::TransportControllable::set_value (double val)
+ARDOUR_UI::TransportControllable::set_value (double val, PBD::Controllable::GroupControlDisposition /*group_override*/)
{
if (val < 0.5) {
/* do nothing: these are radio-style actions */