From 486020b4032da9bbb20fafd83ec6f10263c892e5 Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Tue, 19 Dec 2006 02:41:19 +0000 Subject: save keybindings to file used at startup; allow keybindings file to be cmdline-specified; remove some GTK2FIX comments; fix feedback based on john anderson's patch; apply scons patches; fix crash when taking MIDI ports online+offline; try to prevent aborts when shutting down due to metering thread; start work on reconstructing GlobalFOOCommand commands; use ftruncate to hint at peakfile preallocation to reduce fragmentation git-svn-id: svn://localhost/ardour2/trunk@1223 d708f5d6-7413-0410-9779-e7cbd77b26cf --- gtk2_ardour/ardour.bindings | 408 +++++++++++++++++++++++--------- gtk2_ardour/ardour_ui.cc | 20 +- gtk2_ardour/ardour_ui.h | 8 +- gtk2_ardour/ardour_ui_dependents.cc | 27 ++- gtk2_ardour/ardour_ui_ed.cc | 15 +- gtk2_ardour/audio_region_view.cc | 3 +- gtk2_ardour/crossfade_edit.cc | 2 - gtk2_ardour/editor.cc | 5 +- gtk2_ardour/editor_imageframe.cc | 12 +- gtk2_ardour/main.cc | 5 +- gtk2_ardour/option_editor.cc | 18 +- gtk2_ardour/opts.cc | 10 +- gtk2_ardour/opts.h | 1 + gtk2_ardour/playlist_selector.cc | 5 +- libs/ardour/ardour/session.h | 7 +- libs/ardour/audioengine.cc | 10 +- libs/ardour/audiosource.cc | 53 ++++- libs/ardour/control_protocol_manager.cc | 2 +- libs/ardour/session.cc | 6 - libs/ardour/session_command.cc | 10 +- libs/ardour/session_state.cc | 22 +- libs/clearlooks/SConscript | 24 +- templates/SConscript | 3 +- 23 files changed, 495 insertions(+), 181 deletions(-) diff --git a/gtk2_ardour/ardour.bindings b/gtk2_ardour/ardour.bindings index f7c39fba9e..eb1dc87f6f 100644 --- a/gtk2_ardour/ardour.bindings +++ b/gtk2_ardour/ardour.bindings @@ -1,116 +1,312 @@ -; this file is NOT an automated accelerator map dump - -(gtk_accel_path "/Transport/ToggleRoll" "space") -(gtk_accel_path "/Transport/ToggleRollForgetCapture" "space") -(gtk_accel_path "/Transport/Forward" "Right") -(gtk_accel_path "/Transport/Rewind" "Left") -(gtk_accel_path "/Transport/GotoZero" "KP_Insert") -(gtk_accel_path "/Transport/GotoStart" "Home") -(gtk_accel_path "/Transport/GotoEnd" "End") - -(gtk_accel_path "/Editor/align-regions-sync-relative" "a") -(gtk_accel_path "/Editor/crop" "c") -(gtk_accel_path "/Editor/duplicate-region" "d") -(gtk_accel_path "/Editor/set-edit-cursor" "e") -(gtk_accel_path "/Editor/toggle-follow-playhead" "f") -(gtk_accel_path "/MouseMode/set-mouse-mode-gain" "g") -(gtk_accel_path "/Editor/split-region" "s") -(gtk_accel_path "/Editor/set-region-sync-position" "v") -(gtk_accel_path "/Editor/mute-unmute-region" "m") -(gtk_accel_path "/Editor/insert-region" "i") -(gtk_accel_path "/Editor/normalize-region" "n") -(gtk_accel_path "/MouseMode/set-mouse-mode-object" "o") -(gtk_accel_path "/Transport/Loop" "l") -(gtk_accel_path "/Editor/set-playhead" "p") +; ardour.bin GtkAccelMap rc-file -*- scheme -*- +; this file is an automated accelerator map dump +; +; (gtk_accel_path "/RegionList/RegionListSort" "") +(gtk_accel_path "/Common/Quit" "q") +(gtk_accel_path "/Common/Save" "s") +; (gtk_accel_path "/Editor/Pullup" "") +; (gtk_accel_path "/Editor/zoom-to-session" "") +; (gtk_accel_path "/JACK/JACKReconnect" "") +; (gtk_accel_path "/Editor/Autoconnect" "") +; (gtk_accel_path "/Editor/Edit" "") +(gtk_accel_path "/Editor/playhead-to-previous-region-end" "grave") +; (gtk_accel_path "/redirectmenu/copy" "") +; (gtk_accel_path "/options/MeterFalloffFaster" "") +(gtk_accel_path "/Transport/ToggleRollForgetCapture" "space") +(gtk_accel_path "/Transport/Record" "r") +; (gtk_accel_path "/RegionList/SortByRegionLength" "") +; (gtk_accel_path "/options/MeterFalloffSlowest" "") +; (gtk_accel_path "/Editor/playhead-to-previous-region-sync" "") +; (gtk_accel_path "/redirectmenu/deactivate_all" "") +; (gtk_accel_path "/RegionList/SortByRegionPosition" "") +; (gtk_accel_path "/Editor/ZoomFocus" "") +; (gtk_accel_path "/options/MeterFalloffSlow" "") +; (gtk_accel_path "/RegionList/rlHide" "") +; (gtk_accel_path "/Main/Metering" "") +(gtk_accel_path "/Editor/playhead-to-next-region-end" "Tab") +; (gtk_accel_path "/Zoom/zoom-focus-playhead" "") +; (gtk_accel_path "/Editor/center-edit-cursor" "") +; (gtk_accel_path "/Editor/Monitoring" "") +; (gtk_accel_path "/redirectmenu/deactivate" "") +; (gtk_accel_path "/options/LatchedRecordEnable" "") +; (gtk_accel_path "/Transport/TogglePunchIn" "") +; (gtk_accel_path "/ShuttleActions/SetShuttleUnitsPercentage" "") +(gtk_accel_path "/Editor/edit-cursor-to-previous-region-start" "bracketleft") +; (gtk_accel_path "/Main/Close" "") +; (gtk_accel_path "/Main/New" "") +(gtk_accel_path "/Editor/nudge-next-backward" "KP_Subtract") +; (gtk_accel_path "/Editor/EditSelectRangeOptions" "") +; (gtk_accel_path "/Transport/ToggleTimeMaster" "") +; (gtk_accel_path "/Snap/snap-to-thirds" "") +(gtk_accel_path "/Editor/align-regions-start-relative" "a") +; (gtk_accel_path "/Main/Export" "") +(gtk_accel_path "/Editor/jump-forward-to-mark" "KP_Right") +; (gtk_accel_path "/Editor/Smpte30" "") +; (gtk_accel_path "/Editor/playhead-to-range-start" "") +; (gtk_accel_path "/Editor/Subframes" "") +; (gtk_accel_path "/Editor/Smpte2997drop" "") +; (gtk_accel_path "/Main/AddTrackBus" "") +(gtk_accel_path "/Editor/align-regions-end" "a") +; (gtk_accel_path "/JACK/JACKDisconnect" "") +; (gtk_accel_path "/options/MeterFalloffFast" "") +; (gtk_accel_path "/options/FileDataFormatFloat" "") +; (gtk_accel_path "/Snap/snap-to-region-end" "") +(gtk_accel_path "/Editor/edit-cursor-to-next-region-sync" "semicolon") +; (gtk_accel_path "/options/StopRecordingOnXrun" "") +; (gtk_accel_path "/Editor/addExternalAudioToRegionList" "") +; (gtk_accel_path "/RegionList/SortDescending" "") +; (gtk_accel_path "/options/DoNotRunPluginsWhileRecording" "") +; (gtk_accel_path "/Editor/PullupNone" "") (gtk_accel_path "/MouseMode/set-mouse-mode-range" "r") -(gtk_accel_path "/MouseMode/set-mouse-mode-timefx" "t") -(gtk_accel_path "/MouseMode/set-mouse-mode-zoom" "z") - -(gtk_accel_path "/Transport/Record" "r") - - +(gtk_accel_path "/Editor/jump-backward-to-mark" "KP_Left") +; (gtk_accel_path "/Main/AudioFileFormatData" "") +; (gtk_accel_path "/options/MeterFalloffFastest" "") +(gtk_accel_path "/Editor/audition-at-mouse" "period") +(gtk_accel_path "/Transport/Forward" "Right") +; (gtk_accel_path "/Snap/snap-to-smpte-seconds" "") +; (gtk_accel_path "/Snap/snap-to-smpte-frame" "") +; (gtk_accel_path "/Main/ExportSelection" "") +; (gtk_accel_path "/options/StopPluginsWithTransport" "") +(gtk_accel_path "/Editor/editor-paste" "v") +(gtk_accel_path "/Editor/scroll-tracks-down" "Page_Down") +; (gtk_accel_path "/Snap/snap-to-smpte-minutes" "") +(gtk_accel_path "/Editor/normalize-region" "n") (gtk_accel_path "/Editor/nudge-forward" "KP_Add") -(gtk_accel_path "/Editor/nudge-next-forward" "KP_Add") +; (gtk_accel_path "/Main/FlushWastebasket" "") +; (gtk_accel_path "/RegionList/SortByRegionEndinFile" "") +; (gtk_accel_path "/Editor/ToggleMeasureVisibility" "") +; (gtk_accel_path "/Zoom/zoom-focus-center" "") (gtk_accel_path "/Editor/nudge-backward" "KP_Subtract") -(gtk_accel_path "/Editor/nudge-next-backward" "KP_Subtract") - -(gtk_accel_path "/Editor/show-editor-mixer" "e") - -(gtk_accel_path "/Common/goto-editor" "e") -(gtk_accel_path "/Common/goto-mixer" "m") -(gtk_accel_path "/Common/ToggleSoundFileBrowser" "f") -(gtk_accel_path "/Common/ToggleLocations" "l") -(gtk_accel_path "/Common/ToggleBigClock" "b") -(gtk_accel_path "/Common/ToggleColorManager" "c") - -(gtk_accel_path "/Editor/editor-copy" "c") -(gtk_accel_path "/Common/Quit" "q") -(gtk_accel_path "/Editor/redo" "r") -(gtk_accel_path "/Common/Save" "s") -(gtk_accel_path "/Editor/editor-paste" "v") -(gtk_accel_path "/Editor/remove-last-capture" "Delete") -(gtk_accel_path "/Editor/editor-cut" "x") -(gtk_accel_path "/Editor/editor-delete" "Delete") -(gtk_accel_path "/Editor/undo" "z") - -(gtk_accel_path "/Editor/scroll-tracks-down" "Page_Down") +; (gtk_accel_path "/options/LatchedSolo" "") +; (gtk_accel_path "/options/MeterHoldOff" "") +; (gtk_accel_path "/options/OutputAutoConnectMaster" "") +; (gtk_accel_path "/JACK/JACKLatency64" "") +(gtk_accel_path "/Editor/undo" "z") +(gtk_accel_path "/Editor/insert-region" "i") +; (gtk_accel_path "/Editor/center-playhead" "") +(gtk_accel_path "/Editor/edit-cursor-to-next-region-start" "bracketright") +; (gtk_accel_path "/Snap/snap-to-region-start" "") +; (gtk_accel_path "/Editor/View" "") +; (gtk_accel_path "/Editor/Layering" "") +; (gtk_accel_path "/JACK/JACKLatency4096" "") (gtk_accel_path "/Editor/scroll-tracks-up" "Page_Up") -(gtk_accel_path "/Editor/scroll-backward" "leftarrow") -(gtk_accel_path "/Editor/scroll-forward" "rightarrow") +(gtk_accel_path "/Editor/set-edit-cursor" "e") +; (gtk_accel_path "/Editor/Smpte30drop" "") +; (gtk_accel_path "/Zoom/zoom-focus-edit" "") +(gtk_accel_path "/Editor/playhead-to-previous-region-start" "grave") +; (gtk_accel_path "/Editor/EditCursorMovementOptions" "") +; (gtk_accel_path "/redirectmenu/activate_all" "") +; (gtk_accel_path "/Editor/addExternalAudioAsTapeTrack" "") +; (gtk_accel_path "/redirectmenu/paste" "") +; (gtk_accel_path "/Editor/Smpte25" "") +; (gtk_accel_path "/Main/MeteringFallOffRate" "") +; (gtk_accel_path "/options/UseHardwareMonitoring" "") +; (gtk_accel_path "/Editor/Smpte24" "") +; (gtk_accel_path "/Snap/snap-to-mark" "") +; (gtk_accel_path "/Editor/CrossfadesShort" "") +; (gtk_accel_path "/Editor/Smpte5994" "") +; (gtk_accel_path "/JACK/JACKLatency8192" "") (gtk_accel_path "/Editor/step-tracks-down" "downarrow") -(gtk_accel_path "/Editor/step-tracks-up" "uparrow") -(gtk_accel_path "/Editor/playhead-to-edit" "Return") +; (gtk_accel_path "/Editor/toggle-xfades-visible" "") +(gtk_accel_path "/Editor/extend-range-to-end-of-region" "rightanglebracket") +(gtk_accel_path "/Editor/scroll-backward" "leftarrow") +(gtk_accel_path "/Editor/start-range" "KP_Down") +; (gtk_accel_path "/ShuttleActions/SetShuttleUnitsSemitones" "") +; (gtk_accel_path "/JACK/JACKLatency128" "") +; (gtk_accel_path "/Snap/snap-to-beat" "") +; (gtk_accel_path "/Editor/RegionEditOps" "") +; (gtk_accel_path "/Editor/snap-magnetic" "") +; (gtk_accel_path "/Editor/playhead-to-range-end" "") +(gtk_accel_path "/Editor/align-regions-sync-relative" "a") +; (gtk_accel_path "/Editor/EditSelectRegionOptions" "") +(gtk_accel_path "/Editor/crop" "c") +; (gtk_accel_path "/redirectmenu/newsend" "") +; (gtk_accel_path "/Editor/ToggleGeneric MIDISurfaceSubMenu" "") +; (gtk_accel_path "/Editor/MeterFalloff" "") +; (gtk_accel_path "/RegionList/rlRemove" "") +(gtk_accel_path "/Transport/GotoStart" "Home") +(gtk_accel_path "/Editor/split-region" "s") +; (gtk_accel_path "/Transport/ToggleAutoInput" "") +; (gtk_accel_path "/Snap/snap-to-thirtyseconds" "") +; (gtk_accel_path "/Snap/snap-to-minutes" "") +(gtk_accel_path "/Editor/align-regions-sync" "a") +; (gtk_accel_path "/Main/Windows" "") +; (gtk_accel_path "/Main/CleanupUnused" "") +; (gtk_accel_path "/redirectmenu/deselectall" "") +; (gtk_accel_path "/options/SoloViaBus" "") +(gtk_accel_path "/MouseMode/set-mouse-mode-zoom" "z") +; (gtk_accel_path "/RegionList/rlAudition" "") +(gtk_accel_path "/Editor/set-region-sync-position" "v") +; (gtk_accel_path "/Editor/PullupPlus4Plus1" "") +; (gtk_accel_path "/Snap/snap-to-region-boundary" "") +; (gtk_accel_path "/JACK/JACK" "") +(gtk_accel_path "/Editor/editor-cut" "x") +; (gtk_accel_path "/RegionList/SortAscending" "") +; (gtk_accel_path "/Main/Help" "") +; (gtk_accel_path "/options/UseExternalMonitoring" "") +; (gtk_accel_path "/Editor/Smpte23976" "") +(gtk_accel_path "/Common/goto-editor" "e") +(gtk_accel_path "/Editor/select-all" "a") +(gtk_accel_path "/Editor/nudge-next-forward" "KP_Add") +; (gtk_accel_path "/Snap/snap-to-eighths" "") +(gtk_accel_path "/Editor/select-all-after-playhead" "p") +(gtk_accel_path "/Common/ToggleMaximalEditor" "F11") +; (gtk_accel_path "/RegionList/SortBySourceFileLength" "") +; (gtk_accel_path "/Editor/Timecode" "") +; (gtk_accel_path "/Transport/PlaySelection" "") +; (gtk_accel_path "/Editor/PullupMinus4Minus1" "") +(gtk_accel_path "/Editor/select-all-after-edit-cursor" "e") +; (gtk_accel_path "/RegionList/SortBySourceFileName" "") +(gtk_accel_path "/Editor/finish-range" "KP_Up") +(gtk_accel_path "/Transport/Loop" "l") +; (gtk_accel_path "/Editor/CrossfadesFull" "") +(gtk_accel_path "/Editor/finish-add-range" "KP_Up") +; (gtk_accel_path "/Transport/ToggleClick" "") +; (gtk_accel_path "/options/SendMTC" "") +; (gtk_accel_path "/Transport/TogglePunchOut" "") +(gtk_accel_path "/Editor/select-all-in-loop-range" "l") +(gtk_accel_path "/Editor/show-editor-mixer" "e") +; (gtk_accel_path "/options/SoloInPlace" "") +; (gtk_accel_path "/Main/Options" "") +; (gtk_accel_path "/options/MeterFalloffMedium" "") +(gtk_accel_path "/Editor/toggle-follow-playhead" "f") +; (gtk_accel_path "/Main/SaveTemplate" "") +; (gtk_accel_path "/RegionList/SortByRegionStartinFile" "") +; (gtk_accel_path "/options/GainReduceFastTransport" "") +; (gtk_accel_path "/Common/ToggleInspector" "") +; (gtk_accel_path "/Transport/ToggleAutoPlay" "") +; (gtk_accel_path "/Editor/playhead-to-next-region-sync" "") (gtk_accel_path "/Editor/edit-to-playhead" "Return") - +; (gtk_accel_path "/Editor/LayerMoveAddHigher" "") +; (gtk_accel_path "/Editor/Smpte60" "") +; (gtk_accel_path "/Main/Open" "") +(gtk_accel_path "/Editor/scroll-forward" "rightarrow") +; (gtk_accel_path "/Zoom/zoom-focus-left" "") +; (gtk_accel_path "/Main/TransportOptions" "") +; (gtk_accel_path "/Main/ControlSurfaces" "") +; (gtk_accel_path "/options/FileHeaderFormatBWF" "") +; (gtk_accel_path "/Transport/ToggleAutoReturn" "") +; (gtk_accel_path "/Editor/Smpte2997" "") +; (gtk_accel_path "/Editor/ToggleWaveformVisibility" "") +(gtk_accel_path "/Editor/redo" "r") +; (gtk_accel_path "/Editor/addExternalAudioAsRegion" "") +; (gtk_accel_path "/Main/ExportSession" "") +; (gtk_accel_path "/options/InputAutoConnectPhysical" "") +; (gtk_accel_path "/Snap/snap-to-edit-cursor" "") (gtk_accel_path "/Editor/temporal-zoom-in" "minus") -(gtk_accel_path "/Editor/temporal-zoom-out" "equal") - -(gtk_accel_path "/Editor/select-all" "a") -(gtk_accel_path "/Editor/select-all-after-edit-cursor" "e") -(gtk_accel_path "/Editor/select-all-before-edit-cursor" "e") -(gtk_accel_path "/Editor/select-all-after-playhead" "p") -(gtk_accel_path "/Editor/select-all-before-playhead" "p") -(gtk_accel_path "/Editor/select-all-between-cursors" "u") -(gtk_accel_path "/Editor/select-all-in-punch-range" "d") -(gtk_accel_path "/Editor/select-all-in-loop-range" "l") - +; (gtk_accel_path "/JACK/Latency" "") +(gtk_accel_path "/Editor/edit-cursor-to-range-end" "F2") +; (gtk_accel_path "/redirectmenu/rename" "") +; (gtk_accel_path "/RegionList/rlShowAuto" "") +(gtk_accel_path "/Editor/select-all-before-playhead" "p") +; (gtk_accel_path "/Editor/addExistingAudioFiles" "") +; (gtk_accel_path "/Main/Session" "") +(gtk_accel_path "/Editor/edit-cursor-to-range-start" "F1") +; (gtk_accel_path "/Main/AudioFileFormat" "") +(gtk_accel_path "/MouseMode/set-mouse-mode-timefx" "t") +; (gtk_accel_path "/Transport/Transport" "") +; (gtk_accel_path "/RegionList/SortByRegionName" "") +; (gtk_accel_path "/Main/KeyMouse Actions" "") +(gtk_accel_path "/MouseMode/set-mouse-mode-gain" "g") +; (gtk_accel_path "/Snap/snap-to-frame" "") +; (gtk_accel_path "/Editor/SnapTo" "") +; (gtk_accel_path "/Editor/Crossfades" "") +; (gtk_accel_path "/Editor/PullupPlus4" "") +(gtk_accel_path "/Editor/add-location-from-playhead" "KP_Enter") +(gtk_accel_path "/Common/ToggleSoundFileBrowser" "f") +(gtk_accel_path "/Editor/edit-cursor-to-previous-region-end" "bracketleft") +; (gtk_accel_path "/Main/MeteringHoldTime" "") +; (gtk_accel_path "/Editor/PullupPlus1" "") +; (gtk_accel_path "/Editor/Smpte24976" "") +; (gtk_accel_path "/options/FileDataFormat24bit" "") +; (gtk_accel_path "/Common/ToggleOptionsEditor" "") +; (gtk_accel_path "/Editor/SnapMode" "") +; (gtk_accel_path "/Editor/PullupMinus4" "") +(gtk_accel_path "/Common/goto-mixer" "m") +; (gtk_accel_path "/Editor/addExternalAudioToTrack" "") +; (gtk_accel_path "/RegionList/SortBySourceFileCreationDate" "") +; (gtk_accel_path "/redirectmenu/activate" "") (gtk_accel_path "/Editor/extend-range-to-start-of-region" "leftanglebracket") -(gtk_accel_path "/Editor/extend-range-to-end-of-region" "rightanglebracket") - -(gtk_accel_path "/Editor/align-regions-sync" "a") -(gtk_accel_path "/Editor/align-regions-end" "a") -(gtk_accel_path "/Editor/align-regions-start-relative" "a") - -(gtk_accel_path "/Editor/brush-at-mouse" "b") -(gtk_accel_path "/Editor/audition-at-mouse" "period") - +; (gtk_accel_path "/Editor/PullupMinus1" "") +; (gtk_accel_path "/Editor/snap-normal" "") +; (gtk_accel_path "/Editor/addExternalAudioAsTrack" "") +(gtk_accel_path "/Common/ToggleBigClock" "b") +; (gtk_accel_path "/Snap/snap-to-asixteenthbeat" "") +(gtk_accel_path "/Editor/select-all-in-punch-range" "d") +; (gtk_accel_path "/redirectmenu/edit" "") +(gtk_accel_path "/Editor/duplicate-region" "d") +; (gtk_accel_path "/JACK/JACKLatency2048" "") +; (gtk_accel_path "/Editor/ToggleWaveformsWhileRecording" "") +; (gtk_accel_path "/Zoom/zoom-focus-right" "") +(gtk_accel_path "/Editor/remove-last-capture" "Delete") +; (gtk_accel_path "/options/FileHeaderFormatWAVE" "") +(gtk_accel_path "/Transport/GotoZero" "KP_Insert") +(gtk_accel_path "/Transport/GotoEnd" "End") +; (gtk_accel_path "/redirectmenu/cut" "") +; (gtk_accel_path "/redirectmenu/newinsert" "") +; (gtk_accel_path "/options/UseMMC" "") +; (gtk_accel_path "/options/MeterFalloffOff" "") +(gtk_accel_path "/MouseMode/set-mouse-mode-object" "o") +; (gtk_accel_path "/Editor/PullupMinus4Plus1" "") +; (gtk_accel_path "/Editor/MeterHold" "") +; (gtk_accel_path "/Snap/snap-to-cd-frame" "") +; (gtk_accel_path "/options/StopTransportAtEndOfSession" "") +; (gtk_accel_path "/Main/Cleanup" "") +; (gtk_accel_path "/Main/Snapshot" "") +; (gtk_accel_path "/Transport/ToggleVideoSync" "") +(gtk_accel_path "/Transport/ToggleRoll" "space") +; (gtk_accel_path "/RegionList/SortBySourceFilesystem" "") +(gtk_accel_path "/Common/ToggleColorManager" "c") +; (gtk_accel_path "/Common/About" "") +; (gtk_accel_path "/JACK/JACKLatency32" "") +(gtk_accel_path "/Editor/playhead-to-edit" "Return") +; (gtk_accel_path "/options/FileHeaderFormatWAVE64" "") +(gtk_accel_path "/Editor/brush-at-mouse" "b") +; (gtk_accel_path "/RegionList/rlShowAll" "") +(gtk_accel_path "/Transport/Rewind" "Left") +; (gtk_accel_path "/RegionList/SortByRegionTimestamp" "") +; (gtk_accel_path "/options/VerifyRemoveLastCapture" "") +; (gtk_accel_path "/options/OutputAutoConnectPhysical" "") +(gtk_accel_path "/Editor/step-tracks-up" "uparrow") (gtk_accel_path "/Editor/playhead-to-next-region-start" "Tab") -(gtk_accel_path "/Editor/playhead-to-next-region-end" "Tab") - -(gtk_accel_path "/Editor/playhead-to-previous-region-start" "grave") -(gtk_accel_path "/Editor/playhead-to-previous-region-end" "grave") - -(gtk_accel_path "/Editor/edit-cursor-to-previous-region-start" "bracketleft") -(gtk_accel_path "/Editor/edit-cursor-to-previous-region-end" "bracketleft") - -(gtk_accel_path "/Editor/edit-cursor-to-next-region-start" "bracketright") -(gtk_accel_path "/Editor/edit-cursor-to-next-region-end" "bracketright") - +; (gtk_accel_path "/options/SendMMC" "") +; (gtk_accel_path "/Editor/toggle-auto-xfades" "") +; (gtk_accel_path "/Main/AudioFileFormatHeader" "") +; (gtk_accel_path "/options/MeterHoldShort" "") +; (gtk_accel_path "/options/MeterHoldMedium" "") +(gtk_accel_path "/Editor/select-all-before-edit-cursor" "e") +; (gtk_accel_path "/Editor/Subframes80" "") +; (gtk_accel_path "/options/FileHeaderFormatCAF" "") +(gtk_accel_path "/Common/ToggleLocations" "l") +; (gtk_accel_path "/Editor/ToggleGeneric MIDISurface" "") +(gtk_accel_path "/Editor/editor-delete" "Delete") +; (gtk_accel_path "/JACK/JACKLatency256" "") +(gtk_accel_path "/Editor/select-all-between-cursors" "u") +; (gtk_accel_path "/Editor/LayerAddHigher" "") +; (gtk_accel_path "/Editor/Solo" "") +; (gtk_accel_path "/JACK/JACKLatency1024" "") +; (gtk_accel_path "/Main/ExportRangeMarkers" "") +(gtk_accel_path "/Editor/set-playhead" "p") +; (gtk_accel_path "/Editor/toggle-xfades-active" "") +; (gtk_accel_path "/Snap/snap-to-bar" "") +; (gtk_accel_path "/Editor/LayerLaterHigher" "") +; (gtk_accel_path "/redirectmenu/selectall" "") +(gtk_accel_path "/Editor/editor-copy" "c") +; (gtk_accel_path "/Snap/snap-to-quarters" "") +(gtk_accel_path "/Editor/temporal-zoom-out" "equal") +; (gtk_accel_path "/options/UseSoftwareMonitoring" "") +; (gtk_accel_path "/Editor/Subframes100" "") +(gtk_accel_path "/Editor/mute-unmute-region" "m") +; (gtk_accel_path "/options/OutputAutoConnectManual" "") +; (gtk_accel_path "/Snap/snap-to-region-sync" "") (gtk_accel_path "/Editor/edit-cursor-to-previous-region-sync" "apostrophe") -(gtk_accel_path "/Editor/edit-cursor-to-next-region-sync" "semicolon") - -(gtk_accel_path "/Editor/edit-cursor-to-range-start" "F1") -(gtk_accel_path "/Editor/edit-cursor-to-range-end" "F2") -(gtk_accel_path "/Common/ToggleMaximalEditor" "F11") - -(gtk_accel_path "/Editor/jump-forward-to-mark" "KP_Right") -(gtk_accel_path "/Editor/jump-backward-to-mark" "KP_Left") - -(gtk_accel_path "/Editor/start-range" "KP_Down") -(gtk_accel_path "/Editor/finish-range" "KP_Up") -(gtk_accel_path "/Editor/finish-add-range" "KP_Up") - - -(gtk_accel_path "/Editor/add-location-from-playhead" "KP_Enter") - - +; (gtk_accel_path "/redirectmenu/clear" "") +; (gtk_accel_path "/Editor/ToggleGeneric MIDISurfaceFeedback" "") +; (gtk_accel_path "/Editor/PullupPlus4Minus1" "") +; (gtk_accel_path "/JACK/JACKLatency512" "") +(gtk_accel_path "/Editor/edit-cursor-to-next-region-end" "bracketright") +; (gtk_accel_path "/Main/Recent" "") +; (gtk_accel_path "/redirectmenu/newplugin" "") +; (gtk_accel_path "/options/InputAutoConnectManual" "") +; (gtk_accel_path "/options/MeterHoldLong" "") +; (gtk_accel_path "/Snap/snap-to-seconds" "") diff --git a/gtk2_ardour/ardour_ui.cc b/gtk2_ardour/ardour_ui.cc index e369c85261..4680514771 100644 --- a/gtk2_ardour/ardour_ui.cc +++ b/gtk2_ardour/ardour_ui.cc @@ -164,6 +164,7 @@ ARDOUR_UI::ARDOUR_UI (int *argcp, char **argvp[], string rcfile) _will_create_new_session_automatically = false; session_loaded = false; last_speed_displayed = -1.0f; + keybindings_path = ARDOUR::find_config_file ("ardour.bindings"); last_configure_time.tv_sec = 0; last_configure_time.tv_usec = 0; @@ -345,9 +346,7 @@ ARDOUR_UI::save_ardour_state () Config->add_instant_xml (mnode, get_user_ardour_path()); } - /* keybindings */ - - AccelMap::save ("ardour.saved_bindings"); + save_keybindings (); } void @@ -382,6 +381,9 @@ If you still wish to quit, please use the\n\n\ } } + if (session) { + session->set_deletion_in_progress (); + } engine->stop (true); Config->save_state(); quit (); @@ -2412,3 +2414,15 @@ ARDOUR_UI::record_state_changed () break; } } + +void +ARDOUR_UI::set_keybindings_path (string path) +{ + keybindings_path = path; +} + +void +ARDOUR_UI::save_keybindings () +{ + AccelMap::save (keybindings_path); +} diff --git a/gtk2_ardour/ardour_ui.h b/gtk2_ardour/ardour_ui.h index 80aad8763c..d59fbd476f 100644 --- a/gtk2_ardour/ardour_ui.h +++ b/gtk2_ardour/ardour_ui.h @@ -208,6 +208,9 @@ class ARDOUR_UI : public Gtkmm2ext::UI void set_native_file_header_format (ARDOUR::HeaderFormat sf); void set_native_file_data_format (ARDOUR::SampleFormat sf); + void set_keybindings_path (std::string path); + void save_keybindings (); + protected: friend class PublicEditor; @@ -534,6 +537,9 @@ class ARDOUR_UI : public Gtkmm2ext::UI void connect_to_session (ARDOUR::Session *); void connect_dependents_to_session (ARDOUR::Session *); void we_have_dependents (); + + std::string keybindings_path; + void setup_keybindings (); void setup_session_options (); @@ -665,7 +671,7 @@ class ARDOUR_UI : public Gtkmm2ext::UI void map_meter_falloff (); void toggle_control_protocol (ARDOUR::ControlProtocolInfo*); - void toggle_control_protocol_feedback (ARDOUR::ControlProtocolInfo*, const char* group_name, const char* action_name); + void toggle_control_protocol_feedback (ARDOUR::ControlProtocolInfo*, const char* group_name, std::string action_name); }; #endif /* __ardour_gui_h__ */ diff --git a/gtk2_ardour/ardour_ui_dependents.cc b/gtk2_ardour/ardour_ui_dependents.cc index e00a769a37..7c4f3563f3 100644 --- a/gtk2_ardour/ardour_ui_dependents.cc +++ b/gtk2_ardour/ardour_ui_dependents.cc @@ -60,19 +60,36 @@ ARDOUR_UI::we_have_dependents () editor->UpdateAllTransportClocks.connect (mem_fun (*this, &ARDOUR_UI::update_transport_clocks)); } +static void +accel_map_changed (GtkAccelMap* map, + gchar* path, + guint key, + GdkModifierType mod, + gpointer arg) +{ + static_cast(arg)->save_keybindings (); +} + void ARDOUR_UI::setup_keybindings () { install_actions (); RedirectBox::register_actions (); - std::string key_binding_file = ARDOUR::find_config_file("ardour.bindings"); + cerr << "loading bindings from " << keybindings_path << endl; try { - AccelMap::load (key_binding_file); + AccelMap::load (keybindings_path); } catch (...) { - error << "ardour key bindings file not found" << endmsg; + error << string_compose (_("Ardour key bindings file not found at \"%1\" or contains errors."), keybindings_path) + << endmsg; } + + /* catch changes */ + + GtkAccelMap* accelmap = gtk_accel_map_get(); + g_signal_connect (accelmap, "changed", (GCallback) accel_map_changed, this); + } void @@ -80,6 +97,10 @@ ARDOUR_UI::connect_dependents_to_session (ARDOUR::Session *s) { editor->connect_to_session (s); mixer->connect_to_session (s); + + /* its safe to do this now */ + + s->restore_history (""); } void diff --git a/gtk2_ardour/ardour_ui_ed.cc b/gtk2_ardour/ardour_ui_ed.cc index 2acf1b28c6..33307e61ec 100644 --- a/gtk2_ardour/ardour_ui_ed.cc +++ b/gtk2_ardour/ardour_ui_ed.cc @@ -479,7 +479,7 @@ ARDOUR_UI::toggle_control_protocol (ControlProtocolInfo* cpi) } void -ARDOUR_UI::toggle_control_protocol_feedback (ControlProtocolInfo* cpi, const char* group, const char* action) +ARDOUR_UI::toggle_control_protocol_feedback (ControlProtocolInfo* cpi, const char* group, string action) { if (!session) { /* this happens when we build the menu bar when control protocol support @@ -490,14 +490,17 @@ ARDOUR_UI::toggle_control_protocol_feedback (ControlProtocolInfo* cpi, const cha } if (cpi->protocol) { - Glib::RefPtr act = ActionManager::get_action (group, action); + Glib::RefPtr act = ActionManager::get_action (group, action.c_str()); if (act) { Glib::RefPtr tact = Glib::RefPtr::cast_dynamic (act); - bool x = tact->get_active(); - if (tact && x != cpi->protocol->get_feedback()) { - cpi->protocol->set_feedback (!x); + if (tact) { + bool x = tact->get_active(); + + if (x != cpi->protocol->get_feedback()) { + cpi->protocol->set_feedback (x); + } } } } @@ -552,7 +555,7 @@ ARDOUR_UI::build_control_surface_menu () (bind (mem_fun (*this, &ARDOUR_UI::toggle_control_protocol_feedback), *i, "Editor", - action_name.c_str()))); + action_name))); ui += "set_border_width (6); + get_vbox()->set_spacing (12); get_vbox()->pack_start (scroller); diff --git a/libs/ardour/ardour/session.h b/libs/ardour/ardour/session.h index 253cd28b7f..3ea443d9ef 100644 --- a/libs/ardour/ardour/session.h +++ b/libs/ardour/ardour/session.h @@ -242,6 +242,7 @@ class Session : public PBD::StatefulDestructible void set_dirty (); void set_clean (); bool dirty() const { return _state_of_the_state & Dirty; } + void set_deletion_in_progress (); bool deletion_in_progress() const { return _state_of_the_state & Deletion; } sigc::signal DirtyChanged; @@ -762,8 +763,10 @@ class Session : public PBD::StatefulDestructible std::map registry; // these commands are implemented in libs/ardour/session_command.cc - Command *memento_command_factory(XMLNode *n); - void register_with_memento_command_factory(PBD::ID, PBD::StatefulThingWithGoingAway *); + Command* memento_command_factory(XMLNode* n); + void register_with_memento_command_factory(PBD::ID, PBD::StatefulThingWithGoingAway*); + + Command* global_state_command_factory (XMLNode* n); class GlobalSoloStateCommand : public Command { diff --git a/libs/ardour/audioengine.cc b/libs/ardour/audioengine.cc index e68dc718d9..b68235171f 100644 --- a/libs/ardour/audioengine.cc +++ b/libs/ardour/audioengine.cc @@ -156,6 +156,7 @@ AudioEngine::stop (bool forever) jack_client_t* foo = _jack; _jack = 0; jack_client_close (foo); + stop_metering_thread (); } else { jack_deactivate (_jack); } @@ -379,9 +380,9 @@ AudioEngine::stop_metering_thread () { if (m_meter_thread) { g_atomic_int_set (&m_meter_exit, 1); + m_meter_thread->join (); + m_meter_thread = 0; } - m_meter_thread->join (); - m_meter_thread = 0; } void @@ -395,8 +396,11 @@ AudioEngine::start_metering_thread () void AudioEngine::meter_thread () { - while (g_atomic_int_get(&m_meter_exit) != true) { + while (true) { Glib::usleep (10000); /* 1/100th sec interval */ + if (g_atomic_int_get(&m_meter_exit)) { + break; + } IO::update_meters (); } } diff --git a/libs/ardour/audiosource.cc b/libs/ardour/audiosource.cc index a8d8929812..cc6d156c9c 100644 --- a/libs/ardour/audiosource.cc +++ b/libs/ardour/audiosource.cc @@ -35,6 +35,7 @@ #include #include +#include #include "i18n.h" @@ -431,7 +432,8 @@ AudioSource::read_peaks (PeakData *peaks, nframes_t npeaks, nframes_t start, nfr expected_peaks = (cnt / (double) frames_per_peak); scale = npeaks/expected_peaks; -#if 0 +#undef DEBUG_READ_PEAKS +#ifdef DEBUG_READ_PEAKS cerr << "======>RP: npeaks = " << npeaks << " start = " << start << " cnt = " << cnt @@ -457,8 +459,9 @@ AudioSource::read_peaks (PeakData *peaks, nframes_t npeaks, nframes_t start, nfr if (npeaks == cnt) { +#ifdef DEBUG_READ_PEAKS cerr << "RAW DATA\n"; - +#endif /* no scaling at all, just get the sample data and duplicate it for both max and min peak values. */ @@ -490,7 +493,9 @@ AudioSource::read_peaks (PeakData *peaks, nframes_t npeaks, nframes_t start, nfr return -1; } - // cerr << "DIRECT PEAKS\n"; +#ifdef DEBUG_READ_PEAKS + cerr << "DIRECT PEAKS\n"; +#endif nread = ::pread (peakfile, peaks, sizeof (PeakData)* npeaks, first_peak_byte); close (peakfile); @@ -523,8 +528,9 @@ AudioSource::read_peaks (PeakData *peaks, nframes_t npeaks, nframes_t start, nfr if (scale < 1.0) { - // cerr << "DOWNSAMPLE\n"; - +#ifdef DEBUG_READ_PEAKS + cerr << "DOWNSAMPLE\n"; +#endif /* the caller wants: - more frames-per-peak (lower resolution) than the peakfile, or to put it another way, @@ -535,7 +541,7 @@ AudioSource::read_peaks (PeakData *peaks, nframes_t npeaks, nframes_t start, nfr to avoid confusion, I'll refer to the requested peaks as visual_peaks and the peakfile peaks as stored_peaks */ - const uint32_t chunksize = (uint32_t) min (expected_peaks, 4096.0); + const uint32_t chunksize = (uint32_t) min (expected_peaks, 65536.0); staging = new PeakData[chunksize]; @@ -569,10 +575,15 @@ AudioSource::read_peaks (PeakData *peaks, nframes_t npeaks, nframes_t start, nfr tnp = min ((_length/frames_per_peak - current_stored_peak), (nframes_t) expected_peaks); to_read = min (chunksize, tnp); - off_t fend = lseek (peakfile, 0, SEEK_END); +#ifdef DEBUG_READ_PEAKS + cerr << "read " << sizeof (PeakData) * to_read << " from peakfile @ " << start_byte << endl; +#endif if ((nread = ::pread (peakfile, staging, sizeof (PeakData) * to_read, start_byte)) != sizeof (PeakData) * to_read) { + + off_t fend = lseek (peakfile, 0, SEEK_END); + cerr << "AudioSource[" << _name << "]: cannot read peak data from peakfile (" @@ -589,11 +600,11 @@ AudioSource::read_peaks (PeakData *peaks, nframes_t npeaks, nframes_t start, nfr << endl; goto out; } - + i = 0; stored_peaks_read = nread / sizeof(PeakData); } - + xmax = -1.0; xmin = 1.0; @@ -624,8 +635,9 @@ AudioSource::read_peaks (PeakData *peaks, nframes_t npeaks, nframes_t start, nfr } else { - // cerr << "UPSAMPLE\n"; - +#ifdef DEBUG_READ_PEAKS + cerr << "UPSAMPLE\n"; +#endif /* the caller wants - less frames-per-peak (more resolution) @@ -704,6 +716,10 @@ AudioSource::read_peaks (PeakData *peaks, nframes_t npeaks, nframes_t start, nfr delete [] raw_staging; } +#ifdef DEBUG_READ_PEAKS + cerr << "RP DONE\n"; +#endif + return ret; } @@ -777,6 +793,7 @@ AudioSource::do_build_peak (nframes_t first_frame, nframes_t cnt) off_t first_peak_byte; int peakfile = -1; int ret = -1; + off_t target_length; #ifdef DEBUG_PEAK_BUILD cerr << pthread_self() << ": " << _name << ": building peaks for " << first_frame << " to " << first_frame + cnt - 1 << endl; @@ -828,6 +845,20 @@ AudioSource::do_build_peak (nframes_t first_frame, nframes_t cnt) cnt -= frames_read; } +#define BLOCKSIZE (256 * 1024) + + target_length = BLOCKSIZE * ((first_peak_byte + BLOCKSIZE + 1) / BLOCKSIZE); + + /* on some filesystems (ext3, at least) this helps to reduce fragmentation of + the peakfiles. its not guaranteed to do so, and even on ext3 (as of december 2006) + it does not cause single-extent allocation even for peakfiles of + less than BLOCKSIZE bytes. + */ + + ftruncate (peakfile, target_length); + + /* error doesn't actually matter though, so continue on without testing */ + if (::pwrite (peakfile, peakbuf, sizeof (PeakData) * peaki, first_peak_byte) != (ssize_t) (sizeof (PeakData) * peaki)) { error << string_compose(_("%1: could not write peak file data (%2)"), _name, strerror (errno)) << endmsg; goto out; diff --git a/libs/ardour/control_protocol_manager.cc b/libs/ardour/control_protocol_manager.cc index a715254747..495a66465e 100644 --- a/libs/ardour/control_protocol_manager.cc +++ b/libs/ardour/control_protocol_manager.cc @@ -180,7 +180,7 @@ ControlProtocolManager::discover_control_protocols (string path) vector *found; PathScanner scanner; - info << string_compose (_("looking for control protocols in %1"), path) << endmsg; + // info << string_compose (_("looking for control protocols in %1"), path) << endmsg; found = scanner (path, protocol_filter, 0, false, true); diff --git a/libs/ardour/session.cc b/libs/ardour/session.cc index 86770939da..932db17909 100644 --- a/libs/ardour/session.cc +++ b/libs/ardour/session.cc @@ -831,10 +831,6 @@ Session::when_engine_running () } } - - /* its safe to do this now */ - - restore_history (snap_name()); _state_of_the_state = StateOfTheState (_state_of_the_state & ~(CannotSave|Dirty)); @@ -861,7 +857,6 @@ Session::hookup_io () */ _state_of_the_state = StateOfTheState (_state_of_the_state | InitialConnecting); - cerr << "InitialConnecting set\n"; if (auditioner == 0) { @@ -917,7 +912,6 @@ Session::hookup_io () IOConnectionsComplete (); /* EMIT SIGNAL */ _state_of_the_state = StateOfTheState (_state_of_the_state & ~InitialConnecting); - cerr << "InitialConnectingUN set\n"; /* now handle the whole enchilada as if it was one graph reorder event. diff --git a/libs/ardour/session_command.cc b/libs/ardour/session_command.cc index 06ed44f722..022aa43145 100644 --- a/libs/ardour/session_command.cc +++ b/libs/ardour/session_command.cc @@ -22,7 +22,8 @@ void Session::register_with_memento_command_factory(PBD::ID id, PBD::StatefulThi registry[id] = ptr; } -Command *Session::memento_command_factory(XMLNode *n) +Command * +Session::memento_command_factory(XMLNode *n) { PBD::ID id; XMLNode *before = 0, *after = 0; @@ -87,6 +88,13 @@ Command *Session::memento_command_factory(XMLNode *n) return 0 ; } +Command * +Session::global_state_command_factory(XMLNode *n) +{ + error << string_compose (_("cannot reconstitute %1 from XML yet, ignored"), n->name()) << endmsg; + return 0 ; +} + // solo Session::GlobalSoloStateCommand::GlobalSoloStateCommand(Session &sess, void *src) : sess(sess), src(src) diff --git a/libs/ardour/session_state.cc b/libs/ardour/session_state.cc index 55f2e4be29..cbc363a203 100644 --- a/libs/ardour/session_state.cc +++ b/libs/ardour/session_state.cc @@ -1218,7 +1218,6 @@ Session::set_state (const XMLNode& node) StateReady (); /* EMIT SIGNAL */ _state_of_the_state = Clean; - cerr << "session marked clean\n"; if (state_was_pending) { save_state (_current_snapshot_name); @@ -2817,6 +2816,12 @@ Session::set_clean () } } +void +Session::set_deletion_in_progress () +{ + _state_of_the_state = StateOfTheState (_state_of_the_state | Deletion); +} + void Session::add_controllable (Controllable* c) { @@ -2917,6 +2922,10 @@ Session::restore_history (string snapshot_name) XMLTree tree; string xmlpath; + if (snapshot_name.empty()) { + snapshot_name = _current_snapshot_name; + } + /* read xml */ xmlpath = _path + snapshot_name + ".history"; cerr << string_compose(_("Loading history from '%1'."), xmlpath) << endmsg; @@ -2957,10 +2966,21 @@ Session::restore_history (string snapshot_name) if (n->name() == "MementoCommand" || n->name() == "MementoUndoCommand" || n->name() == "MementoRedoCommand") { + if ((c = memento_command_factory(n))) { ut->add_command(c); } + + } else if (n->name() == "GlobalRecordEnableStateCommand" || + n->name() == "GlobalSoloStateCommand" || + n->name() == "GlobalMuteStateCommand") { + + if ((c = global_state_command_factory (n))) { + ut->add_command (c); + } + } else { + error << string_compose(_("Couldn't figure out how to make a Command out of a %1 XMLNode."), n->name()) << endmsg; } } diff --git a/libs/clearlooks/SConscript b/libs/clearlooks/SConscript index 0df20efe56..fe8acf915f 100644 --- a/libs/clearlooks/SConscript +++ b/libs/clearlooks/SConscript @@ -1,4 +1,14 @@ +# -*- python -*- + import os.path +import glob + +libclearlooks_files = [ + 'clearlooks_draw.c', + 'clearlooks_rc_style.c', + 'clearlooks_style.c', + 'clearlooks_theme_main.c', + 'support.c' ] Import ('env install_prefix') @@ -7,13 +17,7 @@ clearlooks = env.Copy() clearlooks.Replace(CCFLAGS = ' `pkg-config --cflags gtk+-2.0` ', LINKFLAGS = ' `pkg-config --libs gtk+-2.0` ') -libclearlooks = clearlooks.SharedLibrary('clearlooks', [ - 'clearlooks_draw.c', - 'clearlooks_rc_style.c', - 'clearlooks_style.c', - 'clearlooks_theme_main.c', - 'support.c' -]) +libclearlooks = clearlooks.SharedLibrary('clearlooks', libclearlooks_files) usable_libclearlooks = clearlooks.Install ('engines', libclearlooks) Default (usable_libclearlooks) @@ -21,3 +25,9 @@ Default (usable_libclearlooks) env.Alias('install', env.Install(os.path.join(install_prefix,'lib/ardour2/engines'), libclearlooks)) + +env.Alias('tarball', env.Distribute (env['DISTTREE'], + [ 'SConscript', 'bits.c'] + + libclearlooks_files + + glob.glob('*.h') + )) diff --git a/templates/SConscript b/templates/SConscript index 7fa556530b..874d70cf06 100644 --- a/templates/SConscript +++ b/templates/SConscript @@ -3,6 +3,7 @@ import os import glob template_files = glob.glob('*.template.in') +files = glob.glob('*.template') Import('env install_prefix subst_dict') @@ -13,5 +14,5 @@ for template in template_files: Default(template_build) -env.Alias('install', env.Install(os.path.join(install_prefix, 'share/ardour2/templates'), template_build)) +env.Alias('install', env.Install(os.path.join(install_prefix, 'share/ardour2/templates'), files)) env.Alias('tarball', env.Distribute (env['DISTTREE'], [ 'SConscript' ] + template_build)) -- cgit v1.2.3