Provide action buttons to launch prefs-related windows

This commit is contained in:
Ben Loftis 2021-02-18 09:43:25 -06:00 committed by Robin Gareus
parent a59263707a
commit e70c6560af
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04
2 changed files with 21 additions and 0 deletions

View File

@ -2302,6 +2302,10 @@ RCOptionEditor::RCOptionEditor ()
add_option (_("General"), new OptionEditorHeading (_("Audio/MIDI Setup")));
add_option (_("General"),
new RcActionButton (_("Show Audio/MIDI Setup Window"),
sigc::mem_fun (*this, &RCOptionEditor::show_audio_setup)));
bo = new BoolOption (
"try-autostart-engine",
_("Try to auto-launch audio/midi engine"),
@ -3448,6 +3452,10 @@ These settings will only take effect after %1 is restarted.\n\
add_option (_("Transport/Chase"), new OptionEditorHeading (_("Transport Masters")));
add_option (_("Transport/Chase"),
new RcActionButton (_("Show Transport Masters Window"),
sigc::mem_fun (*this, &RCOptionEditor::show_transport_masters)));
_sync_framerate = new BoolOption (
"timecode-sync-frame-rate",
_("Match session video frame rate to external timecode"),
@ -4449,6 +4457,16 @@ RCOptionEditor::parameter_changed (string const & p)
}
}
void RCOptionEditor::show_audio_setup () {
Glib::RefPtr<ToggleAction> tact = ActionManager::get_toggle_action ("Window", "toggle-audio-midi-setup");
tact->set_active();
}
void RCOptionEditor::show_transport_masters () {
Glib::RefPtr<ToggleAction> tact = ActionManager::get_toggle_action ("Window", "toggle-transport-masters");
tact->set_active();
}
void RCOptionEditor::plugin_scan_refresh () {
/* first argument says discover new plugins, second means be verbose */
PluginScanDialog psd (false, true);

View File

@ -63,6 +63,9 @@ private:
PBD::ScopedConnection parameter_change_connection;
PBD::ScopedConnection engine_started_connection;
void show_audio_setup ();
void show_transport_masters ();
/* plugin actions */
void plugin_scan_refresh ();
void plugin_reset_stats ();