From 4aaa8f4936fed1e261daa296f620bef1e1a4045c Mon Sep 17 00:00:00 2001 From: srn Date: Mon, 10 Apr 2006 13:30:30 +0000 Subject: [PATCH] Returned initialization of splash screen to the previous place after SessionLauncher start. --- src/Session/SALOME_Session_Server.cxx | 39 ++++++++++++--------------- 1 file changed, 17 insertions(+), 22 deletions(-) diff --git a/src/Session/SALOME_Session_Server.cxx b/src/Session/SALOME_Session_Server.cxx index efa9e7496..a577c47a3 100755 --- a/src/Session/SALOME_Session_Server.cxx +++ b/src/Session/SALOME_Session_Server.cxx @@ -271,26 +271,6 @@ int main( int argc, char **argv ) int result = -1; - InquireServersGUI splash; - bool isSplash = false; - - //SRN: Show a splash ASAP - if ( isFound( "SPLASH", argc, argv ) ) { - isSplash = true; - // create temporary resource manager just to load splash icon - SUIT_ResourceMgr resMgr( "SalomeApp", QString( "%1Config" ) ); - resMgr.setCurrentFormat( "xml" ); - resMgr.loadLanguage( "LightApp", "en" ); - - // create splash object: widget ( splash with progress bar ) and "pinging" thread - splash.setPixmap( resMgr.loadPixmap( "LightApp", QObject::tr( "ABOUT_SPLASH" ) ) ); - SUIT_Tools::centerWidget( &splash, _qappl.desktop() ); - - _qappl.setMainWidget( &splash ); - QObject::connect( &_qappl, SIGNAL( lastWindowClosed() ), &_qappl, SLOT( quit() ) ); - splash.show(); // display splash with running progress bar - } - CORBA::ORB_var orb; PortableServer::POA_var poa; @@ -372,8 +352,23 @@ int main( int argc, char **argv ) _ServerLaunch.wait( &_GUIMutex ); // to be reseased by Launch server thread when ready: // show splash screen if "SPLASH" parameter was passed ( default ) - if ( isSplash ) - { + + + if ( isFound( "SPLASH", argc, argv ) ) { + InquireServersGUI splash; + + // create temporary resource manager just to load splash icon + SUIT_ResourceMgr resMgr( "SalomeApp", QString( "%1Config" ) ); + resMgr.setCurrentFormat( "xml" ); + resMgr.loadLanguage( "LightApp", "en" ); + + // create splash object: widget ( splash with progress bar ) and "pinging" thread + splash.setPixmap( resMgr.loadPixmap( "LightApp", QObject::tr( "ABOUT_SPLASH" ) ) ); + SUIT_Tools::centerWidget( &splash, _qappl.desktop() ); + + _qappl.setMainWidget( &splash ); + QObject::connect( &_qappl, SIGNAL( lastWindowClosed() ), &_qappl, SLOT( quit() ) ); + splash.show(); // display splash with running progress bar _qappl.exec(); // wait untill splash closes ( progress runs till end or Cancel is pressed ) result = splash.getExitStatus(); // 1 is error } -- 2.39.2