diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2007-02-06 15:50:05 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2007-02-06 15:50:05 +0000 |
commit | aa60114843f4990ef93ba83974501495ddda358b (patch) | |
tree | b5318deb08d54fa28c350ac2266ce6e338721eb8 | |
parent | 63d28ebd1808b316dd2f8d152d94577b898d336c (diff) |
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
-rw-r--r-- | gtk2_ardour/editor.h | 1 | ||||
-rw-r--r-- | gtk2_ardour/editor_mouse.cc | 44 | ||||
-rw-r--r-- | gtk2_ardour/editor_selection.cc | 5 | ||||
-rw-r--r-- | gtk2_ardour/public_editor.h | 1 | ||||
-rw-r--r-- | gtk2_ardour/route_time_axis.cc | 12 | ||||
-rw-r--r-- | libs/ardour/source_factory.cc | 3 | ||||
-rw-r--r-- | manual/Makefile | 9 |
7 files changed, 45 insertions, 30 deletions
diff --git a/gtk2_ardour/editor.h b/gtk2_ardour/editor.h index a64738b432..803611b77e 100644 --- a/gtk2_ardour/editor.h +++ b/gtk2_ardour/editor.h @@ -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); diff --git a/gtk2_ardour/editor_mouse.cc b/gtk2_ardour/editor_mouse.cc index 881be020a9..10f4c0eb03 100644 --- a/gtk2_ardour/editor_mouse.cc +++ b/gtk2_ardour/editor_mouse.cc @@ -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 (); } diff --git a/gtk2_ardour/editor_selection.cc b/gtk2_ardour/editor_selection.cc index 2cd16de312..f630c6077f 100644 --- a/gtk2_ardour/editor_selection.cc +++ b/gtk2_ardour/editor_selection.cc @@ -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) diff --git a/gtk2_ardour/public_editor.h b/gtk2_ardour/public_editor.h index 2e00b632b7..e1d061e13d 100644 --- a/gtk2_ardour/public_editor.h +++ b/gtk2_ardour/public_editor.h @@ -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; diff --git a/gtk2_ardour/route_time_axis.cc b/gtk2_ardour/route_time_axis.cc index 84f752dc8a..573b9feb83 100644 --- a/gtk2_ardour/route_time_axis.cc +++ b/gtk2_ardour/route_time_axis.cc @@ -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)) { diff --git a/libs/ardour/source_factory.cc b/libs/ardour/source_factory.cc index 7b2103cdc6..ad80ceaa22 100644 --- a/libs/ardour/source_factory.cc +++ b/libs/ardour/source_factory.cc @@ -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; } diff --git a/manual/Makefile b/manual/Makefile index 584d8962e9..5c18cb96db 100644 --- a/manual/Makefile +++ b/manual/Makefile @@ -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 + |