From 7573a814ad4cb09c82926137011675157580e9b2 Mon Sep 17 00:00:00 2001 From: Rodrigo Braz Monteiro Date: Mon, 18 Dec 2006 02:44:38 +0000 Subject: [PATCH] Early work on options dialog (won't really work without wxWidgets 2.8.0) and save/load keyframes. Originally committed to SVN as r571. --- core/bitmaps/options.bmp | Bin 0 -> 1318 bytes core/changelog.txt | 1 + core/dialog_options.cpp | 43 ++++---- core/dialog_options.h | 6 +- core/dialog_paste_over.cpp | 2 +- core/frame_main.cpp | 6 +- core/frame_main.h | 8 ++ core/frame_main_events.cpp | 25 ++++- core/options.cpp | 198 ++++++++++++++++++++----------------- core/res.rc | 1 + core/splash.cpp | 8 +- core/video_display.cpp | 11 ++- core/video_display.h | 4 +- 13 files changed, 197 insertions(+), 116 deletions(-) create mode 100644 core/bitmaps/options.bmp diff --git a/core/bitmaps/options.bmp b/core/bitmaps/options.bmp new file mode 100644 index 0000000000000000000000000000000000000000..8e71a0baeaae9d95184ef5f9f48d92818b9a31d3 GIT binary patch literal 1318 zcmZ{jp>GvI5XL`}NBTq)sHv)1pPN$vA5sj04;f1w8PR5b}nlXVCnL16k9JcXd6 zuZE{8nlvP|t_foJ?Obyp;O=(s=DXebemi@&SiXF!I$qDDS3EtZJ)=F*y!5;3|JAJ| zF0EGMjh;uX*K4i6uXXqBlV-D-=JUC>x3{&kv!mVJUG44dX@7rT2L}f_K0elRxzu8@ z(Ba{sR&P>AN2zxjls`gWho2g5ZuIu^7mSSNv_^|DG&DmqH0xT9Lmb`F9o^9#y-#cC z4ZRUG^oGt&fgb3A9teS+#7Ue{&PH$e8;Oibrc~L}84L!4!C){H5)1}|!C){L4221U z!C){L3vvnqhXy`PO1H1xh?SR8Z5$Vuw3R2g{bJUA>4 zOO*u*;ZEPTks1Vk0b9Tk z_|?{S4r&l^MCV{(wcSh#SOS&+A~38^0G424FenfL7A_ij*pq-IdOeDze+_*X&|pXy z5{85!VMrM2bAlmYNEi}^fPpkL#>0>>Bn$}yscGmiBn$~d0+9Fz$&!i5ASZ_tI~-ZL z`xw^?ebmXxiB3;Xb#`{9^Ye3EUS8_r;zCzfSK4egy1u^F?d`4Z@9*{S@SwY2sSoep z^B=FMZvO}RjeHgLygf{9Z6Qp@Ru6~iP`#eQq2kRnfM1*O#N+(oG2V2b&NMu}AHyz; j<9Qmd|HrCD{q=r|0i5QOt^-f`D~9Ot7{fm+?4y4J$xPk* literal 0 HcmV?d00001 diff --git a/core/changelog.txt b/core/changelog.txt index 5e3dd1fd3..89354812f 100644 --- a/core/changelog.txt +++ b/core/changelog.txt @@ -3,6 +3,7 @@ Please visit http://aegisub.net to download latest version = 1.11 beta - 2006.xx.xx =========================== +- New Aegisub logo. (AMZ) - Support reading SSA/ASS files with intermixed V4 and V4+ Styles sections (jfs) - Fixed loading of sections with unexpected cases. (AMZ) - Changes to Audio Spectrum: (jfs) diff --git a/core/dialog_options.cpp b/core/dialog_options.cpp index 815c100fb..2c48e1671 100644 --- a/core/dialog_options.cpp +++ b/core/dialog_options.cpp @@ -36,34 +36,43 @@ /////////// // Headers -#include #include "dialog_options.h" +#ifdef wxUSE_TREEBOOK +#include +#endif /////////////// // Constructor DialogOptions::DialogOptions(wxWindow *parent) -: wxDialog(parent, -1, _T("Options"), wxDefaultPosition, wxSize(400,300)) +: wxDialog(parent, -1, _T("Options"), wxDefaultPosition, wxDefaultSize) { - // List book - book = new wxNotebook(this,-1,wxDefaultPosition,wxSize(300,200)); - wxWindow *page1 = new wxTextCtrl(book,-1,_T(""),wxDefaultPosition,wxSize(100,50)); - wxWindow *page2 = new wxPanel(book,-1,wxDefaultPosition,wxSize(100,50)); - wxSizer *testSizer = new wxBoxSizer(wxVERTICAL); - wxWindow *testWindow = new wxPanel(book,-1); - testSizer->Add(new wxTextCtrl(testWindow,-1,_T(""),wxDefaultPosition,wxSize(100,50)),1,wxEXPAND | wxALL,5); - testSizer->Add(new wxButton(testWindow,wxID_OK),0,wxTOP,5); - testWindow->SetSizer(testSizer); - wxWindow *page3 = testWindow; - book->AddPage(page1,_T("Test"),true); - book->AddPage(page2,_T("Test2"),true); - book->AddPage(page3,_T("Why, hello there"),true); +#ifdef wxUSE_TREEBOOK + // Create book + book = new wxTreebook(this,-1,wxDefaultPosition,wxSize(500,300)); - // Sizer + // List book + book->AddPage(new wxPanel(book,-1),_T("General"),true); + book->AddSubPage(new wxPanel(book,-1),_T("File Save/Load"),true); + book->AddSubPage(new wxPanel(book,-1),_T("Subtitles Grid"),true); + book->AddSubPage(new wxPanel(book,-1),_T("Subtitles Edit Box"),true); + book->AddPage(new wxPanel(book,-1),_T("Video"),true); + book->AddPage(new wxPanel(book,-1),_T("Audio"),true); + book->AddSubPage(new wxPanel(book,-1),_T("Display"),true); + book->AddPage(new wxPanel(book,-1),_T("Automation"),true); + + // Buttons Sizer + wxSizer *buttonSizer = new wxBoxSizer(wxHORIZONTAL); + buttonSizer->AddStretchSpacer(1); + buttonSizer->Add(new wxButton(this,wxID_OK),0,wxRIGHT,5); + buttonSizer->Add(new wxButton(this,wxID_CANCEL),0,wxRIGHT,5); + + // Main Sizer wxSizer *mainSizer = new wxBoxSizer(wxVERTICAL); mainSizer->Add(book,1,wxEXPAND | wxALL,5); - //mainSizer->SetSizeHints(this); + mainSizer->Add(buttonSizer,0,wxEXPAND | wxLEFT | wxRIGHT | wxBOTTOM,5); SetSizer(mainSizer); +#endif } diff --git a/core/dialog_options.h b/core/dialog_options.h index f0611875e..73e3e4cb4 100644 --- a/core/dialog_options.h +++ b/core/dialog_options.h @@ -44,14 +44,16 @@ ////////////// // Prototypes -class wxNotebook; +class wxTreebook; //////////////////////// // Options screen class class DialogOptions: public wxDialog { private: - wxNotebook *book; +#ifdef wxUSE_TREEBOOK + wxTreebook *book; +#endif public: DialogOptions(wxWindow *parent); diff --git a/core/dialog_paste_over.cpp b/core/dialog_paste_over.cpp index 92b50e890..8baab1dac 100644 --- a/core/dialog_paste_over.cpp +++ b/core/dialog_paste_over.cpp @@ -79,7 +79,7 @@ DialogPasteOver::DialogPasteOver (wxWindow *parent) // Buttons wxSizer *ButtonSizer = new wxBoxSizer(wxHORIZONTAL); ButtonSizer->AddStretchSpacer(1); - ButtonSizer->Add(new wxButton(this, wxID_OK),0,0,0); + ButtonSizer->Add(new wxButton(this, wxID_OK),0,wxRIGHT,5); ButtonSizer->Add(new wxButton(this, wxID_CANCEL),0,0,0); // Main sizer diff --git a/core/frame_main.cpp b/core/frame_main.cpp index 194d2472e..76cefc428 100644 --- a/core/frame_main.cpp +++ b/core/frame_main.cpp @@ -272,6 +272,10 @@ void FrameMain::InitMenu() { wxMenuItem *RecentTimesParent = new wxMenuItem(videoMenu, Menu_File_Recent_Timecodes_Parent, _("Recent"), _T(""), wxITEM_NORMAL, RecentTimecodes); videoMenu->Append(RecentTimesParent); videoMenu->AppendSeparator(); + videoMenu->Append(Menu_Video_Load_Keyframes, _("Open keyframes..."), _("Opens a keyframe list file")); + videoMenu->Append(Menu_Video_Save_Keyframes, _("Save keyframes..."), _("Saves the current keyframe list"))->Enable(false); + videoMenu->Append(Menu_Video_Close_Keyframes, _("Close keyframes"), _("Closes the currently open keyframes list"))->Enable(false); + videoMenu->AppendSeparator(); AppendBitmapMenuItem (videoMenu,Menu_Video_JumpTo, _("&Jump To...\t") + Hotkeys.GetText(_T("Video Jump")), _("Jump to frame or time"), wxBITMAP(jumpto_button)); videoMenu->AppendSeparator(); videoMenu->Append(Menu_View_Zoom_50, _("Zoom &50%\t") + Hotkeys.GetText(_T("Zoom 50%")), _("Set zoom to 50%")); @@ -318,7 +322,7 @@ void FrameMain::InitMenu() { AppendBitmapMenuItem (toolMenu,Menu_Tools_SpellCheck, _("Spe&ll checker..."),_("Open spell checker"), wxBITMAP(spellcheck_toolbutton)); #endif toolMenu->AppendSeparator(); - //AppendBitmapMenuItem (toolMenu,Menu_Tools_Options, _("&Options..."), _("Configure Aegisub"), wxBITMAP(hotkeys_button)); + AppendBitmapMenuItem (toolMenu,Menu_Tools_Options, _("&Options..."), _("Configure Aegisub"), wxBITMAP(options_button)); AppendBitmapMenuItem (toolMenu,Menu_Tools_Hotkeys, _("&Hotkeys..."), _("Remap hotkeys"), wxBITMAP(hotkeys_button)); MenuBar->Append(toolMenu, _("&Tools")); diff --git a/core/frame_main.h b/core/frame_main.h index 278b0cf69..b2bbaac5c 100644 --- a/core/frame_main.h +++ b/core/frame_main.h @@ -147,6 +147,9 @@ private: void OnCloseVideo (wxCommandEvent &event); void OnOpenVFR (wxCommandEvent &event); void OnCloseVFR (wxCommandEvent &event); + void OnOpenKeyframes (wxCommandEvent &event); + void OnCloseKeyframes (wxCommandEvent &event); + void OnSaveKeyframes (wxCommandEvent &event); void OnZoomIn (wxCommandEvent &event); void OnZoomOut (wxCommandEvent &event); @@ -215,6 +218,8 @@ private: void LoadVideo(wxString filename,bool autoload=false); void LoadAudio(wxString filename,bool FromVideo=false); void LoadVFR(wxString filename); + void LoadKeyframes(wxString filename); + void SaveKeyframes(wxString filename); void LoadSubtitles(wxString filename,wxString charset=_T("")); bool SaveSubtitles(bool saveas=false,bool withCharset=false); int TryToCloseSubs(bool enableCancel=true); @@ -285,6 +290,9 @@ enum { Menu_View_Zoom_200, Menu_Video_Zoom_In, Menu_Video_Zoom_Out, + Menu_Video_Load_Keyframes, + Menu_Video_Save_Keyframes, + Menu_Video_Close_Keyframes, Toolbar_Zoom_Dropdown, Menu_Video_AR_Default, Menu_Video_AR_Full, diff --git a/core/frame_main_events.cpp b/core/frame_main_events.cpp index 79ee2c0fe..6108f5f8b 100644 --- a/core/frame_main_events.cpp +++ b/core/frame_main_events.cpp @@ -133,6 +133,9 @@ BEGIN_EVENT_TABLE(FrameMain, wxFrame) EVT_MENU(Menu_File_Export_Subtitles, FrameMain::OnExportSubtitles) EVT_MENU(Menu_File_Open_VFR, FrameMain::OnOpenVFR) EVT_MENU(Menu_File_Close_VFR, FrameMain::OnCloseVFR) + EVT_MENU(Menu_Video_Load_Keyframes, FrameMain::OnOpenKeyframes) + EVT_MENU(Menu_Video_Save_Keyframes, FrameMain::OnSaveKeyframes) + EVT_MENU(Menu_Video_Close_Keyframes, FrameMain::OnCloseKeyframes) EVT_MENU(Menu_View_Zoom_50, FrameMain::OnSetZoom50) EVT_MENU(Menu_View_Zoom_100, FrameMain::OnSetZoom100) @@ -286,7 +289,9 @@ void FrameMain::OnMenuOpen (wxMenuEvent &event) { MenuBar->Enable(Menu_Video_AR_Wide,state); MenuBar->Enable(Menu_Video_AR_235,state); MenuBar->Enable(Menu_Video_AR_Custom,state); - MenuBar->Enable(Menu_File_Close_VFR,VFR_Output.GetFrameRateType() == VFR); //fix me, wrong? + MenuBar->Enable(Menu_File_Close_VFR,VFR_Output.GetFrameRateType() == VFR); + MenuBar->Enable(Menu_Video_Close_Keyframes,videoBox->videoDisplay->keyFramesLoaded); + MenuBar->Enable(Menu_Video_Save_Keyframes,videoBox->videoDisplay->keyFramesLoaded); // Set AR radio int arType = videoBox->videoDisplay->GetAspectRatioType(); @@ -623,6 +628,24 @@ void FrameMain::OnCloseVFR(wxCommandEvent &event) { } +////////////////// +// Open keyframes +void FrameMain::OnOpenKeyframes (wxCommandEvent &event) { +} + + +/////////////////// +// Close keyframes +void FrameMain::OnCloseKeyframes (wxCommandEvent &event) { +} + + +////////////////// +// Save keyframes +void FrameMain::OnSaveKeyframes (wxCommandEvent &event) { +} + + /////////////// // Zoom levels void FrameMain::OnSetZoom50(wxCommandEvent& WXUNUSED(event)) { diff --git a/core/options.cpp b/core/options.cpp index a1613fc61..2d52e822a 100644 --- a/core/options.cpp +++ b/core/options.cpp @@ -66,11 +66,13 @@ OptionsManager::~OptionsManager() { /////////////////////// // Load default values void OptionsManager::LoadDefaults() { - SetInt(_T("Locale Code"),-1); - SetText(_T("Save Charset"),_T("UTF-8")); - SetBool(_T("Use nonstandard Milisecond Times"),false); - SetBool(_T("Keep raw dialogue data"),false); - + ///// PUBLIC ////// + // Here go the options that can be edited by the options menu + + // General + SetBool(_T("Tips enabled"),true); + SetBool(_T("Show splash"),true); + SetBool(_T("Link Time Boxes Commit"),true); SetInt(_T("Undo Levels"),8); SetInt(_T("Recent timecodes max"),16); SetInt(_T("Recent sub max"),16); @@ -79,10 +81,54 @@ void OptionsManager::LoadDefaults() { SetInt(_T("Recent find max"),16); SetInt(_T("Recent replace max"),16); - SetBool(_T("Sync video with subs"),true); - SetBool(_T("Show keyframes on video slider"),true); - SetBool(_T("Link Time Boxes Commit"),true); + // File Save/Load + SetText(_T("Save Charset"),_T("UTF-8")); + SetBool(_T("Use nonstandard Milisecond Times"),false); + SetBool(_T("Auto backup"),true); + SetInt(_T("Auto save every seconds"),60); + SetBool(_T("Auto save on every change"),false); + SetText(_T("Auto backup path"),_T("autoback")); + SetText(_T("Auto save path"),_T("autosave")); + SetText(_T("Auto recovery path"),_T("recovered")); + SetInt(_T("Autoload linked files"),2); + // Video Options + SetInt(_T("Video Check Script Res"), 0); + SetInt(_T("Video Default Zoom"), 7); + SetInt(_T("Video Fast Jump Step"), 10); + SetBool(_T("Show keyframes on video slider"),true); + + // Video Provider (Advanced) + SetBool(_T("Threaded Video"),false); + SetInt(_T("Avisynth MemoryMax"),64); + SetBool(_T("Allow Ancient Avisynth"),false); + SetText(_T("Video Provider"),_T("Avisynth")); + SetText(_T("Video resizer"),_T("BilinearResize")); + + // Audio Options + SetBool(_T("Audio Link"),true); + SetBool(_T("Audio Autocommit"),false); + SetBool(_T("Audio Autoscroll"),true); + SetBool(_T("Audio SSA Mode"),false); + SetBool(_T("Audio SSA Next Line on Commit"),true); + SetBool(_T("Audio SSA Allow Autocommit"),false); + SetBool(_T("Audio Autofocus"),false); + SetBool(_T("Audio Wheel Default To Zoom"),false); + SetBool(_T("Audio lock scroll on cursor"),false); + SetInt(_T("Timing Default Duration"), 2000); + SetInt(_T("Audio lead in"),200); + SetInt(_T("Audio lead out"),300); + SetInt(_T("Audio Inactive Lines Display Mode"),1); + + // Audio Provider (Advanced) + SetInt(_T("Audio Cache"),1); + SetInt(_T("Audio Sample Rate"),0); + SetText(_T("Audio Downmixer"),_T("ConvertToMono")); + + // Automation + SetText(_T("Automation Include Path"), AegisubApp::folderName + _T("automation/include")); + + // Edit box cosmetic SetBool(_T("Syntax Highlight Enabled"),true); SetColour(_T("Syntax Highlight Normal"),wxColour(0,0,0)); SetColour(_T("Syntax Highlight Brackets"),wxColour(20,50,255)); @@ -97,24 +143,6 @@ void OptionsManager::LoadDefaults() { #endif SetText(_T("Font Face"),_T("")); - SetBool(_T("Shift Times ByTime"),true); - SetInt(_T("Shift Times Type"),0); - SetInt(_T("Shift Times Length"),0); - SetBool(_T("Shift Times All Rows"),true); - SetBool(_T("Shift Times Direction"),true); - - SetBool(_T("Tips enabled"),true); - SetInt(_T("Tips current"),0); - - SetBool(_T("Show splash"),true); - SetBool(_T("Show associations"),true); - - SetBool(_T("Find Match Case"),false); - SetBool(_T("Find RegExp"),false); - SetBool(_T("Find Update Video"),false); - SetInt(_T("Find Affect"),0); - SetInt(_T("Find Field"),0); - // Generate colors wxColour tempCol = wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOW); float r = tempCol.Red() / 255.0; @@ -132,6 +160,7 @@ void OptionsManager::LoadDefaults() { wxColour grid = wxColour(128,128,128); wxColour collision = wxColour(255,0,0); + // Grid cosmetic SetColour(_T("Grid standard foreground"),textCol); SetColour(_T("Grid selection background"),selection); SetColour(_T("Grid selection foreground"),textCol); @@ -144,70 +173,15 @@ void OptionsManager::LoadDefaults() { SetColour(_T("Grid left column"),labels); SetColour(_T("Grid active border"),active); SetColour(_T("Grid lines"),grid); - - SetInt(_T("Grid hide overrides"),1); wchar_t temp = 0x2600; SetText(_T("Grid hide overrides char"),temp); SetBool(_T("Grid allow focus"),true); - for (int i=0;i<10;i++) SetBool(_T("Grid show column ") + IntegerToString(i),true); - -#if defined(__WINDOWS__) - SetInt(_T("Grid font size"),8); -#else - SetInt(_T("Grid font size"),10); -#endif - SetBool(_T("Highlight subs in frame"),true); - for (int i=0;i<9;i++) SetBool(wxString::Format(_T("Paste Over #%i"),i),false); - SetBool(_T("Paste Over #9"),true); - - SetText(_T("Fonts Collector Destination"),_T("?script")); - - SetBool(_T("Threaded Video"),false); - SetInt(_T("Avisynth MemoryMax"),64); - SetBool(_T("Allow Ancient Avisynth"),false); - SetText(_T("Video Provider"),_T("Avisynth")); - - SetText(_T("Video resizer"),_T("BilinearResize")); - SetInt(_T("Video Check Script Res"), 0); - SetInt(_T("Video Default Zoom"), 7); - SetInt(_T("Video Fast Jump Step"), 10); - - SetInt(_T("Audio Cache"),1); - SetInt(_T("Audio Sample Rate"),0); - SetText(_T("Audio Downmixer"),_T("ConvertToMono")); - SetBool(_T("Audio Link"),true); - SetBool(_T("Audio Autocommit"),false); - SetBool(_T("Audio Autoscroll"),true); - SetBool(_T("Audio SSA Mode"),false); - SetBool(_T("Audio SSA Next Line on Commit"),true); - SetBool(_T("Audio SSA Allow Autocommit"),false); - SetBool(_T("Audio Autofocus"),false); - SetInt(_T("Audio Display Height"),100); - SetInt(_T("Timing Default Duration"), 2000); - SetBool(_T("Audio Wheel Default To Zoom"),false); - SetBool(_T("Audio lock scroll on cursor"),false); - - SetBool(_T("Audio Spectrum"),false); + // Audio Cosmetic SetInt(_T("Audio Spectrum Cutoff"),32); SetInt(_T("Audio Spectrum Window"),11); SetBool(_T("Audio Spectrum invert selection"), true); - SetInt(_T("Audio lead in"),200); - SetInt(_T("Audio lead out"),300); - SetInt(_T("Audio Inactive Lines Display Mode"),1); - - SetInt(_T("Timing processor key start before thres"),5); - SetInt(_T("Timing processor key start after thres"),4); - SetInt(_T("Timing processor key end before thres"),5); - SetInt(_T("Timing processor key end after thres"),6); - SetInt(_T("Timing processor adjascent thres"),300); - SetBool(_T("Timing processor Enable lead-in"),true); - SetBool(_T("Timing processor Enable lead-out"),true); - SetBool(_T("Timing processor Enable keyframe"),true); - SetBool(_T("Timing processor Enable adjascent"),true); - SetFloat(_T("Timing processor adjascent bias"),1.0); - SetColour(_T("Audio Selection Background Modified"),wxColour(92,0,0)); SetColour(_T("Audio Selection Background"),wxColour(64,64,64)); SetColour(_T("Audio Seconds Boundaries"),wxColour(0,100,255)); @@ -226,7 +200,57 @@ void OptionsManager::LoadDefaults() { SetBool(_T("Audio Draw Secondary Lines"), true); SetBool(_T("Audio Draw Selection Background"), true); - SetText(_T("Automation Include Path"), AegisubApp::folderName + _T("automation/include")); + + + ///// INTERNAL ////// + // Options that are set by the program itself + SetInt(_T("Locale Code"),-1); + SetBool(_T("Keep raw dialogue data"),false); + + SetBool(_T("Sync video with subs"),true); + + SetBool(_T("Shift Times ByTime"),true); + SetInt(_T("Shift Times Type"),0); + SetInt(_T("Shift Times Length"),0); + SetBool(_T("Shift Times All Rows"),true); + SetBool(_T("Shift Times Direction"),true); + + SetInt(_T("Tips current"),0); + SetBool(_T("Show associations"),true); + + SetBool(_T("Find Match Case"),false); + SetBool(_T("Find RegExp"),false); + SetBool(_T("Find Update Video"),false); + SetInt(_T("Find Affect"),0); + SetInt(_T("Find Field"),0); + + SetInt(_T("Grid hide overrides"),1); + for (int i=0;i<10;i++) SetBool(_T("Grid show column ") + IntegerToString(i),true); + +#if defined(__WINDOWS__) + SetInt(_T("Grid font size"),8); +#else + SetInt(_T("Grid font size"),10); +#endif + + for (int i=0;i<9;i++) SetBool(wxString::Format(_T("Paste Over #%i"),i),false); + SetBool(_T("Paste Over #9"),true); + + SetText(_T("Fonts Collector Destination"),_T("?script")); + + SetInt(_T("Audio Display Height"),100); + SetBool(_T("Audio Spectrum"),false); + + SetInt(_T("Timing processor key start before thres"),5); + SetInt(_T("Timing processor key start after thres"),4); + SetInt(_T("Timing processor key end before thres"),5); + SetInt(_T("Timing processor key end after thres"),6); + SetInt(_T("Timing processor adjascent thres"),300); + SetBool(_T("Timing processor Enable lead-in"),true); + SetBool(_T("Timing processor Enable lead-out"),true); + SetBool(_T("Timing processor Enable keyframe"),true); + SetBool(_T("Timing processor Enable adjascent"),true); + SetFloat(_T("Timing processor adjascent bias"),1.0); SetText(_T("Select Text"),_T("")); SetInt(_T("Select Condition"),0); @@ -237,14 +261,6 @@ void OptionsManager::LoadDefaults() { SetBool(_T("Select Match dialogues"),true); SetBool(_T("Select Match comments"),false); - SetBool(_T("Auto backup"),true); - SetInt(_T("Auto save every seconds"),60); - SetBool(_T("Auto save on every change"),false); - SetText(_T("Auto backup path"),_T("autoback")); - SetText(_T("Auto save path"),_T("autosave")); - SetText(_T("Auto recovery path"),_T("recovered")); - SetInt(_T("Autoload linked files"),2); - SetText(_T("Text actor separator"),_T(":")); SetText(_T("Text comment starter"),_T("#")); diff --git a/core/res.rc b/core/res.rc index 3f28277cd..c48aeb56b 100644 --- a/core/res.rc +++ b/core/res.rc @@ -51,6 +51,7 @@ zoom_in_button BITMAP "bitmaps/zoom_in.bmp" zoom_out_button BITMAP "bitmaps/zoom_out.bmp" font_collector_button BITMAP "bitmaps/fontcollect.bmp" hotkeys_button BITMAP "bitmaps/hotkeys.bmp" +options_button BITMAP "bitmaps/options.bmp" attach_button BITMAP "bitmaps/attach.bmp" substart_to_video BITMAP "bitmaps/substart_to_video.bmp" subend_to_video BITMAP "bitmaps/subend_to_video.bmp" diff --git a/core/splash.cpp b/core/splash.cpp index e195c62a6..39365d2f4 100644 --- a/core/splash.cpp +++ b/core/splash.cpp @@ -36,6 +36,8 @@ //////////// // Includes +#include +#include #include "splash.h" #include "options.h" #include "tip.h" @@ -52,8 +54,12 @@ SplashScreen::SplashScreen(wxWindow *parent) // Get splash splash = wxBITMAP(splash); - // Prepare + // Set position Center(); + //wxDisplay display(wxDisplay::GetFromPoint(parent->GetPosition())); + //wxRect rect = display.GetGeometry(); + + // Prepare wxClientDC dc(this); dc.BeginDrawing(); dc.DrawBitmap(splash,0,0); diff --git a/core/video_display.cpp b/core/video_display.cpp index a918cdbe0..4ce2cfc37 100644 --- a/core/video_display.cpp +++ b/core/video_display.cpp @@ -99,6 +99,7 @@ VideoDisplay::VideoDisplay(wxWindow* parent, wxWindowID id, const wxPoint& pos, ControlSlider = NULL; PositionDisplay = NULL; loaded = false; + keyFramesLoaded = false; frame_n = 0; origSize = size; arType = 0; @@ -172,6 +173,7 @@ void VideoDisplay::SetVideo(const wxString &filename) { provider->SetDAR(arValue); KeyFrames.Clear(); + keyFramesLoaded = false; // Why the hell was this disabled? // Read extra data from file @@ -184,6 +186,7 @@ void VideoDisplay::SetVideo(const wxString &filename) { // Get keyframes KeyFrames = MatroskaWrapper::wrapper.GetKeyFrames(); + keyFramesLoaded = true; // Ask to override timecodes int override = wxYES; @@ -194,7 +197,10 @@ void VideoDisplay::SetVideo(const wxString &filename) { MatroskaWrapper::wrapper.Close(); } #ifdef __WINDOWS__ - else if (ext == _T(".avi")) KeyFrames = VFWWrapper::GetKeyFrames(filename); + else if (ext == _T(".avi")) { + KeyFrames = VFWWrapper::GetKeyFrames(filename); + keyFramesLoaded = true; + } #endif // Update size @@ -237,6 +243,9 @@ void VideoDisplay::Reset() { GetSize(&_w,&_h); SetSizeHints(_w,_h,_w,_h); + KeyFrames.Clear(); + keyFramesLoaded = false; + // Remove temporary audio provider if (audio && audio->temporary) { delete audio->provider; diff --git a/core/video_display.h b/core/video_display.h index 63761127c..1a5be1995 100644 --- a/core/video_display.h +++ b/core/video_display.h @@ -99,7 +99,9 @@ private: public: VideoProvider *provider; + bool keyFramesLoaded; wxArrayInt KeyFrames; + SubtitlesGrid *grid; wxString videoName; int w,h; @@ -132,7 +134,7 @@ public: void JumpToTime(int ms); void RefreshSubtitles(); void RefreshVideo(); - void DrawText( wxPoint Pos, wxString Text ); + void DrawText(wxPoint Pos, wxString Text); void UpdatePositionDisplay(); void SetZoom(double value); void SetZoomPos(int pos);