Salome HOME
Redesign SALOME documentation
[modules/gui.git] / src / LightApp / LightApp_PreferencesDlg.cxx
index be387c4cb22c87bb671a4045738ea5882c85611b..7ee2a302ba0e785ae747407ac5ebdfaeec5144d3 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2015  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2016  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -70,6 +70,8 @@ myPrefs( prefs ), mySaved ( false )
     connect( impBtn, SIGNAL( clicked() ), this, SLOT( onImportPref() ) );
   connect( this, SIGNAL( defaultPressed() ), prefs, SIGNAL( resetToDefaults() ) );
 
+  connect( prefs, SIGNAL( restartRequired() ), this, SLOT( onRestartRequired() ) );
+
   setMinimumSize( 800, 600 );
 }
 
@@ -120,7 +122,7 @@ void LightApp_PreferencesDlg::onHelp()
 {
   SUIT_Application* app = SUIT_Session::session()->activeApplication();
   if ( app )
-    app->onHelpContextModule( "GUI", "setting_preferences_page.html" );
+    app->onHelpContextModule( "GUI", "setting_preferences.html" );
 }
 
 /*!Store preferences on apply.*/
@@ -173,3 +175,9 @@ void LightApp_PreferencesDlg::onImportPref()
     myPrefs->toBackup();
   }
 }
+
+/*! Called if some preferences that will come in force only after application restart are changed */
+void LightApp_PreferencesDlg::onRestartRequired()
+{
+  SUIT_MessageBox::information( this, tr( "WRN_WARNING" ), tr( "PREF_NEED_RESTART" ) );
+}