diff options
-rw-r--r-- | gtk2_ardour/ardour_ui.h | 2 | ||||
-rw-r--r-- | gtk2_ardour/ardour_ui_ed.cc | 1 | ||||
-rw-r--r-- | gtk2_ardour/ardour_ui_options.cc | 24 | ||||
-rw-r--r-- | gtk2_ardour/editor.cc | 6 | ||||
-rw-r--r-- | gtk2_ardour/editor.h | 20 | ||||
-rw-r--r-- | gtk2_ardour/editor_canvas.cc | 31 | ||||
-rw-r--r-- | gtk2_ardour/editor_mouse.cc | 3 | ||||
-rw-r--r-- | gtk2_ardour/editor_tempodisplay.cc | 3 | ||||
-rw-r--r-- | gtk2_ardour/icons/saelogo.png | bin | 0 -> 7863 bytes | |||
-rw-r--r-- | gtk2_ardour/sfdb_ui.cc | 21 | ||||
-rw-r--r-- | libs/ardour/ardour/configuration_vars.h | 1 | ||||
-rw-r--r-- | libs/pbd/SConscript | 1 |
12 files changed, 95 insertions, 18 deletions
diff --git a/gtk2_ardour/ardour_ui.h b/gtk2_ardour/ardour_ui.h index 1811a4db5a..cf082319bc 100644 --- a/gtk2_ardour/ardour_ui.h +++ b/gtk2_ardour/ardour_ui.h @@ -703,6 +703,7 @@ class ARDOUR_UI : public Gtkmm2ext::UI void toggle_RegionEquivalentsOverlap (); void toggle_PrimaryClockDeltaEditCursor (); void toggle_SecondaryClockDeltaEditCursor (); + void toggle_only_copy_imported_files (); void mtc_port_changed (); void map_solo_model (); @@ -714,6 +715,7 @@ class ARDOUR_UI : public Gtkmm2ext::UI void map_file_data_format (); void map_input_auto_connect (); void map_output_auto_connect (); + void map_only_copy_imported_files (); void parameter_changed (const char*); void set_meter_hold (ARDOUR::MeterHold); diff --git a/gtk2_ardour/ardour_ui_ed.cc b/gtk2_ardour/ardour_ui_ed.cc index a8124fde4f..440ad62746 100644 --- a/gtk2_ardour/ardour_ui_ed.cc +++ b/gtk2_ardour/ardour_ui_ed.cc @@ -419,6 +419,7 @@ ARDOUR_UI::install_actions () ActionManager::register_toggle_action (option_actions, X_("RegionEquivalentsOverlap"), _("Region equivalents overlap"), mem_fun (*this, &ARDOUR_UI::toggle_RegionEquivalentsOverlap)); ActionManager::register_toggle_action (option_actions, X_("PrimaryClockDeltaEditCursor"), _("Primary Clock delta to edit cursor"), mem_fun (*this, &ARDOUR_UI::toggle_PrimaryClockDeltaEditCursor)); ActionManager::register_toggle_action (option_actions, X_("SecondaryClockDeltaEditCursor"), _("Secondary Clock delta to edit cursor"), mem_fun (*this, &ARDOUR_UI::toggle_SecondaryClockDeltaEditCursor)); + ActionManager::register_toggle_action (option_actions, X_("OnlyCopyImportedFiles"), _("Always copy imported files"), mem_fun (*this, &ARDOUR_UI::toggle_only_copy_imported_files)); RadioAction::Group denormal_group; 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 @@ -82,6 +82,12 @@ ARDOUR_UI::toggle_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) { const char *action = 0; @@ -781,6 +787,20 @@ ARDOUR_UI::map_output_auto_connect () } void +ARDOUR_UI::map_only_copy_imported_files () +{ + Glib::RefPtr<Action> act = ActionManager::get_action ("options", X_("OnlyCopyImportedFiles")); + if (act) { + Glib::RefPtr<ToggleAction> tact = Glib::RefPtr<ToggleAction>::cast_dynamic(act); + + if (tact && !tact->get_active()) { + tact->set_active (Config->get_only_copy_imported_files()); + } + } + +} + +void ARDOUR_UI::map_meter_falloff () { const char* action = X_("MeterFalloffMedium"); @@ -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 diff --git a/gtk2_ardour/editor.cc b/gtk2_ardour/editor.cc index 403542f44d..cd7dc46ce8 100644 --- a/gtk2_ardour/editor.cc +++ b/gtk2_ardour/editor.cc @@ -260,6 +260,7 @@ Editor::Editor () autoscroll_active = false; autoscroll_timeout_tag = -1; interthread_progress_window = 0; + logo_item = 0; #ifdef FFT_ANALYSIS analysis_window = 0; @@ -852,7 +853,10 @@ Editor::tie_vertical_scrolling () playhead_cursor->set_y_axis (y1); edit_cursor->set_y_axis (y1); - + if (logo_item) { + logo_item->property_y() = y1; + } + controls_layout.get_vadjustment()->set_value (y1); #ifdef GTKOSX diff --git a/gtk2_ardour/editor.h b/gtk2_ardour/editor.h index f2a2b94f8e..fe2f3a6bcf 100644 --- a/gtk2_ardour/editor.h +++ b/gtk2_ardour/editor.h @@ -32,6 +32,7 @@ #include <libgnomecanvasmm/canvas.h> #include <libgnomecanvasmm/group.h> #include <libgnomecanvasmm/line.h> +#include <libgnomecanvasmm/pixbuf.h> #include <cmath> @@ -514,15 +515,16 @@ class Editor : public PublicEditor Gtk::EventBox time_button_event_box; Gtk::Frame time_button_frame; - ArdourCanvas::Group *minsec_group; - ArdourCanvas::Group *bbt_group; - ArdourCanvas::Group *smpte_group; - ArdourCanvas::Group *frame_group; - ArdourCanvas::Group *tempo_group; - ArdourCanvas::Group *meter_group; - ArdourCanvas::Group *marker_group; - ArdourCanvas::Group *range_marker_group; - ArdourCanvas::Group *transport_marker_group; + ArdourCanvas::Pixbuf* logo_item; + ArdourCanvas::Group* minsec_group; + ArdourCanvas::Group* bbt_group; + ArdourCanvas::Group* smpte_group; + ArdourCanvas::Group* frame_group; + ArdourCanvas::Group* tempo_group; + ArdourCanvas::Group* meter_group; + ArdourCanvas::Group* marker_group; + ArdourCanvas::Group* range_marker_group; + ArdourCanvas::Group* transport_marker_group; enum { ruler_metric_smpte = 0, diff --git a/gtk2_ardour/editor_canvas.cc b/gtk2_ardour/editor_canvas.cc index 28a61b9916..ff1176d071 100644 --- a/gtk2_ardour/editor_canvas.cc +++ b/gtk2_ardour/editor_canvas.cc @@ -18,10 +18,12 @@ */ #include <libgnomecanvasmm/init.h> +#include <libgnomecanvasmm/pixbuf.h> #include <jack/types.h> #include <gtkmm2ext/utils.h> #include <ardour/audioregion.h> +#include <ardour/profile.h> #include "ardour_ui.h" #include "editor.h" @@ -130,6 +132,18 @@ Editor::initialize_canvas () delete font; verbose_cursor_visible = false; + + /* on the bottom, an image */ + + if (Profile->get_sae()) { + Image img (::get_icon (X_("saelogo"))); + logo_item = new ArdourCanvas::Pixbuf (*track_canvas.root(), 0.0, 0.0, img.get_pixbuf()); + logo_item->property_height_in_pixels() = true; + logo_item->property_width_in_pixels() = true; + logo_item->property_height_set() = true; + logo_item->property_width_set() = true; + logo_item->show (); + } /* a group to hold time (measure) lines */ @@ -237,6 +251,10 @@ Editor::initialize_canvas () initial_ruler_update_required = true; track_canvas.signal_size_allocate().connect (mem_fun(*this, &Editor::track_canvas_allocate)); + if (logo_item) { + logo_item->lower_to_bottom (); + } + ColorsChanged.connect (mem_fun (*this, &Editor::color_handler)); color_handler(); @@ -328,7 +346,12 @@ Editor::track_canvas_size_allocated () update_fixed_rulers(); redisplay_tempo (true); - + + if (logo_item) { + logo_item->property_height() = canvas_height; + logo_item->property_width() = canvas_width; + } + Resized (); /* EMIT_SIGNAL */ return false; @@ -682,7 +705,11 @@ Editor::canvas_horizontally_scrolled () last_canvas_frame = rightmost_frame; reset_scrolling_region (); } - + + if (logo_item) { + logo_item->property_x() = horizontal_adjustment.get_value (); + } + update_fixed_rulers (); redisplay_tempo (!_dragging_hscrollbar); diff --git a/gtk2_ardour/editor_mouse.cc b/gtk2_ardour/editor_mouse.cc index 58c786623d..8b7bdb4756 100644 --- a/gtk2_ardour/editor_mouse.cc +++ b/gtk2_ardour/editor_mouse.cc @@ -5045,9 +5045,6 @@ bool Editor::update_mouse_speed () { double speed; - double rev; - double dir; - static size_t update_cnt = 0; if (!_scrubbing) { session->request_transport_speed (0.0); diff --git a/gtk2_ardour/editor_tempodisplay.cc b/gtk2_ardour/editor_tempodisplay.cc index df16a8e47f..854f670121 100644 --- a/gtk2_ardour/editor_tempodisplay.cc +++ b/gtk2_ardour/editor_tempodisplay.cc @@ -276,6 +276,9 @@ Editor::draw_measures () cursor_group->raise_to_top(); time_line_group->lower_to_bottom(); + if (logo_item) { + logo_item->lower_to_bottom (); + } return; } diff --git a/gtk2_ardour/icons/saelogo.png b/gtk2_ardour/icons/saelogo.png Binary files differnew file mode 100644 index 0000000000..1352c4d51a --- /dev/null +++ b/gtk2_ardour/icons/saelogo.png diff --git a/gtk2_ardour/sfdb_ui.cc b/gtk2_ardour/sfdb_ui.cc index 6cefaa3895..21d56497fb 100644 --- a/gtk2_ardour/sfdb_ui.cc +++ b/gtk2_ardour/sfdb_ui.cc @@ -30,6 +30,7 @@ #include <glibmm/fileutils.h> #include <pbd/convert.h> +#include <pbd/fs.h> #include <pbd/tokenizer.h> #include <gtkmm2ext/utils.h> @@ -771,13 +772,18 @@ SoundFileOmega::reset_options () src_combo.set_sensitive (false); } - if (Profile->get_sae()) { + if (Config->get_only_copy_imported_files()) { + if (selection_can_be_embedded_with_links) { copy_files_btn.set_sensitive (true); } else { copy_files_btn.set_sensitive (false); } - } + + } else { + + copy_files_btn.set_sensitive (true); + } return true; } @@ -842,6 +848,7 @@ SoundFileOmega::check_info (const vector<ustring>& paths, bool& same_size, bool& return err; } + bool SoundFileOmega::check_link_status (const Session& s, const vector<ustring>& paths) { @@ -952,6 +959,16 @@ SoundFileOmega::SoundFileOmega (Gtk::Window& parent, string title, ARDOUR::Sessi vbox->pack_start (*hbox, false, false); options.pack_start (*vbox, false, false); + /* dummy entry for action combo so that it doesn't look odd if we + come up with no tracks selected. + */ + + str.clear (); + str.push_back (_("as new tracks")); + set_popdown_strings (action_combo, str); + action_combo.set_active_text (str.front()); + action_combo.set_sensitive (false); + l = manage (new Label); l->set_text (_("Insert:")); diff --git a/libs/ardour/ardour/configuration_vars.h b/libs/ardour/ardour/configuration_vars.h index 7ee00fc8ee..4bbfe89bdc 100644 --- a/libs/ardour/ardour/configuration_vars.h +++ b/libs/ardour/ardour/configuration_vars.h @@ -145,6 +145,7 @@ CONFIG_VARIABLE (bool, periodic_safety_backups, "periodic-safety-backups", true) CONFIG_VARIABLE (uint32_t, periodic_safety_backup_interval, "periodic-safety-backup-interval", 120) CONFIG_VARIABLE (float, automation_interval, "automation-interval", 50) CONFIG_VARIABLE (bool, sync_all_route_ordering, "sync-all-route-ordering", true) +CONFIG_VARIABLE (bool, only_copy_imported_files, "only-copy-imported-files", true) /* denormal management */ diff --git a/libs/pbd/SConscript b/libs/pbd/SConscript index 9e09d5513e..7a0e23d897 100644 --- a/libs/pbd/SConscript +++ b/libs/pbd/SConscript @@ -28,6 +28,7 @@ enumwriter.cc dmalloc.cc error.cc fpu.cc +fs.cc id.cc misc.c mountpoint.cc |