forked from mia/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
4 changed files with 31 additions and 21 deletions
|
@ -45,6 +45,7 @@ Please visit http://aegisub.net to download latest version
|
||||||
- Added an inline MyThes-based Thesaurus. (AMZ)
|
- 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)
|
- 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)
|
- 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 ===========================
|
= 1.10 beta - 2006.08.07 ===========================
|
||||||
|
|
|
@ -46,7 +46,7 @@
|
||||||
///////////////
|
///////////////
|
||||||
// Constructor
|
// Constructor
|
||||||
SplashScreen::SplashScreen(wxWindow *parent)
|
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
|
// Set parent
|
||||||
par = parent;
|
par = parent;
|
||||||
|
@ -54,10 +54,17 @@ SplashScreen::SplashScreen(wxWindow *parent)
|
||||||
// Get splash
|
// Get splash
|
||||||
splash = wxBITMAP(splash);
|
splash = wxBITMAP(splash);
|
||||||
|
|
||||||
// Set position
|
#if wxUSE_DISPLAY == 1
|
||||||
Center();
|
// Center on current display
|
||||||
//wxDisplay display(wxDisplay::GetFromPoint(parent->GetPosition()));
|
wxDisplay display(wxDisplay::GetFromPoint(parent->GetScreenPosition()));
|
||||||
//wxRect rect = display.GetGeometry();
|
wxRect dr = display.GetGeometry();
|
||||||
|
wxRect window = GetScreenRect();
|
||||||
|
window = window.CenterIn(dr);
|
||||||
|
Move(window.GetLeft(),window.GetTop());
|
||||||
|
#else
|
||||||
|
// Center on window
|
||||||
|
CentreOnParent();
|
||||||
|
#endif
|
||||||
|
|
||||||
// Prepare
|
// Prepare
|
||||||
wxClientDC dc(this);
|
wxClientDC dc(this);
|
||||||
|
|
|
@ -74,18 +74,6 @@
|
||||||
FrameMain::FrameMain (wxArrayString args)
|
FrameMain::FrameMain (wxArrayString args)
|
||||||
: wxFrame ((wxFrame*)NULL,-1,_T(""),wxDefaultPosition,wxSize(800,600),wxDEFAULT_FRAME_STYLE | wxCLIP_CHILDREN)
|
: 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
|
// Initialize flags
|
||||||
HasSelection = false;
|
HasSelection = false;
|
||||||
menuCreated = false;
|
menuCreated = false;
|
||||||
|
@ -105,10 +93,21 @@ FrameMain::FrameMain (wxArrayString args)
|
||||||
// Contents
|
// Contents
|
||||||
curMode = -1;
|
curMode = -1;
|
||||||
InitContents();
|
InitContents();
|
||||||
|
Show();
|
||||||
|
|
||||||
// Parse arguments
|
// Splash screen
|
||||||
LoadSubtitles(_T(""));
|
//#ifndef _DEBUG
|
||||||
LoadList(args);
|
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
|
// Set autosave timer
|
||||||
AutoSave.SetOwner(this,AutoSave_Timer);
|
AutoSave.SetOwner(this,AutoSave_Timer);
|
||||||
|
@ -123,6 +122,10 @@ FrameMain::FrameMain (wxArrayString args)
|
||||||
|
|
||||||
// Set drop target
|
// Set drop target
|
||||||
SetDropTarget(new AegisubFileDropTarget(this));
|
SetDropTarget(new AegisubFileDropTarget(this));
|
||||||
|
|
||||||
|
// Parse arguments
|
||||||
|
LoadSubtitles(_T(""));
|
||||||
|
LoadList(args);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -114,7 +114,6 @@ bool AegisubApp::OnInit() {
|
||||||
|
|
||||||
// Open main frame
|
// Open main frame
|
||||||
frame = new FrameMain(subs);
|
frame = new FrameMain(subs);
|
||||||
frame->Show(true);
|
|
||||||
SetTopWindow(frame);
|
SetTopWindow(frame);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue