App ()
: wxApp ()
, _frame (0)
+ , _splash (0)
{}
private:
bool OnInit ()
{
- wxSplashScreen* splash = 0;
try {
wxInitAllImageHandlers ();
Config::FailedToLoad.connect (boost::bind (&App::config_failed_to_load, this));
Config::Warning.connect (boost::bind (&App::config_warning, this, _1));
- splash = maybe_show_splash ();
+ _splash = maybe_show_splash ();
SetAppName (_("DCP-o-matic"));
_frame = new DOMFrame (_("DCP-o-matic"));
SetTopWindow (_frame);
_frame->Maximize ();
- if (splash) {
- splash->Destroy ();
- splash = 0;
+ if (_splash) {
+ _splash->Destroy ();
+ _splash = 0;
}
if (!Config::instance()->nagged(Config::NAG_INITIAL_SETUP)) {
}
catch (exception& e)
{
- if (splash) {
- splash->Destroy ();
+ if (_splash) {
+ _splash->Destroy ();
}
error_dialog (0, wxString::Format ("DCP-o-matic could not start."), std_to_wx(e.what()));
}
void report_exception ()
{
+ if (_splash) {
+ _splash->Destroy ();
+ _splash = 0;
+ }
+
try {
throw;
} catch (FileError& e) {
return false;
}
+ if (_splash) {
+ _splash->Destroy ();
+ _splash = 0;
+ }
+
RecreateChainDialog* d = new RecreateChainDialog (_frame);
int const r = d->ShowModal ();
d->Destroy ();
}
DOMFrame* _frame;
+ wxSplashScreen* _splash;
shared_ptr<wxTimer> _timer;
string _film_to_load;
string _film_to_create;