From cd0c60833dfac15c46d95977d3ea51aebd142cc6 Mon Sep 17 00:00:00 2001 From: vsr Date: Thu, 18 Jun 2015 12:26:13 +0300 Subject: [PATCH] 0023084: [CEA 1431] To choose in the preferences of the type Paravis trace Paraview - Show single warning messages if Preferences dialog box if any option that requires application restart has been changed --- src/PVGUI/PVGUI_Module.cxx | 33 ++++++++++++++++----------- src/PVGUI/resources/PARAVIS_msg_en.ts | 6 ++++- src/PVGUI/resources/PARAVIS_msg_fr.ts | 4 ++++ src/PVGUI/resources/PARAVIS_msg_ja.ts | 4 ++++ 4 files changed, 33 insertions(+), 14 deletions(-) diff --git a/src/PVGUI/PVGUI_Module.cxx b/src/PVGUI/PVGUI_Module.cxx index dbc63440..5439ff1c 100644 --- a/src/PVGUI/PVGUI_Module.cxx +++ b/src/PVGUI/PVGUI_Module.cxx @@ -875,6 +875,9 @@ pqServer* PVGUI_Module::getActiveServer() */ void PVGUI_Module::createPreferences() { + QList aIndices; + QStringList aStrings; + // Paraview settings tab int aParaViewSettingsTab = addPreference( tr( "TIT_PVIEWSETTINGS" ) ); @@ -886,8 +889,6 @@ void PVGUI_Module::createPreferences() // Paravis settings tab int aParaVisSettingsTab = addPreference( tr( "TIT_PVISSETTINGS" ) ); - addPreference( tr( "PREF_STOP_TRACE" ), aParaVisSettingsTab, - LightApp_Preferences::Bool, PARAVIS_MODULE_NAME, "stop_trace" ); addPreference( tr( "PREF_NO_EXT_PVSERVER" ), aParaVisSettingsTab, LightApp_Preferences::Bool, PARAVIS_MODULE_NAME, "no_ext_pv_server" ); @@ -896,24 +897,30 @@ void PVGUI_Module::createPreferences() LightApp_Preferences::Selector, PARAVIS_MODULE_NAME, "savestate_type" ); - int aTraceType = addPreference( tr( "PREF_TRACE_TYPE_LBL" ), aParaVisSettingsTab, - LightApp_Preferences::Selector, - PARAVIS_MODULE_NAME, "tracestate_type" ); - QList aIndices; - QStringList aStrings; + aStrings.clear(); + aIndices.clear(); aIndices << 0 << 1 << 2; - aStrings << tr("PREF_SAVE_TYPE_0"); - aStrings << tr("PREF_SAVE_TYPE_1"); - aStrings << tr("PREF_SAVE_TYPE_2"); + aStrings << tr("PREF_SAVE_TYPE_0") << tr("PREF_SAVE_TYPE_1") << tr("PREF_SAVE_TYPE_2"); setPreferenceProperty( aSaveType, "strings", aStrings ); setPreferenceProperty( aSaveType, "indexes", aIndices ); + // ... "Language" group <> + int traceGroup = addPreference( tr( "PREF_GROUP_TRACE" ), aParaVisSettingsTab ); + + int stopTrace = addPreference( tr( "PREF_STOP_TRACE" ), traceGroup, + LightApp_Preferences::Bool, PARAVIS_MODULE_NAME, "stop_trace" ); + setPreferenceProperty( stopTrace, "restart", true ); + + int aTraceType = addPreference( tr( "PREF_TRACE_TYPE_LBL" ), traceGroup, + LightApp_Preferences::Selector, + PARAVIS_MODULE_NAME, "tracestate_type" ); aStrings.clear(); - aStrings << tr("PREF_TRACE_TYPE_0"); - aStrings << tr("PREF_TRACE_TYPE_1"); - aStrings << tr("PREF_TRACE_TYPE_2"); + aIndices.clear(); + aIndices << 0 << 1 << 2; + aStrings << tr("PREF_TRACE_TYPE_0") << tr("PREF_TRACE_TYPE_1") << tr("PREF_TRACE_TYPE_2"); setPreferenceProperty( aTraceType, "strings", aStrings ); setPreferenceProperty( aTraceType, "indexes", aIndices ); + setPreferenceProperty( aTraceType, "restart", true ); } /*! diff --git a/src/PVGUI/resources/PARAVIS_msg_en.ts b/src/PVGUI/resources/PARAVIS_msg_en.ts index 06c2f164..fd6d323c 100644 --- a/src/PVGUI/resources/PARAVIS_msg_en.ts +++ b/src/PVGUI/resources/PARAVIS_msg_en.ts @@ -1165,9 +1165,13 @@ TOOL_VCR_CONTROLS VCR Controls + + PREF_GROUP_TRACE + Trace + PREF_STOP_TRACE - Deactivate Trace (for next session only) + Deactivate Trace PREF_NO_EXT_PVSERVER diff --git a/src/PVGUI/resources/PARAVIS_msg_fr.ts b/src/PVGUI/resources/PARAVIS_msg_fr.ts index ea61e3f0..7f149ccb 100644 --- a/src/PVGUI/resources/PARAVIS_msg_fr.ts +++ b/src/PVGUI/resources/PARAVIS_msg_fr.ts @@ -1169,6 +1169,10 @@ TOOL_VCR_CONTROLS Contrôles VCR + + PREF_GROUP_TRACE + Trace + PREF_STOP_TRACE Déactiver la trace (seulement pour la session suivante) diff --git a/src/PVGUI/resources/PARAVIS_msg_ja.ts b/src/PVGUI/resources/PARAVIS_msg_ja.ts index 6eb05744..7765e30d 100644 --- a/src/PVGUI/resources/PARAVIS_msg_ja.ts +++ b/src/PVGUI/resources/PARAVIS_msg_ja.ts @@ -1165,6 +1165,10 @@ TOOL_VCR_CONTROLS VCR のコントロール + + PREF_GROUP_TRACE + Trace + PREF_STOP_TRACE (のみのための次のセッション) のトレースを有効に -- 2.39.2