From 53d6ccf0cc8d01f27c960395d08211c64ca91292 Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Tue, 25 Sep 2007 17:23:36 +0000 Subject: new controls for copy-only import; new logo item for canvas git-svn-id: svn://localhost/ardour2/branches/2.0-ongoing@2481 d708f5d6-7413-0410-9779-e7cbd77b26cf --- gtk2_ardour/ardour_ui_options.cc | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) (limited to 'gtk2_ardour/ardour_ui_options.cc') diff --git a/gtk2_ardour/ardour_ui_options.cc b/gtk2_ardour/ardour_ui_options.cc index 6a7dcbc194..adaa20db72 100644 --- a/gtk2_ardour/ardour_ui_options.cc +++ b/gtk2_ardour/ardour_ui_options.cc @@ -81,6 +81,12 @@ ARDOUR_UI::toggle_denormal_protection () ActionManager::toggle_config_state ("options", "DenormalProtection", &Configuration::set_denormal_protection, &Configuration::get_denormal_protection); } +void +ARDOUR_UI::toggle_only_copy_imported_files () +{ + ActionManager::toggle_config_state ("options", "OnlyCopyImportedFiles", &Configuration::set_only_copy_imported_files, &Configuration::get_only_copy_imported_files); +} + void ARDOUR_UI::set_native_file_header_format (HeaderFormat hf) { @@ -780,6 +786,20 @@ ARDOUR_UI::map_output_auto_connect () } } +void +ARDOUR_UI::map_only_copy_imported_files () +{ + Glib::RefPtr act = ActionManager::get_action ("options", X_("OnlyCopyImportedFiles")); + if (act) { + Glib::RefPtr tact = Glib::RefPtr::cast_dynamic(act); + + if (tact && !tact->get_active()) { + tact->set_active (Config->get_only_copy_imported_files()); + } + } + +} + void ARDOUR_UI::map_meter_falloff () { @@ -1085,7 +1105,9 @@ ARDOUR_UI::parameter_changed (const char* parameter_name) ActionManager::map_some_state ("options", "PrimaryClockDeltaEditCursor", &Configuration::get_primary_clock_delta_edit_cursor); } else if (PARAM_IS ("secondary-clock-delta-edit-cursor")) { ActionManager::map_some_state ("options", "SecondaryClockDeltaEditCursor", &Configuration::get_secondary_clock_delta_edit_cursor); - } + } else if (PARAM_IS ("only-copy-imported-files")) { + map_only_copy_imported_files (); + } #undef PARAM_IS -- cgit v1.2.3