some fixes/improvements for track selection; add upload target to manual makefile; do not build peakfile for SilentFileSource

git-svn-id: svn://localhost/ardour2/trunk@1426 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Paul Davis
2007-02-06 15:50:05 +00:00
parent 63d28ebd18
commit aa60114843
7 changed files with 45 additions and 30 deletions

View File

@@ -441,6 +441,7 @@ class Editor : public PublicEditor
void catch_vanishing_regionview (RegionView *);
bool set_selected_track (TimeAxisView&, Selection::Operation op = Selection::Set, bool no_remove=false);
void select_all_tracks ();
bool set_selected_control_point_from_click (Selection::Operation op = Selection::Set, bool no_remove=false);
bool set_selected_track_from_click (bool press, Selection::Operation op = Selection::Set, bool no_remove=false);

View File

@@ -301,7 +301,9 @@ Editor::button_selection (ArdourCanvas::Item* item, GdkEvent* event, ItemType it
if (((mouse_mode != MouseObject) &&
(mouse_mode != MouseAudition || item_type != RegionItem) &&
(mouse_mode != MouseTimeFX || item_type != RegionItem)) ||
(mouse_mode != MouseTimeFX || item_type != RegionItem) &&
(mouse_mode != MouseRange)) ||
(event->type != GDK_BUTTON_PRESS && event->type != GDK_BUTTON_RELEASE || event->button.button > 3)) {
return;
@@ -324,31 +326,41 @@ Editor::button_selection (ArdourCanvas::Item* item, GdkEvent* event, ItemType it
switch (item_type) {
case RegionItem:
commit = set_selected_regionview_from_click (press, op, true);
if (mouse_mode != MouseRange) {
commit = set_selected_regionview_from_click (press, op, true);
}
break;
case RegionViewNameHighlight:
case RegionViewName:
commit = set_selected_regionview_from_click (press, op, true);
if (mouse_mode != MouseRange) {
commit = set_selected_regionview_from_click (press, op, true);
}
break;
case FadeInHandleItem:
case FadeInItem:
case FadeOutHandleItem:
case FadeOutItem:
commit = set_selected_regionview_from_click (press, op, true);
if (mouse_mode != MouseRange) {
commit = set_selected_regionview_from_click (press, op, true);
}
break;
case GainAutomationControlPointItem:
case PanAutomationControlPointItem:
case RedirectAutomationControlPointItem:
commit = set_selected_control_point_from_click (op, false);
if (mouse_mode != MouseRange) {
commit = set_selected_control_point_from_click (op, false);
}
break;
case StreamItem:
/* for context click or range selection, select track */
if (event->button.button == 3) {
/* for context click, select track */
commit = set_selected_track_from_click (press, op, true);
} else if (event->type == GDK_BUTTON_PRESS && mouse_mode == MouseRange) {
commit = set_selected_track_from_click (press, op, false);
}
break;
@@ -360,26 +372,6 @@ Editor::button_selection (ArdourCanvas::Item* item, GdkEvent* event, ItemType it
break;
}
#define SELECT_TRACK_FROM_CANVAS_IN_RANGE_MODE
#ifdef SELECT_TRACK_FROM_CANVAS_IN_RANGE_MODE
/* in range mode, button 1/2/3 press potentially selects a track */
if (mouse_mode == MouseRange &&
event->type == GDK_BUTTON_PRESS &&
event->button.button <= 3) {
switch (item_type) {
case StreamItem:
case RegionItem:
case AutomationTrackItem:
commit = set_selected_track_from_click (true, op, true);
break;
default:
break;
}
}
#endif
if (commit) {
commit_reversible_command ();
}

View File

@@ -154,6 +154,11 @@ Editor::extend_selection_to_track (TimeAxisView& view)
return false;
}
void
Editor::select_all_tracks ()
{
selection->set (track_views);
}
bool
Editor::set_selected_track (TimeAxisView& view, Selection::Operation op, bool no_remove)

View File

@@ -112,6 +112,7 @@ class PublicEditor : public Gtk::Window, public PBD::StatefulThingWithGoingAway
virtual void new_playlists () = 0;
virtual void copy_playlists () = 0;
virtual void clear_playlists () = 0;
virtual void select_all_tracks () = 0;
virtual bool set_selected_track (TimeAxisView&, Selection::Operation op = Selection::Set, bool no_remove = false) = 0;
virtual void set_selected_mixer_strip (TimeAxisView&) = 0;
virtual void hide_track_in_display (TimeAxisView& tv) = 0;

View File

@@ -999,6 +999,18 @@ RouteTimeAxisView::update_diskstream_display ()
void
RouteTimeAxisView::selection_click (GdkEventButton* ev)
{
if (Keyboard::modifier_state_equals (ev->state, (Keyboard::Shift|Keyboard::Control))) {
/* special case: select/deselect all tracks */
if (editor.get_selection().selected (this)) {
editor.get_selection().clear_tracks ();
} else {
editor.select_all_tracks ();
}
return;
}
PublicEditor::TrackViewList* tracks = editor.get_valid_views (this, _route->edit_group());
switch (Keyboard::selection_type (ev->state)) {

View File

@@ -56,9 +56,6 @@ boost::shared_ptr<Source>
SourceFactory::createSilent (Session& s, const XMLNode& node, nframes_t nframes, float sr)
{
boost::shared_ptr<Source> ret (new SilentFileSource (s, node, nframes, sr));
if (setup_peakfile (ret)) {
return boost::shared_ptr<Source>();
}
SourceCreated (ret);
return ret;
}

View File

@@ -28,10 +28,17 @@ html:: xml
test:: xml
xmllint --noout --postvalid --xinclude $(XMLFILE)
.PHONY : test
clean::
@rm -rf tmp
.PHONY : clean
upload: html
cd tmp && tar cf - . | bzip2 > ../man.tar.bz2
scp man.tar.bz2 las@ardour.org:ardour.org
.PHONY : upload