</message>
<message>
<source>HOM_CASE_DIRECTORY_2</source>
- <translation>This directory is already used.</translation>
+ <translation>This directory is already used by the case </translation>
</message>
<message>
<source>HOM_CASE_DIRECTORY_3</source>
</message>
<message>
<source>HOM_CASE_DIRECTORY_2</source>
- <translation>Ce répertoire est déjà utilisé.</translation>
+ <translation>Ce répertoire est déjà utilisé par le cas </translation>
</message>
<message>
<source>HOM_CASE_DIRECTORY_3</source>
</message>
<message>
<source>HOM_CASE_DIRECTORY_2</source>
- <translation>This directory is already used.</translation>
+ <translation>This directory is already used by the case </translation>
</message>
<message>
<source>HOM_CASE_DIRECTORY_3</source>
QObject::tr("HOM_CASE_DIRECTORY_1") );
return false;
}
- if ((aDirName != _aDirName) and (myHomardGen->VerifieDir( aDirName.toStdString().c_str()) == false))
- {
- QMessageBox::critical( 0, QObject::tr("HOM_ERROR"),
- QObject::tr("HOM_CASE_DIRECTORY_2") );
- return false;
+
+ if ( aDirName != _aDirName)
+ { QString CaseNameDir = myHomardGen->VerifieDir( aDirName.toStdString().c_str()) ;
+ if ( CaseNameDir != "" )
+ {
+ INFOS(CaseNameDir.toStdString().c_str());
+ QString texte ;
+ texte = QObject::tr("HOM_CASE_DIRECTORY_2") + CaseNameDir ;
+ QMessageBox::critical( 0, QObject::tr("HOM_ERROR"),
+ texte );
+ return false;
+ }
}
if (chdir(aDirName.toStdString().c_str()) != 0)
{
QObject::tr("HOM_CASE_DIRECTORY_4") );
return false;
}
- if ((aDirName != _aDirName) and (myHomardGen->VerifieDir( aDirName.toStdString().c_str()) == false))
- {
- QMessageBox::critical( 0, QObject::tr("HOM_ERROR"),
- QObject::tr("HOM_CASE_DIRECTORY_2") );
- return false;
+ if ( aDirName != _aDirName)
+ { QString CaseNameDir = myHomardGen->VerifieDir( aDirName.toStdString().c_str()) ;
+ if ( CaseNameDir != "" )
+ {
+ INFOS(CaseNameDir.toStdString().c_str());
+ QString texte ;
+ texte = QObject::tr("HOM_CASE_DIRECTORY_2") + CaseNameDir ;
+ QMessageBox::critical( 0, QObject::tr("HOM_ERROR"),
+ texte );
+ return false;
+ }
}
if (chdir(aDirName.toStdString().c_str()) != 0)
{
QObject::tr("HOM_CASE_DIRECTORY_1") );
return false;
}
- if ((aDirName != _aDirName) and (myHomardGen->VerifieDir( aDirName.toStdString().c_str()) == false))
- {
- QMessageBox::critical( 0, QObject::tr("HOM_ERROR"),
- QObject::tr("HOM_CASE_DIRECTORY_2") );
- return false;
+ if ( aDirName != _aDirName)
+ { QString CaseNameDir = myHomardGen->VerifieDir( aDirName.toStdString().c_str()) ;
+ if ( CaseNameDir != "" )
+ {
+ INFOS(CaseNameDir.toStdString().c_str());
+ QString texte ;
+ texte = QObject::tr("HOM_CASE_DIRECTORY_2") + CaseNameDir ;
+ QMessageBox::critical( 0, QObject::tr("HOM_ERROR"),
+ texte );
+ return false;
+ }
}
if (chdir(aDirName.toStdString().c_str()) != 0)
{
QObject::tr("HOM_CASE_DIRECTORY_1") );
return false;
}
- if ((aDirName != _aDirName) and (myHomardGen->VerifieDir( aDirName.toStdString().c_str()) == false))
- {
- QMessageBox::critical( 0, QObject::tr("HOM_ERROR"),
- QObject::tr("HOM_CASE_DIRECTORY_2") );
- return false;
+ if ( aDirName != _aDirName)
+ { QString CaseNameDir = myHomardGen->VerifieDir( aDirName.toStdString().c_str()) ;
+ if ( CaseNameDir != "" )
+ {
+ INFOS(CaseNameDir.toStdString().c_str());
+ QString texte ;
+ texte = QObject::tr("HOM_CASE_DIRECTORY_2") + CaseNameDir ;
+ QMessageBox::critical( 0, QObject::tr("HOM_ERROR"),
+ texte );
+ return false;
+ }
}
if (chdir(aDirName.toStdString().c_str()) != 0)
{
}
//=============================================================================
-CORBA::Boolean HOMARD_Gen_i::VerifieDir(const char* nomDir)
+char* HOMARD_Gen_i::VerifieDir(const char* nomDir)
{
+ std::string casename = std::string("") ;
std::map<std::string, HOMARD::HOMARD_Cas_var>::const_iterator it;
for (it = myContextMap[GetCurrentStudyID()]._mesCas.begin();
it != myContextMap[GetCurrentStudyID()]._mesCas.end(); it++)
{
- if (std::string(nomDir) == std::string(it->second->GetDirName())) return false;
+ if (std::string(nomDir) == std::string(it->second->GetDirName()))
+ {
+ casename = std::string(it->second->GetName()) ;
+ break ;
+ }
}
- return true;
+ return CORBA::string_dup( casename.c_str() );
}
/*//=============================================================================
void SALOMEException( std::string message )
void DriverTexteBoundary(HOMARD::HOMARD_Cas_var myCase, HomardDriver* myDriver);
void DriverTexteFieldInterp(HOMARD::HOMARD_Iteration_var myIteration, HOMARD::HOMARD_Hypothesis_var myHypo, HomardDriver* myDriver);
- CORBA::Boolean VerifieDir(const char* nomDir);
+ char* VerifieDir(const char* nomDir);
void PublishFileUnderIteration(const char* NomIter, const char* NomFich, const char* Commentaire);
void PublishFileUnderYACS(const char* NomYACS, const char* NomFich, const char* Commentaire);