Early work on options dialog (won't really work without wxWidgets 2.8.0) and save/load keyframes.
Originally committed to SVN as r571.
This commit is contained in:
parent
0bccc65219
commit
7573a814ad
13 changed files with 197 additions and 116 deletions
BIN
core/bitmaps/options.bmp
Normal file
BIN
core/bitmaps/options.bmp
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.3 KiB |
|
@ -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)
|
||||
|
|
|
@ -36,34 +36,43 @@
|
|||
|
||||
///////////
|
||||
// Headers
|
||||
#include <wx/notebook.h>
|
||||
#include "dialog_options.h"
|
||||
#ifdef wxUSE_TREEBOOK
|
||||
#include <wx/treebook.h>
|
||||
#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
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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"));
|
||||
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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)) {
|
||||
|
|
198
core/options.cpp
198
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("#"));
|
||||
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -36,6 +36,8 @@
|
|||
|
||||
////////////
|
||||
// Includes
|
||||
#include <wx/wxprec.h>
|
||||
#include <wx/display.h>
|
||||
#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);
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue