From ad46ec26bfe01074b5219016b0d9d18873194005 Mon Sep 17 00:00:00 2001 From: vsr Date: Thu, 2 Feb 2012 11:58:23 +0000 Subject: [PATCH] Allow changing preferences via Session server CORBA interface, for instance as feedback from engone side. --- src/SalomeApp/SalomeApp_Application.cxx | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) 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] ); + } + } } /*! -- 2.39.2