mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-16 03:36:32 +01:00
[Summary] Implementing action, applied to MEDIA button
This commit is contained in:
parent
799f053eed
commit
ea4a1948a4
4 changed files with 22 additions and 1 deletions
|
|
@ -4603,3 +4603,18 @@ ARDOUR_UI::do_engine_setup (framecnt_t desired_sample_rate)
|
|||
|
||||
return 0;
|
||||
}
|
||||
|
||||
void
|
||||
ARDOUR_UI::open_media_folder ()
|
||||
{
|
||||
if (!_session) {
|
||||
return;
|
||||
}
|
||||
|
||||
//dbg_msg ("ARDOUR_UI::open_media_folder () : \n" + _session->session_directory ().sources_root ());
|
||||
#if defined (PLATFORM_WINDOWS)
|
||||
ShellExecute (NULL, "open", _session->session_directory ().sources_root ().c_str (), NULL, NULL, SW_SHOW);
|
||||
#elif defined (__APPLE__)
|
||||
#endif
|
||||
//dbg_msg ("ARDOUR_UI::open_media_folder () : \n" + _session->session_directory ().sources_root ());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -148,6 +148,7 @@ class ARDOUR_UI : public Gtkmm2ext::UI, public ARDOUR::SessionHandlePtr
|
|||
void launch_reference ();
|
||||
void show_about ();
|
||||
void hide_about ();
|
||||
void open_media_folder ();
|
||||
|
||||
void idle_load (const std::string& path);
|
||||
void finish();
|
||||
|
|
|
|||
|
|
@ -243,7 +243,10 @@ ARDOUR_UI::setup_transport ()
|
|||
act = ActionManager::get_action (X_("Common"), X_("toggle-meterbridge"));
|
||||
editor->get_waves_button ("meter_bridge_on_button").set_related_action (act);
|
||||
|
||||
update_output_operation_mode_buttons();
|
||||
act = ActionManager::get_action (X_("Common"), X_("OpenMediaFolder"));
|
||||
editor->get_waves_button ("media_button").set_related_action (act);
|
||||
|
||||
update_output_operation_mode_buttons();
|
||||
|
||||
transport_base.set_name ("TransportBase");
|
||||
transport_base.add (transport_hbox);
|
||||
|
|
|
|||
|
|
@ -220,6 +220,8 @@ ARDOUR_UI::install_actions ()
|
|||
ActionManager::register_action (common_actions, X_("Manual"), S_("Help|Manual"), mem_fun(*this, &ARDOUR_UI::launch_manual));
|
||||
ActionManager::register_action (common_actions, X_("Reference"), _("Reference"), mem_fun(*this, &ARDOUR_UI::launch_reference));
|
||||
|
||||
ActionManager::register_action (common_actions, X_("OpenMediaFolder"), _("OpenMediaFolder"), mem_fun(*this, &ARDOUR_UI::open_media_folder));
|
||||
|
||||
act = ActionManager::register_action (common_actions, X_("Save"), _("Save"), sigc::bind (sigc::mem_fun(*this, &ARDOUR_UI::save_state), string(""), false));
|
||||
ActionManager::session_sensitive_actions.push_back (act);
|
||||
ActionManager::write_sensitive_actions.push_back (act);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue