]> SALOME platform Git repositories - modules/gui.git/commitdiff
Salome HOME
various changes - development. OCC_visual_parameters_2006
authorasv <asv@opencascade.com>
Tue, 7 Mar 2006 09:33:01 +0000 (09:33 +0000)
committerasv <asv@opencascade.com>
Tue, 7 Mar 2006 09:33:01 +0000 (09:33 +0000)
src/SalomeApp/SalomeApp_Application.cxx
src/SalomeApp/SalomeApp_Application.h
src/SalomeApp/SalomeApp_DataModel.cxx
src/SalomeApp/SalomeApp_DataModel.h
src/SalomeApp/SalomeApp_DataObject.cxx
src/SalomeApp/SalomeApp_DataObject.h
src/SalomeApp/SalomeApp_Study.cxx
src/SalomeApp/SalomeApp_VisualState.cxx
src/SalomeApp/resources/SalomeApp_msg_en.po

index 3e605fe86bb4df7c77763c343977af0bdfe64a08..bf672b8d8beb072dc20421d927cb0457e8c89283 100644 (file)
@@ -19,6 +19,7 @@
 #include "LightApp_Preferences.h"
 #include "LightApp_WidgetContainer.h"
 #include "LightApp_SelectionMgr.h"
+#include "LightApp_NameDlg.h"
 
 #include "STD_LoadStudiesDlg.h"
 
@@ -102,6 +103,11 @@ void SalomeApp_Application::createActions()
 
   SUIT_Desktop* desk = desktop();
   
+  //! Save GUI state
+  createAction( SaveGUIStateId, tr( "TOT_DESK_FILE_SAVE_GUI_STATE" ), QIconSet(),
+               tr( "MEN_DESK_FILE_SAVE_GUI_STATE" ), tr( "PRP_DESK_FILE_SAVE_GUI_STATE" ),
+               0, desk, false, this, SLOT( onSaveGUIState() ) );
+
   //! Dump study
   createAction( DumpStudyId, tr( "TOT_DESK_FILE_DUMP_STUDY" ), QIconSet(),
                tr( "MEN_DESK_FILE_DUMP_STUDY" ), tr( "PRP_DESK_FILE_DUMP_STUDY" ),
@@ -129,6 +135,7 @@ void SalomeApp_Application::createActions()
 
   int fileMenu = createMenu( tr( "MEN_DESK_FILE" ), -1 );
 
+  createMenu( SaveGUIStateId, fileMenu, 10, -1 );
   createMenu( DumpStudyId, fileMenu, 10, -1 );
   createMenu( separator(), fileMenu, -1, 15, -1 );
   createMenu( LoadScriptId, fileMenu, 10, -1 );
@@ -462,10 +469,16 @@ void SalomeApp_Application::updateCommandsStatus()
   if ( a )
     a->setEnabled( activeStudy() );
 
+  // Properties menu
   a = action( PropertiesId );
   if( a )
     a->setEnabled( activeStudy() );
 
+  // Save GUI state menu
+  a = action( SaveGUIStateId );
+  if( a )
+    a->setEnabled( activeStudy() );
+
   // update state of Copy/Paste menu items
   onSelectionChanged();
 }
@@ -564,6 +577,16 @@ void SalomeApp_Application::onLoadScript( )
   }
 }
 
+/*!Private SLOT. On save GUI state.*/
+void SalomeApp_Application::onSaveGUIState()
+{
+  SalomeApp_Study* appStudy = dynamic_cast<SalomeApp_Study*>( activeStudy() );
+  if ( !appStudy ) return;
+
+  SalomeApp_VisualState( this ).storeState();
+  updateObjectBrowser( false );
+}
+
 /*!Gets file filter.
  *\retval QString "(*.hdf)"
  */
@@ -735,6 +758,15 @@ void SalomeApp_Application::contextMenuPopup( const QString& type, QPopupMenu* t
   LightApp_SelectionMgr* mgr = selectionMgr();
   mgr->selectedObjects( aList, QString::null, false );
 
+  // add GUI state commands: restore, rename
+  if ( aList.Extent() == 1 && aList.First()->hasEntry() && 
+       QString( aList.First()->getEntry() ).startsWith( tr( "SAVE_POINT_DEF_NAME" ) ) ) {
+    thePopup->insertSeparator();
+    thePopup->insertItem( tr( "MEN_RESTORE_VS" ), this, SLOT( onRestoreGUIState() ) );
+    thePopup->insertItem( tr( "MEN_RENAME_VS" ),  this, SLOT( onRenameGUIState() ) );
+    thePopup->insertItem( tr( "MEN_DELETE_VS" ),  this, SLOT( onDeleteGUIState() ) );
+  }
+
   // "Delete reference" item should appear only for invalid references
 
   // isInvalidRefs will be true, if at least one of selected objects is invalid reference
@@ -769,6 +801,10 @@ void SalomeApp_Application::contextMenuPopup( const QString& type, QPopupMenu* t
   if (aList.Extent() != 1)
     return;
   Handle(SALOME_InteractiveObject) aIObj = aList.First();
+  // check if item is a "GUI state" item (also a first level object)
+  QString entry( aIObj->getEntry() );
+  if ( entry.startsWith( tr( "SAVE_POINT_DEF_NAME" ) ) )
+    return;
   QString aModuleName(aIObj->getComponentDataType());
   QString aModuleTitle = moduleTitle(aModuleName);
   CAM_Module* currentModule = activeModule();
@@ -777,10 +813,63 @@ void SalomeApp_Application::contextMenuPopup( const QString& type, QPopupMenu* t
   thePopup->insertItem( tr( "MEN_OPENWITH" ), this, SLOT( onOpenWith() ) );
 }
 
+/*! updateSavePointDataObjects: syncronize data objects that correspond to save points (gui states)*/
+void updateSavePointDataObjects( OB_Browser* ob, SalomeApp_Study* study )
+{
+  if ( !study || !ob )
+    return;
+
+  // find GUI states root object
+  SUIT_DataObject* guiRootObj = 0;
+  DataObjectList ch; 
+  study->root()->children( ch ); 
+  DataObjectList::const_iterator it = ch.begin(), last = ch.end();
+  for ( ; it != last ; ++it ) {
+    if ( dynamic_cast<SalomeApp_SavePointRootObject*>( *it ) )
+      guiRootObj = *it;
+  }
+  std::vector<int> savePoints = study->getSavePoints();
+  // case 1: no more save points but they existed in study's tree
+  if ( savePoints.empty() && guiRootObj ) {
+    delete guiRootObj;
+    return;
+  }
+  // case 2: no more save points but root does not exist either
+  if ( savePoints.empty() && !guiRootObj )
+    return;
+  // case 3: save points but no root for them - create it
+  if ( !savePoints.empty() && !guiRootObj )
+    guiRootObj = new SalomeApp_SavePointRootObject( study->root() );
+  // case 4: everything already exists..  nothing to do..
+
+  // store data objects in a map id-to-DataObject
+  QMap<int,SalomeApp_SavePointObject*> mapDO;
+  ch.clear(); 
+  guiRootObj->children( ch ); 
+  for( it = ch.begin(), last = ch.end(); it != last ; ++it ) {
+    SalomeApp_SavePointObject* dobj = dynamic_cast<SalomeApp_SavePointObject*>( *it );
+    if ( dobj )
+      mapDO[dobj->getId()] = dobj;
+  }
+
+  // iterate new save points.  if DataObject with such ID not found in map - create DataObject
+  // if in the map - remove it from map.  
+  for ( int i = 0; i < savePoints.size(); i++ )
+    if ( !mapDO.contains( savePoints[i] ) )
+      new SalomeApp_SavePointObject( guiRootObj, savePoints[i], study );
+    else {
+      ob->updateTree( mapDO[ savePoints[i] ] );
+      mapDO.remove( savePoints[i] );
+    }
+  // delete DataObjects that are still in the map -- their IDs were not found in data model
+  for ( QMap<int,SalomeApp_SavePointObject*>::Iterator it = mapDO.begin(); it != mapDO.end(); ++it )
+    delete it.data();
+}
+
 /*!Update obect browser:
  1.if 'updateModels' true, update existing data models;
  2. update "non-existing" (not loaded yet) data models;
- 3. update object browser if it existing */
+ 3. update object browser if it exists */
 void SalomeApp_Application::updateObjectBrowser( const bool updateModels )
 {
   // update "non-existing" (not loaded yet) data models
@@ -795,7 +884,7 @@ void SalomeApp_Application::updateObjectBrowser( const bool updateModels )
        _PTR(SComponent) aComponent ( it->Value() );
 
        if ( aComponent->ComponentDataType() == "Interface Applicative" )
-         continue; // skip the magic "Interface Applicative" component
+         continue; 
 
        OB_Browser* ob = static_cast<OB_Browser*>( getWindow( WT_ObjectBrowser ));
        const bool isAutoUpdate = ob->isAutoUpdate();
@@ -805,16 +894,15 @@ void SalomeApp_Application::updateObjectBrowser( const bool updateModels )
         //SalomeApp_DataModel::BuildTree( aComponent, study->root(), study, /*skipExisitng=*/true );
       }
     }
+    // create data objects that correspond to GUI state save points
+    ::updateSavePointDataObjects( objectBrowser(), study );
   }
