From: asl Date: Fri, 9 Dec 2005 14:05:14 +0000 (+0000) Subject: PAL10813 - new preferences "store positions of windows" X-Git-Tag: T_3_1_0pre~24 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=740f252d450f52d057a2c816484023887adc8180;p=modules%2Fgui.git PAL10813 - new preferences "store positions of windows" --- diff --git a/src/LightApp/LightApp_Application.cxx b/src/LightApp/LightApp_Application.cxx index f11a4f23e..24d546933 100644 --- a/src/LightApp/LightApp_Application.cxx +++ b/src/LightApp/LightApp_Application.cxx @@ -1456,6 +1456,7 @@ void LightApp_Application::createPreferences( LightApp_Preferences* pref ) int undoPref = pref->addPreference( tr( "PREF_UNDO_LEVEL" ), studyGroup, LightApp_Preferences::IntSpin, "Study", "undo_level" ); pref->setItemProperty( undoPref, "min", 1 ); pref->setItemProperty( undoPref, "max", 100 ); + pref->addPreference( tr( "PREF_STORE_POS" ), studyGroup, LightApp_Preferences::Bool, "Study", "store_positions" ); int extgroup = pref->addPreference( tr( "PREF_GROUP_EXT_BROWSER" ), genTab ); pref->setItemProperty( extgroup, "columns", 1 ); @@ -1669,6 +1670,12 @@ void LightApp_Application::preferencesChanged( const QString& sec, const QString } } + if( sec=="Study" ) + { + if( param=="store_positions" ) + updateWindows(); + } + if( sec=="PyConsole" ) { if( param=="font" ) @@ -1764,6 +1771,10 @@ void LightApp_Application::updateViewManagers() /*!Load windows geometry.*/ void LightApp_Application::loadWindowsGeometry() { + bool store = resourceMgr()->booleanValue( "Study", "store_positions", true ); + if( !store ) + return; + QtxDockAction* dockMgr = 0; QAction* a = action( ViewWindowsId ); @@ -1788,6 +1799,10 @@ void LightApp_Application::loadWindowsGeometry() /*!Save windows geometry.*/ void LightApp_Application::saveWindowsGeometry() { + bool store = resourceMgr()->booleanValue( "Study", "store_positions", true ); + if( !store ) + return; + QtxDockAction* dockMgr = 0; QAction* a = action( ViewWindowsId ); diff --git a/src/LightApp/resources/LightApp.xml b/src/LightApp/resources/LightApp.xml index beb65b8aa..2a4932e04 100644 --- a/src/LightApp/resources/LightApp.xml +++ b/src/LightApp/resources/LightApp.xml @@ -44,6 +44,9 @@ +
+ +
diff --git a/src/LightApp/resources/LightApp_msg_en.po b/src/LightApp/resources/LightApp_msg_en.po index b569c87ac..d8a4d4f86 100644 --- a/src/LightApp/resources/LightApp_msg_en.po +++ b/src/LightApp/resources/LightApp_msg_en.po @@ -120,6 +120,9 @@ msgstr "ASCII save" msgid "LightApp_Application::PREF_UNDO_LEVEL" msgstr "Undo level" +msgid "LightApp_Application::PREF_STORE_POS" +msgstr "Store positions of windows" + msgid "LightApp_Application::PREF_GROUP_EXT_BROWSER" msgstr "External browser" diff --git a/src/SalomeApp/resources/SalomeApp.xml b/src/SalomeApp/resources/SalomeApp.xml index 7f28000b8..98a9ce89b 100644 --- a/src/SalomeApp/resources/SalomeApp.xml +++ b/src/SalomeApp/resources/SalomeApp.xml @@ -53,6 +53,9 @@
+
+ +