From 30fc5aa32f9988270ef1d8b80f68a8877cb93384 Mon Sep 17 00:00:00 2001 From: Rodrigo Braz Monteiro Date: Sat, 12 Jan 2008 03:12:49 +0000 Subject: [PATCH] Made Aegisub remember whether video was detached or not last time. Originally committed to SVN as r1691. --- aegisub/dialog_detached_video.cpp | 5 +++++ aegisub/frame_main.cpp | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/aegisub/dialog_detached_video.cpp b/aegisub/dialog_detached_video.cpp index 7e457e792..7ec562bc2 100644 --- a/aegisub/dialog_detached_video.cpp +++ b/aegisub/dialog_detached_video.cpp @@ -43,6 +43,7 @@ #include "video_context.h" #include "video_display.h" #include "frame_main.h" +#include "options.h" /////////////// @@ -76,6 +77,8 @@ DialogDetachedVideo::DialogDetachedVideo(FrameMain *par) // Update parent->SetDisplayMode(0,-1); + Options.SetBool(_T("Detached video"),true); + Options.Save(); } @@ -109,4 +112,6 @@ void DialogDetachedVideo::OnClose(wxCloseEvent &event) { Destroy(); par->detachedVideo = NULL; par->SetDisplayMode(-1,-1); + Options.SetBool(_T("Detached video"),false); + Options.Save(); } diff --git a/aegisub/frame_main.cpp b/aegisub/frame_main.cpp index 580c47f81..0fd79ae5a 100644 --- a/aegisub/frame_main.cpp +++ b/aegisub/frame_main.cpp @@ -1066,7 +1066,7 @@ void FrameMain::LoadVideo(wxString file,bool autoload) { SetDisplayMode(-1,-1); EditBox->UpdateFrameTiming(); - if (!VideoContext::Get()->IsLoaded()) DetachVideo(false); + DetachVideo(VideoContext::Get()->IsLoaded() && Options.AsBool(_T("Detached Video"))); Thaw(); }