-
   // update existing data models (already loaded SComponents)
   LightApp_Application::updateObjectBrowser( updateModels );
 
-/*  if ( objectBrowser() )
-  {
-    objectBrowser()->updateGeometry();
-    objectBrowser()->updateTree();
-  }*/
+  // -- debug -- 
+  //  if ( study && study->root() )
+  //    study->root()->dump();
 }
 
 /*!Display Catalog Genenerator dialog */
@@ -881,3 +969,68 @@ SUIT_ViewManager* SalomeApp_Application::newViewManager(const QString& type)
 {
   return createViewManager(type);
 }
+
+
+/*!Global utility funciton, returns selected GUI Save point object's ID */
+int getSelectedSavePoint( const LightApp_SelectionMgr* selMgr )
+{
+  SALOME_ListIO aList;
+  selMgr->selectedObjects( aList );
+  Handle(SALOME_InteractiveObject) aIObj = aList.First();
+  QString entry( aIObj->getEntry() );
+  QString startStr = QObject::tr( "SAVE_POINT_DEF_NAME" );
+  if ( !entry.startsWith( startStr ) ) // it's a "GUI state" object
+    return -1;
+  bool ok; // conversion to integer is ok?
+  int savePoint = entry.right( entry.length() - startStr.length() ).toInt( &ok );
+  return ok ? savePoint : -1;
+}
+
+/*!Called on Restore GUI State popup command*/
+void SalomeApp_Application::onRestoreGUIState()
+{
+  int savePoint = ::getSelectedSavePoint( selectionMgr() );
+  if ( savePoint == -1 ) 
+    return;  
+  SalomeApp_VisualState( this ).restoreState( savePoint );
+}
+
+/*!Called on Rename GUI State popup command*/
+void SalomeApp_Application::onRenameGUIState()
+{
+  int savePoint = ::getSelectedSavePoint( selectionMgr() );
+  if ( savePoint == -1 ) 
+    return;  
+  SalomeApp_Study* study = dynamic_cast<SalomeApp_Study*>( activeStudy() );
+  if ( !study ) 
+    return;
+
+  QString newName = LightApp_NameDlg::getName( desktop(), study->getNameOfSavePoint( savePoint ) );
+  if ( !newName.isNull() && !newName.isEmpty() ) {
+    study->setNameOfSavePoint( savePoint, newName );
+    updateSavePointDataObjects( objectBrowser(), study );
+  }
+}
+
+
+/*!Called on Delete GUI State popup command*/
+void SalomeApp_Application::onDeleteGUIState()
+{
+  int savePoint = ::getSelectedSavePoint( selectionMgr() );
+  if ( savePoint == -1 ) 
+    return;  
+  SalomeApp_Study* study = dynamic_cast<SalomeApp_Study*>( activeStudy() );
+  if ( !study ) 
+    return;
+  
+  study->removeSavePoint( savePoint );
+  updateSavePointDataObjects( objectBrowser(), study );
+}
+
+/*!Called on Save study operation*/
+void SalomeApp_Application::onStudySaved( SUIT_Study* study )
+{
+  updateObjectBrowser( false );
+  LightApp_Application::onStudySaved( study );
+}
+
index 45edd95d855547ace66369af10d50ba420c88a28..1ea58679eb6a245d0f959b8ec1e339e9f2ad19d1 100644 (file)
@@ -46,7 +46,7 @@ class SALOMEAPP_EXPORT SalomeApp_Application : public LightApp_Application
 
 public:
   enum { DumpStudyId = LightApp_Application::UserID, LoadScriptId, PropertiesId,
-         CatalogGenId, RegDisplayId, UserID };
+         CatalogGenId, RegDisplayId, SaveGUIStateId, UserID };
 
 public:
   SalomeApp_Application();
