From: nds Date: Wed, 14 Sep 2005 06:34:00 +0000 (+0000) Subject: *** empty log message *** X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=aa533aef8f6d629be578f042faebedbeb98da85f;p=modules%2Fgui.git *** empty log message *** --- diff --git a/src/LightApp/LightApp_Application.cxx b/src/LightApp/LightApp_Application.cxx index cab778f9c..317f8d1c3 100644 --- a/src/LightApp/LightApp_Application.cxx +++ b/src/LightApp/LightApp_Application.cxx @@ -114,12 +114,17 @@ myPrefs( 0 ) setDesktop( desk ); SUIT_ResourceMgr* aResMgr = SUIT_Session::session()->resourceMgr(); - QPixmap aLogo = aResMgr->loadPixmap( "LightApp", tr( "APP_DEFAULT_ICO" ), false ); + QPixmap aLogo = aResMgr->loadPixmap( "SalomeApp", tr( "APP_DEFAULT_ICO" ), false ); desktop()->setIcon( aLogo ); desktop()->setDockableMenuBar( true ); desktop()->setDockableStatusBar( false ); + // base logo (salome itself) + desktop()->addLogo( "_app_base", aResMgr->loadPixmap( "SalomeApp", tr( "APP_BASE_LOGO" ), false ) ); + // extra logo (salome-based application) + desktop()->addLogo( "_app_extra", aResMgr->loadPixmap( "SalomeApp", tr( "APP_EXTRA_LOGO" ), false ) ); + clearViewManagers(); mySelMgr = new LightApp_SelectionMgr( this ); @@ -152,7 +157,6 @@ myPrefs( 0 ) this, SLOT( onDesktopClosing( SUIT_Desktop*, QCloseEvent* ) ) ); connect( mySelMgr, SIGNAL( selectionChanged() ), this, SLOT( onSelection() ) ); - } /*!Destructor. @@ -205,30 +209,37 @@ QString LightApp_Application::applicationVersion() const if ( _app_version.isEmpty() ) { - QString path( ::getenv( "GUI_ROOT_DIR" ) ); - if ( !path.isEmpty() ) - path += QDir::separator(); - path += QString( "bin/salome/VERSION" ); - - QFile vf( path ); - if ( vf.open( IO_ReadOnly ) ) + QString resVersion = tr( "APP_VERSION" ); + if ( resVersion != "APP_VERSION" ) + { + _app_version = resVersion; + } + else { - QString line; - vf.readLine( line, 1024 ); - vf.close(); + QString path( ::getenv( "GUI_ROOT_DIR" ) ); + if ( !path.isEmpty() ) + path += QDir::separator(); + path += QString( "bin/salome/VERSION" ); - if ( !line.isEmpty() ) + QFile vf( path ); + if ( vf.open( IO_ReadOnly ) ) { - while ( !line.isEmpty() && line.at( line.length() - 1 ) == QChar( '\n' ) ) - line.remove( line.length() - 1, 1 ); - - int idx = line.findRev( ":" ); - if ( idx != -1 ) - _app_version = line.mid( idx + 1 ).stripWhiteSpace(); + QString line; + vf.readLine( line, 1024 ); + vf.close(); + + if ( !line.isEmpty() ) + { + while ( !line.isEmpty() && line.at( line.length() - 1 ) == QChar( '\n' ) ) + line.remove( line.length() - 1, 1 ); + + int idx = line.findRev( ":" ); + if ( idx != -1 ) + _app_version = line.mid( idx + 1 ).stripWhiteSpace(); + } } } } - return _app_version; } @@ -257,7 +268,7 @@ bool LightApp_Application::activateModule( const QString& modName ) if ( actName == modName ) return true; - putInfo( tr( "ACTIVATING_MODULE" ).arg( modName ) ); + putInfo( tr( "ACTIVATING_MODULE" ).arg( modName ) ); saveWindowsGeometry(); @@ -265,7 +276,7 @@ bool LightApp_Application::activateModule( const QString& modName ) updateModuleActions(); - putInfo( "" ); + putInfo( "" ); if ( !status ) return false;