clicked_regionview = 0;
clicked_axisview = 0;
clicked_routeview = 0;
+ clicked_selection = 0;
clicked_control_point = 0;
last_update_frame = 0;
last_paste_pos = 0;
delete _snapshots;
delete _locations;
delete _playlist_selector;
+
+ for (list<XMLNode *>::iterator i = selection_op_history.begin(); i != selection_op_history.end(); ++i) {
+ delete *i;
+ }
}
XMLNode*
edit_items.push_back (SeparatorElem());
edit_items.push_back (MenuElem (_("Crop Region to Range"), sigc::mem_fun(*this, &Editor::crop_region_to_selection)));
- edit_items.push_back (MenuElem (_("Fill Range with Region"), sigc::mem_fun(*this, &Editor::region_fill_selection)));
edit_items.push_back (MenuElem (_("Duplicate Range"), sigc::bind (sigc::mem_fun(*this, &Editor::duplicate_range), false)));
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 (_("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 Region 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)));
MenuList& play_items = play_menu->items();
play_menu->set_name ("ArdourContextMenu");
- play_items.push_back (MenuElem (_("Play From Edit Point"), sigc::mem_fun(*this, &Editor::play_from_edit_point)));
- play_items.push_back (MenuElem (_("Play From Start"), sigc::mem_fun(*this, &Editor::play_from_start)));
+ play_items.push_back (MenuElem (_("Play from Edit Point"), sigc::mem_fun(*this, &Editor::play_from_edit_point)));
+ play_items.push_back (MenuElem (_("Play from Start"), sigc::mem_fun(*this, &Editor::play_from_start)));
play_items.push_back (MenuElem (_("Play Region"), sigc::mem_fun(*this, &Editor::play_selected_region)));
play_items.push_back (SeparatorElem());
play_items.push_back (MenuElem (_("Loop Region"), sigc::bind (sigc::mem_fun (*this, &Editor::set_loop_from_region), true)));
select_items.push_back (MenuElem (_("Set Range to Punch Range"), sigc::mem_fun(*this, &Editor::set_selection_from_punch)));
select_items.push_back (MenuElem (_("Set Range to Selected Regions"), sigc::mem_fun(*this, &Editor::set_selection_from_region)));
select_items.push_back (SeparatorElem());
- select_items.push_back (MenuElem (_("Select All After Edit Point"), sigc::bind (sigc::mem_fun(*this, &Editor::select_all_selectables_using_edit), true)));
- select_items.push_back (MenuElem (_("Select All Before Edit Point"), sigc::bind (sigc::mem_fun(*this, &Editor::select_all_selectables_using_edit), false)));
+ select_items.push_back (MenuElem (_("Select All After Edit Point"), sigc::bind (sigc::mem_fun(*this, &Editor::select_all_selectables_using_edit), true, true)));
+ select_items.push_back (MenuElem (_("Select All Before Edit Point"), sigc::bind (sigc::mem_fun(*this, &Editor::select_all_selectables_using_edit), false, true)));
select_items.push_back (MenuElem (_("Select All After Playhead"), sigc::bind (sigc::mem_fun(*this, &Editor::select_all_selectables_using_cursor), playhead_cursor, true)));
select_items.push_back (MenuElem (_("Select All Before Playhead"), sigc::bind (sigc::mem_fun(*this, &Editor::select_all_selectables_using_cursor), playhead_cursor, false)));
select_items.push_back (MenuElem (_("Select All Between Playhead and Edit Point"), sigc::bind (sigc::mem_fun(*this, &Editor::select_all_selectables_between), false)));
MenuList& play_items = play_menu->items();
play_menu->set_name ("ArdourContextMenu");
- play_items.push_back (MenuElem (_("Play From Edit Point"), sigc::mem_fun(*this, &Editor::play_from_edit_point)));
- play_items.push_back (MenuElem (_("Play From Start"), sigc::mem_fun(*this, &Editor::play_from_start)));
+ play_items.push_back (MenuElem (_("Play from Edit Point"), sigc::mem_fun(*this, &Editor::play_from_edit_point)));
+ play_items.push_back (MenuElem (_("Play from Start"), sigc::mem_fun(*this, &Editor::play_from_start)));
edit_items.push_back (MenuElem (_("Play"), *play_menu));
/* Selection */
select_items.push_back (MenuElem (_("Invert Selection in Track"), sigc::mem_fun(*this, &Editor::invert_selection_in_track)));
select_items.push_back (MenuElem (_("Invert Selection"), sigc::mem_fun(*this, &Editor::invert_selection)));
select_items.push_back (SeparatorElem());
- select_items.push_back (MenuElem (_("Select All After Edit Point"), sigc::bind (sigc::mem_fun(*this, &Editor::select_all_selectables_using_edit), true)));
- select_items.push_back (MenuElem (_("Select All Before Edit Point"), sigc::bind (sigc::mem_fun(*this, &Editor::select_all_selectables_using_edit), false)));
+ select_items.push_back (MenuElem (_("Select All After Edit Point"), sigc::bind (sigc::mem_fun(*this, &Editor::select_all_selectables_using_edit), true, true)));
+ select_items.push_back (MenuElem (_("Select All Before Edit Point"), sigc::bind (sigc::mem_fun(*this, &Editor::select_all_selectables_using_edit), false, true)));
select_items.push_back (MenuElem (_("Select All After Playhead"), sigc::bind (sigc::mem_fun(*this, &Editor::select_all_selectables_using_cursor), playhead_cursor, true)));
select_items.push_back (MenuElem (_("Select All Before Playhead"), sigc::bind (sigc::mem_fun(*this, &Editor::select_all_selectables_using_cursor), playhead_cursor, false)));
void
Editor::setup_tooltips ()
{
- set_tooltip (smart_mode_button, _("Smart Mode (add Range functions to Grab mode)"));
+ set_tooltip (smart_mode_button, _("Smart Mode (add range functions to Grab Mode)"));
set_tooltip (mouse_move_button, _("Grab Mode (select/move objects)"));
set_tooltip (mouse_cut_button, _("Cut Mode (split regions)"));
set_tooltip (mouse_select_button, _("Range Mode (select time ranges)"));
set_tooltip (zoom_out_button, _("Zoom Out"));
set_tooltip (zoom_preset_selector, _("Zoom to Time Scale"));
set_tooltip (zoom_out_full_button, _("Zoom to Session"));
- set_tooltip (zoom_focus_selector, _("Zoom focus"));
+ set_tooltip (zoom_focus_selector, _("Zoom Focus"));
set_tooltip (tav_expand_button, _("Expand Tracks"));
set_tooltip (tav_shrink_button, _("Shrink Tracks"));
set_tooltip (visible_tracks_selector, _("Number of visible tracks"));
set_tooltip (snap_type_selector, _("Snap/Grid Units"));
set_tooltip (snap_mode_selector, _("Snap/Grid Mode"));
- set_tooltip (edit_point_selector, _("Edit point"));
+ set_tooltip (edit_point_selector, _("Edit Point"));
set_tooltip (edit_mode_selector, _("Edit Mode"));
set_tooltip (nudge_clock, _("Nudge Clock\n(controls distance used to nudge regions and selections)"));
}
if (redo_action && _session) {
if (_session->redo_depth() == 0) {
label = _("Redo");
+ redo_action->set_sensitive (false);
} else {
label = string_compose(_("Redo (%1)"), _session->next_redo());
+ redo_action->set_sensitive (true);
}
redo_action->property_label() = label;
}
label.show ();
+ dialog.add_button (_("Delete All Unused"), RESPONSE_YES); // needs clarification. this and all remaining ones
dialog.add_button (_("Delete Playlist"), RESPONSE_ACCEPT);
- dialog.add_button (_("Keep Playlist"), RESPONSE_REJECT);
+ Button* keep = dialog.add_button (_("Keep Playlist"), RESPONSE_REJECT);
+ dialog.add_button (_("Keep Remaining"), RESPONSE_NO); // ditto
dialog.add_button (_("Cancel"), RESPONSE_CANCEL);
+ // by default gtk uses the left most button
+ keep->grab_focus ();
+
switch (dialog.run ()) {
+ case RESPONSE_NO:
+ /* keep this and all remaining ones */
+ return -2;
+ break;
+
+ case RESPONSE_YES:
+ /* delete this and all others */
+ return 2;
+ break;
+
case RESPONSE_ACCEPT:
/* delete the playlist */
- return 0;
+ return 1;
break;
case RESPONSE_REJECT:
/* keep the playlist */
- return 1;
+ return 0;
break;
default:
switch (ep) {
case EditAtPlayhead:
if (_dragging_playhead) {
- if (!mouse_frame (where, ignored)) {
- /* XXX not right but what can we do ? */
- return 0;
- }
+ where = *_control_scroll_target;
} else {
where = _session->audible_frame();
}
MessageDialog* dialog = 0;
if (track_views.size() > 1) {
+ Timers::TimerSuspender t;
dialog = new MessageDialog (
*this,
string_compose (_("Please wait while %1 loads visual data."), PROGRAM_NAME),
} else {
- if (!_dragging_playhead && _session->requested_return_frame() < 0 && !pending_visual_change.being_handled) {
+ if (!_dragging_playhead && _follow_playhead && _session->requested_return_frame() < 0 && !pending_visual_change.being_handled) {
framepos_t const frame = playhead_cursor->current_frame ();
- double target = ((double)frame - (double)current_page_samples()/3.0);
+ double target = ((double)frame - (double)current_page_samples()/2.0);
if (target <= 0.0) {
target = 0.0;
}
MidiRegionView& mrv = note->region_view();
const RegionSelection rs = get_regions_from_selection_and_entered ();
+ const uint32_t sel_size = mrv.selection_size ();
MenuList& items = _note_context_menu.items();
items.clear();
- items.push_back(MenuElem(_("Delete"),
- sigc::mem_fun(mrv, &MidiRegionView::delete_selection)));
+ if (sel_size > 0) {
+ items.push_back(MenuElem(_("Delete"),
+ sigc::mem_fun(mrv, &MidiRegionView::delete_selection)));
+ }
+
items.push_back(MenuElem(_("Edit..."),
- sigc::bind(sigc::mem_fun(*this, &Editor::edit_notes), &mrv)));
+ sigc::bind(sigc::mem_fun(*this, &Editor::edit_notes), &mrv)));
+ if (sel_size != 1) {
+ items.back().set_sensitive (false);
+ }
+
+ items.push_back(MenuElem(_("Transpose..."),
+ sigc::bind(sigc::mem_fun(*this, &Editor::transpose_regions), rs)));
+
+
items.push_back(MenuElem(_("Legatize"),
- sigc::bind(sigc::mem_fun(*this, &Editor::legatize_regions), rs, false)));
+ sigc::bind(sigc::mem_fun(*this, &Editor::legatize_regions), rs, false)));
+ if (sel_size < 2) {
+ items.back().set_sensitive (false);
+ }
+
items.push_back(MenuElem(_("Quantize..."),
sigc::bind(sigc::mem_fun(*this, &Editor::quantize_regions), rs)));
+
items.push_back(MenuElem(_("Remove Overlap"),
- sigc::bind(sigc::mem_fun(*this, &Editor::legatize_regions), rs, true)));
+ sigc::bind(sigc::mem_fun(*this, &Editor::legatize_regions), rs, true)));
+ if (sel_size < 2) {
+ items.back().set_sensitive (false);
+ }
+
items.push_back(MenuElem(_("Transform..."),
sigc::bind(sigc::mem_fun(*this, &Editor::transform_regions), rs)));