@@ -75,6 +75,9 @@ public slots:
   virtual void                        onCopy();
   virtual void                        onPaste();
 
+protected slots:
+  void                                onStudySaved( SUIT_Study* );
+
 protected:
   virtual void                        createActions();
   virtual SUIT_Study*                 createNewStudy();
@@ -92,10 +95,14 @@ private slots:
   void                                onProperties();
   void                                onDumpStudy();
   void                                onLoadScript(); 
+  void                                onSaveGUIState(); 
+  void                                onDeleteGUIState(); 
 
   void                                onCatalogGen();
   void                                onRegDisplay();
   void                                onOpenWith();
+  void                                onRestoreGUIState();
+  void                                onRenameGUIState();
 };
 
 #ifdef WIN32
index 5fcae7b7b2651a3cdfa44c522d8205d5499347cc..b31708a57bc870ad7b6d4efc530dfaa159387678 100644 (file)
@@ -285,31 +285,7 @@ SUIT_DataObject* SalomeApp_DataModel::synchronize( const _PTR( SComponent )& sob
 
   SalomeApp_DataModelSync sync( study->studyDS(), study->root() );
 
-  //  QString srcName = sobj ? sobj->GetName().c_str() : "";
-  //  QString trgName = ( suitObj && !suitObj->name().isNull() ) ? suitObj->name() : "";
-  //  printf( "--- SalomeApp_DataModel::syncronize() calls synchronize()_1: src = %s, trg = %s ---\n",  srcName.latin1(), trgName.latin1() );
-
-  SUIT_DataObject* o = ::synchronize<kerPtr,suitPtr,SalomeApp_DataModelSync>( sobj, suitObj, sync );
-//  showTree( o );
-  return o;
-}
-
-//================================================================
-// Function : synchronize
-/*! Purpose  : synchronizes kernel tree and suit data tree starting from 'sobj' and 'obj' correspondly */
-//================================================================
-SUIT_DataObject* SalomeApp_DataModel::synchronize( const _PTR( SObject )& sobj, SUIT_DataObject* obj,
-                                                  SalomeApp_Study* study )
-{
-  if( !study )
-    return 0;
-  SalomeApp_DataModelSync sync( study->studyDS(), study->root() );
-
-  //  QString srcName = sobj ? sobj->GetName().c_str() : "";
-  //  QString trgName = ( obj && !obj->name().isNull() ) ? obj->name() : "";
-  //  printf( "--- SalomeApp_DataModel::syncronize() calls synchronize()_2: src = s, trg = %s ---\n",  srcName.latin1(), trgName.latin1() );
-
-  return ::synchronize<kerPtr,suitPtr,SalomeApp_DataModelSync>( sobj, obj, sync );
+  return ::synchronize<kerPtr,suitPtr,SalomeApp_DataModelSync>( sobj, suitObj, sync );
 }
 
 //================================================================
