From: vsr Date: Thu, 2 Feb 2012 11:58:23 +0000 (+0000) Subject: Allow changing preferences via Session server CORBA interface, for instance as feedba... X-Git-Tag: V6_5_0a1~64 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=ad46ec26bfe01074b5219016b0d9d18873194005;p=modules%2Fgui.git Allow changing preferences via Session server CORBA interface, for instance as feedback from engone side. --- diff --git a/src/SalomeApp/SalomeApp_Application.cxx b/src/SalomeApp/SalomeApp_Application.cxx index 151d84d31..361baba3b 100644 --- a/src/SalomeApp/SalomeApp_Application.cxx +++ b/src/SalomeApp/SalomeApp_Application.cxx @@ -1597,10 +1597,19 @@ bool SalomeApp_Application::checkDataObject(LightApp_DataObject* theObj) /*! Process standard messages from desktop */ void SalomeApp_Application::onDesktopMessage( const QString& message ) { - // update object browser if ( message.toLower() == "updateobjectbrowser" || - message.toLower() == "updateobjbrowser" ) + message.toLower() == "updateobjbrowser" ) { + // update object browser updateObjectBrowser(); + } + if ( message.toLower().startsWith( "preferences" ) ) { + // preferences changed: should be given as "preferences:
::", + // for example "preferences:Study:multi_file_dump:true" + QStringList data = message.split( ":" ); + if ( data.count() > 3 ) { + resourceMgr()->setValue( data[1], data[2], data[3] ); + } + } } /*!