Fixed mkv parsing and a few other minor stuff

Originally committed to SVN as r125.
This commit is contained in:
Rodrigo Braz Monteiro 2006-02-23 19:26:14 +00:00
parent fdcb1857c8
commit 83ad086caf
6 changed files with 43 additions and 16 deletions

View file

@ -45,7 +45,9 @@ Please visit http://aegisub.net to download latest version
- Aegisub will now dump the stack to stack.txt when it crashes with a fatal exception, which might or might not work. (AMZ)
- Audio display in SSA mode will no longer ignore clicks if it wasn't focused (AMZ)
- The font override button in the subtitles edit box can now modify font size, italics, bold and underline as well as font face (no strikeout, as wx does not provide an interface to access that data). (AMZ)
- Now requires Avisynth 2.5.6a or later, added an option to override it to config.dat (Myrsloik)
- Now requires Avisynth 2.5.6a or later, added an option ("allow ancient avisynth") to override it to config.dat. (Myrsloik)
- Added reading of keyframe and timecode data from Matroska files (which are still not recommended, due to their dependency on DirectShowSource). (AMZ)
- Added forums and bugtracker to Help menu. (AMZ)
= 1.09 beta - 2006.01.16 ===========================

View file

@ -314,7 +314,10 @@ void FrameMain::InitMenu() {
AppendBitmapMenuItem (helpMenu,Menu_Help_Contents, _("&Contents...\t") + Hotkeys.GetText(_T("Help")), _("Help topics"), wxBITMAP(contents_button));
helpMenu->AppendSeparator();
helpMenu->Append(Menu_Help_Website, _("&Website..."), _("Visit Aegisub's official website"));
helpMenu->Append(Menu_Help_Forums, _("&Forums..."), _("Visit Aegisub's forums"));
helpMenu->Append(Menu_Help_BugTracker, _("&Bug tracker..."), _("Visit Aegisub's bug tracker"));
AppendBitmapMenuItem (helpMenu,Menu_Help_IRCChannel, _("&IRC channel..."), _("Visit Aegisub's official IRC channel"), wxBITMAP(irc_button));
helpMenu->AppendSeparator();
helpMenu->Append(Menu_Help_About, _("&About..."), _("About Aegisub"));
MenuBar->Append(helpMenu, _("&Help"));

View file

@ -131,6 +131,8 @@ private:
void OnAbout (wxCommandEvent &event);
void OnContents (wxCommandEvent &event);
void OnWebsite (wxCommandEvent &event);
void OnForums (wxCommandEvent &event);
void OnBugTracker (wxCommandEvent &event);
void OnIRCChannel (wxCommandEvent &event);
void OnOpenProject (wxCommandEvent &event);
@ -312,6 +314,9 @@ enum {
Menu_Help_Contents,
Menu_Help_IRCChannel,
Menu_Help_Website,
Menu_Help_Forums,
Menu_Help_BugTracker,
Menu_Help_Check_Updates,
Menu_Help_About,
Menu_Subs_Snap_Start_To_Video,

View file

@ -174,6 +174,8 @@ BEGIN_EVENT_TABLE(FrameMain, wxFrame)
EVT_MENU(Menu_Help_Contents, FrameMain::OnContents)
EVT_MENU(Menu_Help_Website, FrameMain::OnWebsite)
EVT_MENU(Menu_Help_Forums, FrameMain::OnForums)
EVT_MENU(Menu_Help_BugTracker, FrameMain::OnBugTracker)
EVT_MENU(Menu_Help_IRCChannel, FrameMain::OnIRCChannel)
EVT_MENU(Menu_Help_About, FrameMain::OnAbout)
@ -394,7 +396,29 @@ void FrameMain::OnContents(wxCommandEvent& WXUNUSED(event)) {
void FrameMain::OnWebsite(wxCommandEvent& WXUNUSED(event)) {
wxFileType *type = wxTheMimeTypesManager->GetFileTypeFromExtension(_T("html"));
if (type) {
wxString command = type->GetOpenCommand(_T("http://aegisub.net/"));
wxString command = type->GetOpenCommand(_T("http://www.aegisub.net/"));
if (!command.empty()) wxExecute(command);
}
}
///////////////
// Open forums
void FrameMain::OnForums(wxCommandEvent& WXUNUSED(event)) {
wxFileType *type = wxTheMimeTypesManager->GetFileTypeFromExtension(_T("html"));
if (type) {
wxString command = type->GetOpenCommand(_T("http://www.malakith.net/aegisub/"));
if (!command.empty()) wxExecute(command);
}
}
///////////////////
// Open bugtracker
void FrameMain::OnBugTracker(wxCommandEvent& WXUNUSED(event)) {
wxFileType *type = wxTheMimeTypesManager->GetFileTypeFromExtension(_T("html"));
if (type) {
wxString command = type->GetOpenCommand(_T("http://www.malakith.net/aegibug/"));
if (!command.empty()) wxExecute(command);
}
}

View file

@ -156,11 +156,9 @@ void MatroskaWrapper::Parse() {
int frameN = 0;
while (mkv_ReadFrame(file,0,&rt,&startTime,&endTime,&filePos,&frameSize,&frameFlags) == 0) {
// Read value
double curTime = double(startTime) / timecodeScale;
if (!(frameFlags & FRAME_GAP)) {
frames.push_back(MkvFrame((frameFlags & FRAME_KF) != 0,curTime));
frameN++;
}
double curTime = double(startTime) / 1000000.0;
frames.push_back(MkvFrame((frameFlags & FRAME_KF) != 0,curTime));
frameN++;
// Cancelled?
if (canceled) {

View file

@ -216,23 +216,17 @@ void SubtitlesGrid::OnKeyDown(wxKeyEvent &event) {
if (n_found >= 1) {
// Copy
if (Hotkeys.IsPressed(_T("Copy"))) {
wxCommandEvent dummy;
OnCopyLines(dummy);
return;
CopyLines(GetSelection());
}
// Cut
if (Hotkeys.IsPressed(_T("Cut"))) {
wxCommandEvent dummy;
OnCutLines(dummy);
return;
CutLines(GetSelection());
}
// Paste
if (Hotkeys.IsPressed(_T("Paste"))) {
wxCommandEvent dummy;
OnPasteLines(dummy);
return;
PasteLines(GetFirstSelRow());
}
// Delete
@ -774,6 +768,7 @@ void SubtitlesGrid::PasteLines(int n) {
if (inserted > 0) {
// Commit
UpdateMaps();
AdjustScrollbar();
ass->FlagAsModified();
CommitChanges();