index 62e649bc36ad4abd1213390716e5a89e688d9836..7452cd366c19abe5ef371687a57ea87bb8b501f9 100644 (file)
@@ -27,10 +27,9 @@ class SALOMEAPP_EXPORT SalomeApp_DataModel : public LightApp_DataModel
 
 public:
   static SUIT_DataObject*             synchronize( const _PTR( SComponent )&, SalomeApp_Study* );
-  static SUIT_DataObject*             synchronize( const _PTR( SObject )&, SUIT_DataObject*, SalomeApp_Study* );
 
-                                      SalomeApp_DataModel ( CAM_Module* theModule );
-  virtual                             ~SalomeApp_DataModel();
+  SalomeApp_DataModel ( CAM_Module* theModule );
+  virtual ~SalomeApp_DataModel();
 
   virtual bool                        open( const QString&, CAM_Study*, QStringList );
   virtual bool                        create( CAM_Study* );
index ef7b8df7b6289f991b54d3395ffeae683f85dc59..5bb857865100a6368ff0f3a9f4a8ec24170ba30e 100644 (file)
@@ -21,6 +21,8 @@
 #include "SalomeApp_Study.h"
 #include "LightApp_RootObject.h"
 
+#include <CAM_DataObject.h>
+
 #include <SUIT_Application.h>
 #include <SUIT_ResourceMgr.h>
 #include <SUIT_DataObjectKey.h>
@@ -371,3 +373,50 @@ QString SalomeApp_ModuleObject::name() const
   return SalomeApp_DataObject::name();
 }
 
+/*
+       Class: SalomeApp_SavePointObject
+       Level: Public
+*/
+
+/*!Constructor.Initialize by \a parent.*/
+SalomeApp_SavePointObject::SalomeApp_SavePointObject( SUIT_DataObject* _parent, const int id, SalomeApp_Study* study )
+  : LightApp_DataObject( _parent ), CAM_DataObject( _parent ), // IMPORTANT TO CALL ALL VIRTUAL CONSTRUCTORS!
+    myId( id ),
+    myStudy( study )
+{
+}
+
+/*!Destructor. Do nothing.*/
+SalomeApp_SavePointObject::~SalomeApp_SavePointObject()
+{
+}
+
+/*!Returns save points ID */
+int SalomeApp_SavePointObject::getId() const
+{
+  return myId;
+}
+
+/*!Returns "invalid" entry, which does not correspond to any object in data structure
+  but indicates that it is a save point object  */
+QString SalomeApp_SavePointObject::entry() const
+{
+  return QObject::tr( "SAVE_POINT_DEF_NAME" ) + QString::number( myId );
+}
+
+/*!Returns displayed name of object */
+QString SalomeApp_SavePointObject::name() const
+{
+  return myStudy->getNameOfSavePoint( myId );
+}
+
+QPixmap SalomeApp_SavePointObject::icon() const
+{
+  return QPixmap();
+}
+
+QString SalomeApp_SavePointObject::toolTip() const
+{
+  return QObject::tr( "SAVE_POINT_OBJECT_TOOLTIP" ).arg( name() );
+}
+
index 15a1d96bfdb99bfcb5125695625feb8d29e2b37e..33cf78d67b370f5cd1e1747d2fbd0c023b99ae9b 100644 (file)
@@ -82,7 +82,45 @@ public:
   SalomeApp_ModuleObject( CAM_DataModel*, const _PTR(SObject)&, SUIT_DataObject* = 0 );
   virtual ~SalomeApp_ModuleObject();
 
-  virtual QString        name() const;
+  virtual QString                 name() const;
+};
+
+/*!
+ * SalomeApp_SavePointObject - class that represents persistent visual_state object
+ * these objects are stored in data model, but NOT in SObjects structure, so we
+ * must handle them separately using this special class for them
+ */
+
+class SALOMEAPP_EXPORT SalomeApp_SavePointObject : public virtual LightApp_DataObject
+{
+public:
+  SalomeApp_SavePointObject( SUIT_DataObject* parent, const int, SalomeApp_Study* study );
+  virtual ~SalomeApp_SavePointObject();
+  
+  virtual QString                 entry() const;
+
+  virtual QString                 name() const;
+  virtual QPixmap                 icon() const;
+  virtual QString                 toolTip() const;
+
+  int                             getId() const;
+
+private:
+  int                             myId;
+  SalomeApp_Study*                myStudy;
+};
+
+/*!
+ * SalomeApp_SavePointRootObject - class that represents parent object for visual_state objects
+ */
+
+class SALOMEAPP_EXPORT SalomeApp_SavePointRootObject : public SUIT_DataObject
+{
+public:
+  SalomeApp_SavePointRootObject( SUIT_DataObject* parent ) : SUIT_DataObject( parent ) {}
+  
+  virtual QString                 name() const   { return QObject::tr( "SAVE_POINT_ROOT_NAME" ); }
+  virtual QString                 toolTip() const{ return QObject::tr( "SAVE_POINT_ROOT_TOOLTIP" ); }
 };
 
 #endif
index 667654e83587ef709255303f4e765972673e3907..3a41ac01a8d2a16f9333ef55ae886d03b9846caf 100644 (file)
@@ -141,10 +141,12 @@ bool SalomeApp_Study::openDocument( const QString& theFileName )
   emit opened( this );
   study->IsSaved(true);
 
-  std::vector<int> savePoints = getSavePoints();
-  if ( savePoints.size() > 0 ) //############### VISUAL PARAMETERS
-    SalomeApp_VisualState( (SalomeApp_Application*)application() ).restoreState( savePoints[savePoints.size()-1] );
-
+  bool restore = application()->resourceMgr()->booleanValue( "Study", "store_visual_state", true );
+  if ( restore ) {
+    std::vector<int> savePoints = getSavePoints();
+    if ( savePoints.size() > 0 )
+      SalomeApp_VisualState( (SalomeApp_Application*)application() ).restoreState( savePoints[savePoints.size()-1] );
+  }
 
   return res;
 }
@@ -183,6 +185,13 @@ bool SalomeApp_Study::loadDocument( const QString& theStudyName )
   bool res = CAM_Study::openDocument( theStudyName );
   emit opened( this );
 
+  bool restore = application()->resourceMgr()->booleanValue( "Study", "store_visual_state", true );
+  if ( restore ) {
+    std::vector<int> savePoints = getSavePoints();
+    if ( savePoints.size() > 0 )
+      SalomeApp_VisualState( (SalomeApp_Application*)application() ).restoreState( savePoints[savePoints.size()-1] );
+  }
+
   //SRN: BugID IPAL9021: End
 
   return res;
@@ -194,8 +203,9 @@ bool SalomeApp_Study::loadDocument( const QString& theStudyName )
 //=======================================================================
 bool SalomeApp_Study::saveDocumentAs( const QString& theFileName )
 {
-  //############### VISUAL PARAMETERS
-  SalomeApp_VisualState( (SalomeApp_Application*)application() ).storeState();
+  bool store = application()->resourceMgr()->booleanValue( "Study", "store_visual_state", true );
+  if ( store )
+    SalomeApp_VisualState( (SalomeApp_Application*)application() ).storeState();
   
   ModelList list; dataModels( list );
 
@@ -233,8 +243,9 @@ bool SalomeApp_Study::saveDocumentAs( const QString& theFileName )
 //=======================================================================
 bool SalomeApp_Study::saveDocument()
 {
-  //############### VISUAL PARAMETERS
-  SalomeApp_VisualState( (SalomeApp_Application*)application() ).storeState();
+  bool store = application()->resourceMgr()->booleanValue( "Study", "store_visual_state", true );
+  if ( store )
+    SalomeApp_VisualState( (SalomeApp_Application*)application() ).storeState();
 
   ModelList list; dataModels( list );
 
index cdb521e2dc6c512d2beb3a6ba555f92c46f6b4e6..ff00dbc889bdc68194eba3939eb06acd358ad74f 100644 (file)
@@ -96,10 +96,6 @@ void nameViewWindows( const ViewManagerList& lst )
 //================================================================
 int SalomeApp_VisualState::storeState()
 {
-  bool store = myApp->resourceMgr()->booleanValue( "Study", "store_visual_state", true );
-  if ( !store )
-    return -1;
-
   SalomeApp_Study* study = dynamic_cast<SalomeApp_Study*>( myApp->activeStudy() );
   if ( !study )
     return -1;
@@ -166,6 +162,9 @@ int SalomeApp_VisualState::storeState()
       sModule->storeVisualParameters( savePoint );
     }
   }
+
+  // set default name of new savePoint
+  study->setNameOfSavePoint( savePoint, QObject::tr( "SAVE_POINT_DEF_NAME" ) + QString::number( savePoint ) );
   
   return savePoint;
 }
@@ -177,10 +176,6 @@ int SalomeApp_VisualState::storeState()
 //================================================================
 void SalomeApp_VisualState::restoreState(int savePoint)
 {
-  bool store = myApp->resourceMgr()->booleanValue( "Study", "store_visual_state", true );
-  if ( !store )
-    return;
-
   SalomeApp_Study* study = dynamic_cast<SalomeApp_Study*>( myApp->activeStudy() );
   if ( !study )
     return;
index ae0693c42929610015ee5e02ea45848ad1656332..0e484c4e91bfd09f02ee41aa5b28271665c237c4 100644 (file)
@@ -42,6 +42,15 @@ msgstr "&Dump study..."
 msgid "SalomeApp_Application::PRP_DESK_FILE_DUMP_STUDY"
 msgstr "Dumps study to the python script"
 
+msgid "SalomeApp_Application::TOT_DESK_FILE_SAVE_GUI_STATE"
+msgstr "Save GUI state"
+
+msgid "SalomeApp_Application::MEN_DESK_FILE_SAVE_GUI_STATE"
+msgstr "Save GUI state..."
+
+msgid "SalomeApp_Application::PRP_DESK_FILE_SAVE_GUI_STATE"
+msgstr "Saves current state of viewers, displayed objects, etc."
+
 msgid "SalomeApp_Application::TOT_DESK_FILE_LOAD_SCRIPT"
 msgstr "Load python script"
 
@@ -103,7 +112,7 @@ msgid "SalomeApp_Application::MEN_DELETE_INVALID_REFERENCE"
 msgstr "Delete Invalid Reference"
 
 msgid "SalomeApp_Application::PREF_STORE_VISUAL_STATE"
-msgstr "Store visual parameters"
+msgstr "Store/restore last GUI state"
 
 //=======================================================================================
 
@@ -111,7 +120,7 @@ msgid "PUBLISH_IN_STUDY"
 msgstr "Publish in study"
 
 msgid "SAVE_GUI_STATE"
-msgstr "Store current GUI state"
+msgstr "Save GUI state"
 
 //=======================================================================================
 
@@ -201,3 +210,25 @@ msgstr "Publish in study"
 msgid "SalomeApp_Application::WRN_DUMP_STUDY_FAILED"
 msgstr "Dump study failed"
 
+msgid "SAVE_POINT_OBJECT_TOOLTIP"
+msgstr "Saved GUI state: %1"
+
+msgid "SAVE_POINT_DEF_NAME"
+msgstr "GUI state: "
+
+msgid "SAVE_POINT_ROOT_TOOLTIP"
+msgstr "Persistent GUI states"
+
+msgid "SAVE_POINT_ROOT_NAME"
+msgstr "GUI states"
+
+//=======================================================================================
+
+msgid "SalomeApp_Application::MEN_RESTORE_VS"
+msgstr "Restore"
+
+msgid "SalomeApp_Application::MEN_RENAME_VS"
+msgstr "Rename"
+
+msgid "SalomeApp_Application::MEN_DELETE_VS"
+msgstr "Delete"