From: mkr Date: Fri, 11 Apr 2008 13:51:51 +0000 (+0000) Subject: Add Use Salome Style check box into SALOME preferences. X-Git-Tag: V5_0_0~16 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=7d07f3c9f2e2c2934f17a675ea73295bccfb398e;p=modules%2Fgui.git Add Use Salome Style check box into SALOME preferences. --- diff --git a/src/LightApp/resources/LightApp.xml b/src/LightApp/resources/LightApp.xml index 73a095e36..9fe7a3b57 100644 --- a/src/LightApp/resources/LightApp.xml +++ b/src/LightApp/resources/LightApp.xml @@ -56,6 +56,10 @@ +
+ + +
diff --git a/src/LightApp/resources/LightApp_msg_en.po b/src/LightApp/resources/LightApp_msg_en.po index cd3cd7df3..e380b6869 100644 --- a/src/LightApp/resources/LightApp_msg_en.po +++ b/src/LightApp/resources/LightApp_msg_en.po @@ -162,6 +162,12 @@ msgstr "Python console properties" msgid "LightApp_Application::PREF_FONT" msgstr "Font" +msgid "LightApp_Application::PREF_GROUP_STYLE" +msgstr "Salome style" + +msgid "LightApp_Application::PREF_USE_SALOME_STYLE" +msgstr "Use Salome style" + msgid "LightApp_Application::PREF_TAB_OBJBROWSER" msgstr "Object browser" diff --git a/src/LightApp/resources/LightApp_msg_en.ts b/src/LightApp/resources/LightApp_msg_en.ts index e1cd37415..e9df1e199 100644 --- a/src/LightApp/resources/LightApp_msg_en.ts +++ b/src/LightApp/resources/LightApp_msg_en.ts @@ -157,6 +157,14 @@ CEA/DEN, CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITASPREF_GROUP_PY_CONSOLE Python console properties + + PREF_GROUP_STYLE + Salome style + + + PREF_USE_SALOME_STYLE + Use Salome style + PREF_MARKER_SIZE Marker size: diff --git a/src/SUITApp/SUITApp.cxx b/src/SUITApp/SUITApp.cxx index 7f29296a7..3e0f483d6 100644 --- a/src/SUITApp/SUITApp.cxx +++ b/src/SUITApp/SUITApp.cxx @@ -186,9 +186,9 @@ int main( int args, char* argv[] ) { SUITApp_Session* aSession = new SUITApp_Session( iniFormat ); QtxSplash* splash = 0; + SUIT_ResourceMgr* resMgr = aSession->createResourceMgr( argList.first() ); if ( !noSplash ) { - SUIT_ResourceMgr* resMgr = aSession->createResourceMgr( argList.first() ); if ( resMgr ) { resMgr->loadLanguage( false ); @@ -222,9 +222,12 @@ int main( int args, char* argv[] ) SUIT_Application* theApp = aSession->startApplication( argList.first() ); if ( theApp ) { - Style_Salome* aStyle = new Style_Salome(); - aStyle->getModel()->initFromResource( theApp->resourceMgr() ); - app.setStyle( aStyle ); + if ( resMgr && resMgr->booleanValue( "Style", "use_salome_style", true ) ) + { + Style_Salome* aStyle = new Style_Salome(); + aStyle->getModel()->initFromResource( theApp->resourceMgr() ); + app.setStyle( aStyle ); + } if ( !noExceptHandling ) app.setHandler( aSession->handler() ); diff --git a/src/SalomeApp/resources/SalomeApp.xml b/src/SalomeApp/resources/SalomeApp.xml index c85f4fd85..fe7e5a04d 100644 --- a/src/SalomeApp/resources/SalomeApp.xml +++ b/src/SalomeApp/resources/SalomeApp.xml @@ -73,7 +73,11 @@
-
+
+
+ + +
diff --git a/src/Session/SALOME_Session_Server.cxx b/src/Session/SALOME_Session_Server.cxx index 6d93c5098..322341418 100755 --- a/src/Session/SALOME_Session_Server.cxx +++ b/src/Session/SALOME_Session_Server.cxx @@ -622,9 +622,13 @@ int main( int argc, char **argv ) if ( aGUIApp ) { // Set SALOME style to the application - Style_Salome* aStyle = new Style_Salome(); - aStyle->getModel()->initFromResource( aGUIApp->resourceMgr() ); - _qappl.setStyle( aStyle ); + SUIT_ResourceMgr resMgr( "SalomeApp", QString( "%1Config" ) ); + if ( bool isSSUse = resMgr.booleanValue( "Style", "use_salome_style", true ) ) + { + Style_Salome* aStyle = new Style_Salome(); + aStyle->getModel()->initFromResource( aGUIApp->resourceMgr() ); + _qappl.setStyle( aStyle ); + } if ( !isFound( "noexcepthandler", argc, argv ) ) _qappl.setHandler( aGUISession->handler() ); // after loading SalomeApp application