diff --git a/gtk2_ardour/ardour.menus.in b/gtk2_ardour/ardour.menus.in index c083d58427..b3a5be159e 100644 --- a/gtk2_ardour/ardour.menus.in +++ b/gtk2_ardour/ardour.menus.in @@ -49,7 +49,8 @@
#ifdef __APPLE__ diff --git a/gtk2_ardour/ardour_ui_ed.cc b/gtk2_ardour/ardour_ui_ed.cc index 1acaa41f3d..d44da988f6 100644 --- a/gtk2_ardour/ardour_ui_ed.cc +++ b/gtk2_ardour/ardour_ui_ed.cc @@ -238,7 +238,11 @@ ARDOUR_UI::install_actions () act = ActionManager::register_action (main_actions, X_("Export"), _("Export")); ActionManager::session_sensitive_actions.push_back (act); - act = ActionManager::register_action (main_actions, X_("CleanupUnused"), _("Clean-up Unused Sources..."), sigc::mem_fun (*(ARDOUR_UI::instance()), &ARDOUR_UI::cleanup)); + act = global_actions.register_action (main_actions, X_("CleanupUnusedSources"), _("Clean-up Unused Sources..."), sigc::mem_fun (*(ARDOUR_UI::instance()), &ARDOUR_UI::cleanup)); + ActionManager::session_sensitive_actions.push_back (act); + ActionManager::write_sensitive_actions.push_back (act); + + act = global_actions.register_action (main_actions, X_("CleanupUnusedRegions"), _("Clean-up Unused Regions..."), sigc::mem_fun (*editor, &PublicEditor::cleanup_regions)); ActionManager::session_sensitive_actions.push_back (act); ActionManager::write_sensitive_actions.push_back (act); diff --git a/gtk2_ardour/editor.cc b/gtk2_ardour/editor.cc index 911f46213e..2e2bba3c89 100644 --- a/gtk2_ardour/editor.cc +++ b/gtk2_ardour/editor.cc @@ -1948,7 +1948,7 @@ Editor::add_selection_context_items (Menu_Helpers::MenuList& edit_items) edit_items.push_back (SeparatorElem()); edit_items.push_back (MenuElem (_("Separate"), mem_fun(*this, &Editor::separate_region_from_selection))); - edit_items.push_back (MenuElem (_("Convert to Region in Region List"), sigc::mem_fun(*this, &Editor::new_region_from_selection))); +// edit_items.push_back (MenuElem (_("Convert to Region in Region List"), sigc::mem_fun(*this, &Editor::new_region_from_selection))); edit_items.push_back (SeparatorElem()); edit_items.push_back (MenuElem (_("Select All in Range"), sigc::mem_fun(*this, &Editor::select_all_selectables_using_time_selection))); @@ -1968,8 +1968,8 @@ Editor::add_selection_context_items (Menu_Helpers::MenuList& edit_items) edit_items.push_back (SeparatorElem()); edit_items.push_back (MenuElem (_("Consolidate Range"), sigc::bind (sigc::mem_fun(*this, &Editor::bounce_range_selection), true, false))); edit_items.push_back (MenuElem (_("Consolidate Range with Processing"), sigc::bind (sigc::mem_fun(*this, &Editor::bounce_range_selection), true, true))); - edit_items.push_back (MenuElem (_("Bounce Range to Region List"), sigc::bind (sigc::mem_fun(*this, &Editor::bounce_range_selection), false, false))); - edit_items.push_back (MenuElem (_("Bounce Range to Region List with Processing"), sigc::bind (sigc::mem_fun(*this, &Editor::bounce_range_selection), false, true))); + edit_items.push_back (MenuElem (_("Bounce Range to Source List"), sigc::bind (sigc::mem_fun(*this, &Editor::bounce_range_selection), false, false))); + edit_items.push_back (MenuElem (_("Bounce Range to Source List with Processing"), sigc::bind (sigc::mem_fun(*this, &Editor::bounce_range_selection), false, true))); edit_items.push_back (MenuElem (_("Export Range..."), sigc::mem_fun(*this, &Editor::export_selection))); if (ARDOUR_UI::instance()->video_timeline->get_duration() > 0) { edit_items.push_back (MenuElem (_("Export Video Range..."), sigc::bind (sigc::mem_fun(*(ARDOUR_UI::instance()), &ARDOUR_UI::export_video), true))); @@ -4277,6 +4277,13 @@ Editor::audio_region_selection_covers (samplepos_t where) return false; } +void +Editor::cleanup_regions () +{ + _regions->remove_unused_regions(); +} + + void Editor::prepare_for_cleanup () { diff --git a/gtk2_ardour/editor.h b/gtk2_ardour/editor.h index 753e718fa9..64de32c240 100644 --- a/gtk2_ardour/editor.h +++ b/gtk2_ardour/editor.h @@ -388,6 +388,8 @@ public: void select_topmost_track (); + void cleanup_regions (); + void prepare_for_cleanup (); void finish_cleanup (); diff --git a/gtk2_ardour/editor_actions.cc b/gtk2_ardour/editor_actions.cc index f984ee7c26..8036175d80 100644 --- a/gtk2_ardour/editor_actions.cc +++ b/gtk2_ardour/editor_actions.cc @@ -680,7 +680,7 @@ Editor::register_actions () /* the next two are duplicate items with different names for use in two different contexts */ - act = reg_sens (editor_actions, X_("addExternalAudioToRegionList"), _("Import to Region List..."), sigc::bind (sigc::mem_fun(*this, &Editor::add_external_audio_action), ImportAsRegion)); + act = reg_sens (editor_actions, X_("addExternalAudioToRegionList"), _("Import to Source List..."), sigc::bind (sigc::mem_fun(*this, &Editor::add_external_audio_action), ImportAsRegion)); ActionManager::write_sensitive_actions.push_back (act); act = ActionManager::register_action (editor_actions, X_("importFromSession"), _("Import from Session"), sigc::mem_fun(*this, &Editor::session_import_dialog)); @@ -1559,7 +1559,7 @@ Editor::register_region_actions () /* PART 2: actions that are not related to the selection, but for which the edit point type and location is important */ - register_region_action (_region_actions, RegionActionTarget (ListSelection), "insert-region-from-region-list", _("Insert Region from Region List"), sigc::bind (sigc::mem_fun (*this, &Editor::insert_region_list_selection), 1)); +// register_region_action (_region_actions, RegionActionTarget (ListSelection), "insert-region-from-region-list", _("Insert Region from Region List"), sigc::bind (sigc::mem_fun (*this, &Editor::insert_region_list_selection), 1)); /* PART 3: actions that operate on the selection and also require the edit point location */ diff --git a/gtk2_ardour/editor_regions.cc b/gtk2_ardour/editor_regions.cc index eaa83bc339..d03d06c085 100644 --- a/gtk2_ardour/editor_regions.cc +++ b/gtk2_ardour/editor_regions.cc @@ -75,6 +75,8 @@ struct ColumnInfo { const char* tooltip; }; +//#define SHOW_REGION_EXTRAS + EditorRegions::EditorRegions (Editor* e) : EditorComponent (e) , old_focus (0) @@ -148,15 +150,18 @@ EditorRegions::EditorRegions (Editor* e) _display.append_column (*col_name); _display.append_column (*col_tags); _display.append_column (*col_start); + _display.append_column (*col_length); _display.append_column (*col_locked); _display.append_column (*col_glued); _display.append_column (*col_muted); _display.append_column (*col_opaque); + +#ifdef SHOW_REGION_EXTRAS _display.append_column (*col_end); - _display.append_column (*col_length); - _display.append_column (*col_sync); + _display.append_column (*col_sync); _display.append_column (*col_fadein); _display.append_column (*col_fadeout); +#endif TreeViewColumn* col; Gtk::Label* l; @@ -165,15 +170,17 @@ EditorRegions::EditorRegions (Editor* e) { 0, 0, ALIGN_LEFT, _("Region"), _("Region name, with number of channels in []'s") }, { 1, 1, ALIGN_LEFT, _("Tags"), _("Tags") }, { 2, 15, ALIGN_RIGHT, _("Start"), _("Position of start of region") }, - { 3, -1, ALIGN_CENTER, S_("Lock|L"), _("Region position locked?") }, - { 4, -1, ALIGN_CENTER, S_("Gain|G"), _("Region position glued to Bars|Beats time?") }, - { 5, -1, ALIGN_CENTER, S_("Mute|M"), _("Region muted?") }, - { 6, -1, ALIGN_CENTER, S_("Opaque|O"), _("Region opaque (blocks regions below it from being heard)?") }, - { 7, -1, ALIGN_RIGHT, _("End"), _("Position of end of region") }, - { 8, -1, ALIGN_RIGHT, _("Length"), _("Length of the region") }, + { 3, -1, ALIGN_RIGHT, _("Length"), _("Length of the region") }, + { 4, -1, ALIGN_CENTER, S_("Lock|L"), _("Region position locked?") }, + { 5, -1, ALIGN_CENTER, S_("Gain|G"), _("Region position glued to Bars|Beats time?") }, + { 6, -1, ALIGN_CENTER, S_("Mute|M"), _("Region muted?") }, + { 7, -1, ALIGN_CENTER, S_("Opaque|O"), _("Region opaque (blocks regions below it from being heard)?") }, +#ifdef SHOW_REGION_EXTRAS + { 8, -1, ALIGN_RIGHT, _("End"), _("Position of end of region") }, { 9, -1, ALIGN_RIGHT, _("Sync"), _("Position of region sync point, relative to start of the region") }, { 10,-1, ALIGN_RIGHT, _("Fade In"), _("Length of region fade-in (units: secondary clock), () if disabled") }, { 11,-1, ALIGN_RIGHT, _("Fade Out"), _("Length of region fade-out (units: secondary clock), () if disabled") }, +#endif { -1,-1, ALIGN_CENTER, 0, 0 } }; @@ -232,19 +239,22 @@ EditorRegions::EditorRegions (Editor* e) region_tags_cell->signal_edited().connect (sigc::mem_fun (*this, &EditorRegions::tag_edit)); region_tags_cell->signal_editing_started().connect (sigc::mem_fun (*this, &EditorRegions::tag_editing_started)); - CellRendererToggle* locked_cell = dynamic_cast