diff --git a/core/changelog.txt b/core/changelog.txt index a4e483ec4..5e3dd1fd3 100644 --- a/core/changelog.txt +++ b/core/changelog.txt @@ -31,6 +31,7 @@ Please visit http://aegisub.net to download latest version - Added Paste Over function, which allows you to paste subtitle lines over others, overwriting the fields of your choice. (AMZ) - Renaming a style will now ask you if you want to rename all instances of it on the script. (AMZ) - Style name collisions (when moving from storage, creating or renaming) will now prompt the user before performing the action. (AMZ) +- Added global hotkey for Video Play (default Ctrl+P). (AMZ) = 1.10 beta - 2006.08.07 =========================== diff --git a/core/frame_main.cpp b/core/frame_main.cpp index 673feaa03..194d2472e 100644 --- a/core/frame_main.cpp +++ b/core/frame_main.cpp @@ -1065,19 +1065,21 @@ void FrameMain::StatusTimeout(wxString text,int ms) { /////////////////////////// // Setup accelerator table void FrameMain::SetAccelerators() { - wxAcceleratorEntry entry[9]; - entry[0] = Hotkeys.GetAccelerator(_T("Video global prev frame"),Video_Prev_Frame); - entry[1] = Hotkeys.GetAccelerator(_T("Video global next frame"),Video_Next_Frame); - entry[2] = Hotkeys.GetAccelerator(_T("Video global focus seek"),Video_Focus_Seek); - entry[3] = Hotkeys.GetAccelerator(_T("Grid global prev line"),Grid_Prev_Line); - entry[4] = Hotkeys.GetAccelerator(_T("Grid global next line"),Grid_Next_Line); - entry[5] = Hotkeys.GetAccelerator(_T("Save Subtitles Alt"),Menu_File_Save_Subtitles); - entry[6] = Hotkeys.GetAccelerator(_T("Video global zoom in"),Menu_Video_Zoom_In); - entry[7] = Hotkeys.GetAccelerator(_T("Video global zoom out"),Menu_Video_Zoom_Out); + wxAcceleratorEntry entry[10]; + int i = 0; + entry[i++] = Hotkeys.GetAccelerator(_T("Video global prev frame"),Video_Prev_Frame); + entry[i++] = Hotkeys.GetAccelerator(_T("Video global next frame"),Video_Next_Frame); + entry[i++] = Hotkeys.GetAccelerator(_T("Video global focus seek"),Video_Focus_Seek); + entry[i++] = Hotkeys.GetAccelerator(_T("Grid global prev line"),Grid_Prev_Line); + entry[i++] = Hotkeys.GetAccelerator(_T("Grid global next line"),Grid_Next_Line); + entry[i++] = Hotkeys.GetAccelerator(_T("Save Subtitles Alt"),Menu_File_Save_Subtitles); + entry[i++] = Hotkeys.GetAccelerator(_T("Video global zoom in"),Menu_Video_Zoom_In); + entry[i++] = Hotkeys.GetAccelerator(_T("Video global zoom out"),Menu_Video_Zoom_Out); + entry[i++] = Hotkeys.GetAccelerator(_T("Video global play"),Video_Play); wxAcceleratorEntry temp; temp.Set(wxACCEL_CTRL | wxACCEL_ALT,WXK_F12,Kana_Game); - entry[8] = temp; - wxAcceleratorTable table(9,entry); + entry[i++] = temp; + wxAcceleratorTable table(i,entry); SetAcceleratorTable(table); } diff --git a/core/frame_main.h b/core/frame_main.h index c007fa3d9..278b0cf69 100644 --- a/core/frame_main.h +++ b/core/frame_main.h @@ -292,6 +292,7 @@ enum { Menu_Video_AR_235, Menu_Video_AR_Custom, Menu_Video_Select_Visible, + Menu_Video_Play, Menu_Audio_Open_File, Menu_Audio_Open_From_Video, diff --git a/core/frame_main_events.cpp b/core/frame_main_events.cpp index 80d644fc4..79ee2c0fe 100644 --- a/core/frame_main_events.cpp +++ b/core/frame_main_events.cpp @@ -138,6 +138,7 @@ BEGIN_EVENT_TABLE(FrameMain, wxFrame) EVT_MENU(Menu_View_Zoom_100, FrameMain::OnSetZoom100) EVT_MENU(Menu_View_Zoom_200, FrameMain::OnSetZoom200) EVT_COMBOBOX(Toolbar_Zoom_Dropdown, FrameMain::OnSetZoom) + EVT_MENU(Video_Play, FrameMain::OnVideoPlay) EVT_MENU(Menu_Video_Zoom_In, FrameMain::OnZoomIn) EVT_MENU(Menu_Video_Zoom_Out, FrameMain::OnZoomOut) EVT_MENU(Menu_Video_AR_Default, FrameMain::OnSetARDefault) diff --git a/core/hotkeys.cpp b/core/hotkeys.cpp index cf9c64167..8d340b1be 100644 --- a/core/hotkeys.cpp +++ b/core/hotkeys.cpp @@ -340,6 +340,7 @@ void HotkeyManager::LoadDefaults() { SetHotkey(_("Video global prev frame"),_T("Ctrl-KP_4")); SetHotkey(_("Video global next frame"),_T("Ctrl-KP_6")); SetHotkey(_("Video global focus seek"),_T("Ctrl-Space")); + SetHotkey(_("Video global play"),_T("Ctrl-P")); SetHotkey(_("Grid global prev line"),_T("Ctrl-KP_8")); SetHotkey(_("Grid global next line"),_T("Ctrl-KP_2")); SetHotkey(_("Save Subtitles Alt"),_T("F2"));