mirror of https://github.com/odrling/Aegisub
Improved Splash Screen behavior to show up even if the program is frozen loading subtitles, and to center on the current display.
Originally committed to SVN as r623.
This commit is contained in:
parent
b54198b721
commit
e4825d4067
|
@ -45,6 +45,7 @@ Please visit http://aegisub.net to download latest version
|
|||
- Added an inline MyThes-based Thesaurus. (AMZ)
|
||||
- Added two options ("Audio HD Cache Location" and "Audio HD Cache Name") that allows you to specify where to keep the audio cache. (AMZ)
|
||||
- Flexibible audio cache names now allow you to have more than one copy of Aegisub open with audio loaded to HD cache. (AMZ)
|
||||
- Improved Splash Screen behavior to show up even if the program is frozen loading subtitles, and to center on the current display. (AMZ)
|
||||
|
||||
|
||||
= 1.10 beta - 2006.08.07 ===========================
|
||||
|
|
|
@ -46,7 +46,7 @@
|
|||
///////////////
|
||||
// Constructor
|
||||
SplashScreen::SplashScreen(wxWindow *parent)
|
||||
: wxFrame (NULL, -1, _T(""), wxDefaultPosition, wxSize(400,240), wxSTAY_ON_TOP | wxFRAME_NO_TASKBAR , _T("Splash"))
|
||||
: wxFrame (parent, -1, _T(""), wxDefaultPosition, wxSize(400,240), wxSTAY_ON_TOP | wxFRAME_NO_TASKBAR , _T("Splash"))
|
||||
{
|
||||
// Set parent
|
||||
par = parent;
|
||||
|
@ -54,10 +54,17 @@ SplashScreen::SplashScreen(wxWindow *parent)
|
|||
// Get splash
|
||||
splash = wxBITMAP(splash);
|
||||
|
||||
// Set position
|
||||
Center();
|
||||
//wxDisplay display(wxDisplay::GetFromPoint(parent->GetPosition()));
|
||||
//wxRect rect = display.GetGeometry();
|
||||
#if wxUSE_DISPLAY == 1
|
||||
// Center on current display
|
||||
wxDisplay display(wxDisplay::GetFromPoint(parent->GetScreenPosition()));
|
||||
wxRect dr = display.GetGeometry();
|
||||
wxRect window = GetScreenRect();
|
||||
window = window.CenterIn(dr);
|
||||
Move(window.GetLeft(),window.GetTop());
|
||||
#else
|
||||
// Center on window
|
||||
CentreOnParent();
|
||||
#endif
|
||||
|
||||
// Prepare
|
||||
wxClientDC dc(this);
|
||||
|
|
|
@ -74,18 +74,6 @@
|
|||
FrameMain::FrameMain (wxArrayString args)
|
||||
: wxFrame ((wxFrame*)NULL,-1,_T(""),wxDefaultPosition,wxSize(800,600),wxDEFAULT_FRAME_STYLE | wxCLIP_CHILDREN)
|
||||
{
|
||||
// Splash screen
|
||||
#ifndef _DEBUG
|
||||
if (Options.AsBool(_T("Show Splash"))) {
|
||||
SplashScreen *splash = new SplashScreen(NULL);
|
||||
splash->Show(true);
|
||||
}
|
||||
else {
|
||||
// Show tip of the day
|
||||
TipOfTheDay::Show(this);
|
||||
}
|
||||
#endif
|
||||
|
||||
// Initialize flags
|
||||
HasSelection = false;
|
||||
menuCreated = false;
|
||||
|
@ -105,10 +93,21 @@ FrameMain::FrameMain (wxArrayString args)
|
|||
// Contents
|
||||
curMode = -1;
|
||||
InitContents();
|
||||
Show();
|
||||
|
||||
// Parse arguments
|
||||
LoadSubtitles(_T(""));
|
||||
LoadList(args);
|
||||
// Splash screen
|
||||
//#ifndef _DEBUG
|
||||
if (Options.AsBool(_T("Show Splash"))) {
|
||||
SplashScreen *splash = new SplashScreen(this);
|
||||
splash->Show(true);
|
||||
splash->Update();
|
||||
}
|
||||
else {
|
||||
// Show tip of the day
|
||||
TipOfTheDay::Show(this);
|
||||
}
|
||||
//#endif
|
||||
wxSafeYield();
|
||||
|
||||
// Set autosave timer
|
||||
AutoSave.SetOwner(this,AutoSave_Timer);
|
||||
|
@ -123,6 +122,10 @@ FrameMain::FrameMain (wxArrayString args)
|
|||
|
||||
// Set drop target
|
||||
SetDropTarget(new AegisubFileDropTarget(this));
|
||||
|
||||
// Parse arguments
|
||||
LoadSubtitles(_T(""));
|
||||
LoadList(args);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -114,7 +114,6 @@ bool AegisubApp::OnInit() {
|
|||
|
||||
// Open main frame
|
||||
frame = new FrameMain(subs);
|
||||
frame->Show(true);
|
||||
SetTopWindow(frame);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue