From: nri Date: Thu, 5 Jun 2003 14:39:26 +0000 (+0000) Subject: NRI : Add message (GUI lib not found). X-Git-Tag: V1_4_0~82 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=168f12f5abfd8964f863abbb13012b20a900648d;p=modules%2Fkernel.git NRI : Add message (GUI lib not found). --- diff --git a/src/SALOMEGUI/QAD_Desktop.cxx b/src/SALOMEGUI/QAD_Desktop.cxx index 1f1120c3f..a53dca619 100644 --- a/src/SALOMEGUI/QAD_Desktop.cxx +++ b/src/SALOMEGUI/QAD_Desktop.cxx @@ -249,9 +249,9 @@ myQueryClose( true ) QString modulename = strdup(list_composants[ind].modulename) ; QString moduleusername = strdup(list_composants[ind].moduleusername) ; - MESSAGE ( " MODULE = " << modulename ) - MESSAGE ( " MODULE icon = " << iconfile ) - MESSAGE ( " MODULE username = " << moduleusername ) + // MESSAGE ( " MODULE = " << modulename ) + // MESSAGE ( " MODULE icon = " << iconfile ) + // MESSAGE ( " MODULE username = " << moduleusername ) if ( mapComponentName.contains( moduleusername ) ) { QMessageBox::warning( this, tr("WRN_WARNING"), QString( moduleusername + " is already associated with " + mapComponentName[moduleusername] + ".\nPlease, change the component username of " + modulename) , tr ("BUT_OK") ); @@ -2314,8 +2314,9 @@ bool QAD_Desktop::loadComponent(QString Component) QString dir; if ( libs = getenv("LD_LIBRARY_PATH")) { - MESSAGE ( " LD_LIBRARY_PATH : " << libs ) + // MESSAGE ( " LD_LIBRARY_PATH : " << libs ) QStringList dirList = QStringList::split( SEPARATOR, libs, false ); // skip empty entries + bool found = false; for ( int i = dirList.count()-1; i >= 0; i-- ) { dir = dirList[ i ]; #ifdef WNT @@ -2326,51 +2327,19 @@ bool QAD_Desktop::loadComponent(QString Component) fileInfo.setFile(fileString) ; if (fileInfo.exists()) { - MESSAGE ( " GUI library = " << fileString ) + // MESSAGE ( " GUI library = " << fileString ) ComponentLib = fileInfo.fileName() ; + found = true; break; } } - MESSAGE ( " GUI library not found " ) - } -// bool found = false; -// if ( dir = getenv("SALOME_SITE_DIR")) { -// dir = QAD_Tools::addSlash(dir) ; -// dir = dir + "lib" ; -// dir = QAD_Tools::addSlash(dir) ; -// dir = dir + "salome" ; -// dir = QAD_Tools::addSlash(dir) ; -// #ifdef WNT -// dir = dir + "lib" + Component.latin1() + "GUI.dll" ; -// #else -// dir = dir + "lib" + Component.latin1() + "GUI.so" ; -// #endif -// MESSAGE ( " GUI library = " << dir ) -// fileInfo.setFile(dir) ; -// if (fileInfo.exists()) { -// ComponentLib = fileInfo.fileName() ; -// found = true; -// } -// } - -// if ( (dir = getenv("SALOME_ROOT_DIR")) && !found ) { -// dir = QAD_Tools::addSlash(dir) ; -// dir = dir + "lib" ; -// dir = QAD_Tools::addSlash(dir) ; -// dir = dir + "salome" ; -// dir = QAD_Tools::addSlash(dir) ; -// #ifdef WNT -// dir = dir + "lib" + Component.latin1() + "GUI.dll" ; -// #else -// dir = dir + "lib" + Component.latin1() + "GUI.so" ; -// #endif -// MESSAGE ( " GUI library = " << dir ) -// fileInfo.setFile(dir) ; -// if (fileInfo.exists()) { -// ComponentLib = fileInfo.fileName() ; -// found = true; -// } -// } + if ( !found ) { + QMessageBox::critical( this, + tr("ERR_ERROR"), + tr("ERR_LIBGUI" ).arg(Component) ); + return false; + } + } mySharedLibrary.SetName(TCollection_AsciiString((char*)ComponentLib.latin1()).ToCString()); ok = mySharedLibrary.DlOpen(OSD_RTLD_LAZY); diff --git a/src/SALOMEGUI/QAD_msg_en.po b/src/SALOMEGUI/QAD_msg_en.po index 55fab2465..c15207e21 100644 --- a/src/SALOMEGUI/QAD_msg_en.po +++ b/src/SALOMEGUI/QAD_msg_en.po @@ -473,6 +473,10 @@ msgstr "An exception has been caught. Click to continue." msgid "ERR_ONLY_PLOT2D_VIEWER" msgstr "This function is available only in Plot2d viewer" +#: QAD_Desktop.cxx:2339 +msgid "ERR_LIBGUI" +msgstr "lib%1.so has not been found. Check LD_LIBRARY_PATH environment variable" + #--------------- # QUESTION #--------------- diff --git a/src/SALOMEGUI/QAD_msg_fr.po b/src/SALOMEGUI/QAD_msg_fr.po index 83dad7cdc..d0ff4b80f 100644 --- a/src/SALOMEGUI/QAD_msg_fr.po +++ b/src/SALOMEGUI/QAD_msg_fr.po @@ -447,6 +447,11 @@ msgstr "L' msgid "ERR_ERROR" msgstr "Erreur" + +#: QAD_Desktop.cxx:2339 +msgid "ERR_LIBGUI" +msgstr "La lib%1.so n'a pas été trouvée. Verifier la variable d'environnement LD_LIBRARY_PATH" + #--------------- # QUESTION #---------------