Compare commits

...

4 Commits

Author SHA1 Message Date
Ben Loftis 0709c20adb add a note why preffered-time-domain is NOT editable from rc_option_editor 2023-10-01 14:01:11 -05:00
Ben Loftis 2f4838db68 if user changes session:property:time-domain, switch the rulers
* if the user has explicitly made any ruler settings, they will be found
   and this will not take effect
2023-10-01 13:59:30 -05:00
Ben Loftis df479bf8cd pre-load the session timebase selector with the user pref 2023-10-01 13:58:45 -05:00
Ben Loftis 6c68817b26 add a user config var for preferred time domain (libardour part)
(as opposed to default_time_domain which is the per-session default)
2023-10-01 13:57:28 -05:00
5 changed files with 11 additions and 5 deletions

View File

@ -1812,6 +1812,7 @@ Editor::parameter_changed (std::string p)
queue_redisplay_track_views ();
} else if (p == "default-time-domain") {
stretch_marker_cb.set_sensitive (_session->config.get_default_time_domain () == Temporal::BeatTime);
restore_ruler_visibility(); /* NOTE: if user has explicitly set rulers then this will have no effect */
}
}

View File

@ -2388,6 +2388,12 @@ RCOptionEditor::RCOptionEditor ()
_("When opening an existing session, if the most recent audio engine is available and can open the session's sample rate, the audio engine dialog may be skipped."));
add_option (_("General"), bo );
#if 0
/* "preferred-time-domain"
unlike other preferences, this variable would not actually 'change' anything; the session's domain is stored in session-config
so we don't show the rc-config value here. instead, it is invisibly stored in the rc-config, with the user's most recent selection */
#endif
add_option (_("General"), new OptionEditorHeading (S_("Options|Editor Undo")));
add_option (_("General"), new UndoOptions (_rc_config));

View File

@ -676,11 +676,7 @@ SessionDialog::setup_new_session_page ()
timebase_chooser.append (_("Audio Time"));
timebase_chooser.append (_("Beat Time"));
#ifdef MIXBUS
timebase_chooser.set_active (1);
#else
timebase_chooser.set_active (0);
#endif
timebase_chooser.set_active (Config->get_preferred_time_domain() == Temporal::BeatTime ? 1 : 0);
//Template & Template Description area
HBox* template_hbox = manage (new HBox);

View File

@ -30,6 +30,8 @@
the value of the variable.
*****************************************************/
CONFIG_VARIABLE (Temporal::TimeDomain, preferred_time_domain, "preferred_time_domain", Temporal::BeatTime)
/* IO connection */
CONFIG_VARIABLE (bool, auto_connect_standard_busses, "auto-connect-standard-busses", true)

View File

@ -4588,6 +4588,7 @@ Session::config_changed (std::string p, bool ours)
Temporal::TimeDomain td = config.get_default_time_domain ();
std::cerr << "Setting time domain\n";
set_time_domain (td);
Config->set_preferred_time_domain(td); /* sync the global default time domain to this newly chosen one */
}
set_dirty ();