From 8f3fbdd7812d4f5c55a2e34ab2d88219029cb2ed Mon Sep 17 00:00:00 2001 From: Rodrigo Braz Monteiro Date: Sat, 1 Jul 2006 06:37:46 +0000 Subject: [PATCH] Added hotkey to Audio's "play to end of file" (defaulting to "T"). Originally committed to SVN as r453. --- core/audio_box.cpp | 2 +- core/audio_display.cpp | 7 +++++++ core/changelog.txt | 1 + core/hotkeys.cpp | 1 + 4 files changed, 10 insertions(+), 1 deletion(-) diff --git a/core/audio_box.cpp b/core/audio_box.cpp index ec0ad8af4..bb520edd3 100644 --- a/core/audio_box.cpp +++ b/core/audio_box.cpp @@ -141,7 +141,7 @@ wxPanel(parent,-1,wxDefaultPosition,wxDefaultSize,wxTAB_TRAVERSAL|wxBORDER_RAISE temp->SetToolTip(_("Play last 500ms of selection (") + Hotkeys.GetText(_T("Audio Play Last 500ms")) + _T(")")); ButtonSizer->Add(temp,0,wxRIGHT,0); temp = new wxBitmapButton(this,Audio_Button_Play_To_End,wxBITMAP(button_playtoend),wxDefaultPosition,wxSize(30,-1)); - temp->SetToolTip(_("Play from selection start to end of file")); + temp->SetToolTip(_("Play from selection start to end of file (") + Hotkeys.GetText(_T("Audio Play To End")) + _T(")")); ButtonSizer->Add(temp,0,wxRIGHT,10); temp = new wxBitmapButton(this,Audio_Button_Leadin,wxBITMAP(button_leadin),wxDefaultPosition,wxSize(30,-1)); diff --git a/core/audio_display.cpp b/core/audio_display.cpp index 46677f090..229c459e7 100644 --- a/core/audio_display.cpp +++ b/core/audio_display.cpp @@ -1762,6 +1762,13 @@ void AudioDisplay::OnKeyDown(wxKeyEvent &event) { Play(end,end+500); } + // Play to end of file + if (Hotkeys.IsPressed(_T("Audio Play To End"))) { + int start=0,end=0; + GetTimesSelection(start,end); + Play(start,-1); + } + // Play original line if (Hotkeys.IsPressed(_T("Audio Play Original Line"))) { int start=0,end=0; diff --git a/core/changelog.txt b/core/changelog.txt index c1015c949..d01de3a5d 100644 --- a/core/changelog.txt +++ b/core/changelog.txt @@ -91,6 +91,7 @@ Please visit http://aegisub.net to download latest version - The Font Collector can now collect fonts as script attachments. (AMZ) - Added recent menu to Video Timecodes. (AMZ) - Playing in video mode will now play the audio as well even if it hasn't been previously loaded into audio mode (experimental). (AMZ) +- Added hotkey to Audio's "play to end of file" (defaulting to "T"). (AMZ) = 1.09 beta - 2006.01.16 =========================== diff --git a/core/hotkeys.cpp b/core/hotkeys.cpp index 75bf8a6b3..67acecfa0 100644 --- a/core/hotkeys.cpp +++ b/core/hotkeys.cpp @@ -370,6 +370,7 @@ void HotkeyManager::LoadDefaults() { SetHotkey(_("Audio Play Last 500ms"),_T("D")); SetHotkey(_("Audio Play 500ms Before"),_T("Q")); SetHotkey(_("Audio Play 500ms After"),_T("W")); + SetHotkey(_("Audio Play To End"),_T("T")); SetHotkey(_("Audio Play Original Line"),_T("R")); SetHotkey(_("Audio Add Lead In"),_T("C")); SetHotkey(_("Audio Add Lead Out"),_T("V"));