Added global hotkey for Video Play (default Ctrl+P).

Originally committed to SVN as r569.
This commit is contained in:
Rodrigo Braz Monteiro 2006-12-17 20:46:01 +00:00
parent 25120f8461
commit 0bccc65219
5 changed files with 17 additions and 11 deletions

View file

@ -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) - 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) - 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) - 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 =========================== = 1.10 beta - 2006.08.07 ===========================

View file

@ -1065,19 +1065,21 @@ void FrameMain::StatusTimeout(wxString text,int ms) {
/////////////////////////// ///////////////////////////
// Setup accelerator table // Setup accelerator table
void FrameMain::SetAccelerators() { void FrameMain::SetAccelerators() {
wxAcceleratorEntry entry[9]; wxAcceleratorEntry entry[10];
entry[0] = Hotkeys.GetAccelerator(_T("Video global prev frame"),Video_Prev_Frame); int i = 0;
entry[1] = Hotkeys.GetAccelerator(_T("Video global next frame"),Video_Next_Frame); entry[i++] = Hotkeys.GetAccelerator(_T("Video global prev frame"),Video_Prev_Frame);
entry[2] = Hotkeys.GetAccelerator(_T("Video global focus seek"),Video_Focus_Seek); entry[i++] = Hotkeys.GetAccelerator(_T("Video global next frame"),Video_Next_Frame);
entry[3] = Hotkeys.GetAccelerator(_T("Grid global prev line"),Grid_Prev_Line); entry[i++] = Hotkeys.GetAccelerator(_T("Video global focus seek"),Video_Focus_Seek);
entry[4] = Hotkeys.GetAccelerator(_T("Grid global next line"),Grid_Next_Line); entry[i++] = Hotkeys.GetAccelerator(_T("Grid global prev line"),Grid_Prev_Line);
entry[5] = Hotkeys.GetAccelerator(_T("Save Subtitles Alt"),Menu_File_Save_Subtitles); entry[i++] = Hotkeys.GetAccelerator(_T("Grid global next line"),Grid_Next_Line);
entry[6] = Hotkeys.GetAccelerator(_T("Video global zoom in"),Menu_Video_Zoom_In); entry[i++] = Hotkeys.GetAccelerator(_T("Save Subtitles Alt"),Menu_File_Save_Subtitles);
entry[7] = Hotkeys.GetAccelerator(_T("Video global zoom out"),Menu_Video_Zoom_Out); 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; wxAcceleratorEntry temp;
temp.Set(wxACCEL_CTRL | wxACCEL_ALT,WXK_F12,Kana_Game); temp.Set(wxACCEL_CTRL | wxACCEL_ALT,WXK_F12,Kana_Game);
entry[8] = temp; entry[i++] = temp;
wxAcceleratorTable table(9,entry); wxAcceleratorTable table(i,entry);
SetAcceleratorTable(table); SetAcceleratorTable(table);
} }

View file

@ -292,6 +292,7 @@ enum {
Menu_Video_AR_235, Menu_Video_AR_235,
Menu_Video_AR_Custom, Menu_Video_AR_Custom,
Menu_Video_Select_Visible, Menu_Video_Select_Visible,
Menu_Video_Play,
Menu_Audio_Open_File, Menu_Audio_Open_File,
Menu_Audio_Open_From_Video, Menu_Audio_Open_From_Video,

View file

@ -138,6 +138,7 @@ BEGIN_EVENT_TABLE(FrameMain, wxFrame)
EVT_MENU(Menu_View_Zoom_100, FrameMain::OnSetZoom100) EVT_MENU(Menu_View_Zoom_100, FrameMain::OnSetZoom100)
EVT_MENU(Menu_View_Zoom_200, FrameMain::OnSetZoom200) EVT_MENU(Menu_View_Zoom_200, FrameMain::OnSetZoom200)
EVT_COMBOBOX(Toolbar_Zoom_Dropdown, FrameMain::OnSetZoom) 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_In, FrameMain::OnZoomIn)
EVT_MENU(Menu_Video_Zoom_Out, FrameMain::OnZoomOut) EVT_MENU(Menu_Video_Zoom_Out, FrameMain::OnZoomOut)
EVT_MENU(Menu_Video_AR_Default, FrameMain::OnSetARDefault) EVT_MENU(Menu_Video_AR_Default, FrameMain::OnSetARDefault)

View file

@ -340,6 +340,7 @@ void HotkeyManager::LoadDefaults() {
SetHotkey(_("Video global prev frame"),_T("Ctrl-KP_4")); SetHotkey(_("Video global prev frame"),_T("Ctrl-KP_4"));
SetHotkey(_("Video global next frame"),_T("Ctrl-KP_6")); SetHotkey(_("Video global next frame"),_T("Ctrl-KP_6"));
SetHotkey(_("Video global focus seek"),_T("Ctrl-Space")); 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 prev line"),_T("Ctrl-KP_8"));
SetHotkey(_("Grid global next line"),_T("Ctrl-KP_2")); SetHotkey(_("Grid global next line"),_T("Ctrl-KP_2"));
SetHotkey(_("Save Subtitles Alt"),_T("F2")); SetHotkey(_("Save Subtitles Alt"),_T("F2"));