}
+void SalomeApp_Application::updateDesktopTitle() {
+ QString aTitle = applicationName();
+ QString aVer = applicationVersion();
+ if ( !aVer.isEmpty() )
+ aTitle += QString( " " ) + aVer;
+
+ if ( activeStudy() )
+ {
+ QString sName = SUIT_Tools::file( activeStudy()->studyName().stripWhiteSpace(), false );
+ if ( !sName.isEmpty() ) {
+ SalomeApp_Study* study = dynamic_cast<SalomeApp_Study*>(activeStudy());
+ _PTR(Study) stdDS = study->studyDS();
+ if(stdDS) {
+ if ( stdDS->GetProperties()->IsLocked() ) {
+ aTitle += QString( " - [%1 (%2)]").arg( sName ).arg( tr( "STUDY_LOCKED" ) );
+ } else {
+ aTitle += QString( " - [%1]" ).arg( sName );
+ }
+ }
+ }
+ }
+
+ desktop()->setCaption( aTitle );
+}
+
void SalomeApp_Application::afterCloseDoc()
{
updateWindows();
SB->AbortCommand();
//study->updateCaptions();
+ updateDesktopTitle();
}
QString SalomeApp_Application::getFileName( bool open, const QString& initial, const QString& filters,
virtual void createPreferences( SalomeApp_Preferences* );
virtual void preferencesChanged( const QString&, const QString& );
+ virtual void updateDesktopTitle();
protected slots:
virtual void onDesktopActivated();
msgid "SalomeApp_Application::PYTHON_FILES_FILTER"
msgstr "PYTHON Files (*.py)"
+msgid "SalomeApp_Application::STUDY_LOCKED"
+msgstr "LOCKED"
+
//=======================================================================================
msgid "SalomeApp_ModuleDlg::CAPTION"