]> SALOME platform Git repositories - modules/gui.git/commitdiff
Salome HOME
PyEditor: introduce auto-completion feature V8_3_asterstudy_v0.8
authorvsr <vsr@opencascade.com>
Wed, 24 May 2017 16:37:38 +0000 (19:37 +0300)
committervsr <vsr@opencascade.com>
Wed, 24 May 2017 16:37:38 +0000 (19:37 +0300)
- Additionally provide missing preference option for SALOME PyViewer

src/LightApp/LightApp_Application.cxx
src/LightApp/resources/LightApp_msg_en.ts
src/LightApp/resources/LightApp_msg_fr.ts
src/LightApp/resources/LightApp_msg_ja.ts

index da1936388a8bfbf9467eef8fe3fb833be68010a0..1005ae4f4b87f9c9fc2da90fbcafb1991976bdd0 100644 (file)
@@ -2932,6 +2932,20 @@ void LightApp_Application::createPreferences( LightApp_Preferences* pref )
   pref->addPreference( tr( "PREF_PY_LINE_NUMBS_AREA" ), pyDispGroup,
     LightApp_Preferences::Bool, "PyEditor", "LineNumberArea" );
   // ... "Display settings" group <<end>>
+
+  // ... "Editor settings" group <<start>>
+  int pyEditGroup = pref->addPreference( tr( "PREF_GROUP_PY_EDITOR" ), pyeditTab );
+  // ... -> navigation mode
+  int pyCompletion = pref->addPreference( tr( "PREF_PY_COMPLETION_MODE" ), pyEditGroup,
+                                          LightApp_Preferences::Selector, "PyEditor", "CompletionPolicy" );
+  aValuesList.clear();
+  anIndicesList.clear();
+  aValuesList   << tr("PREF_PY_NONE") << tr("PREF_PY_AUTO") << tr("PREF_PY_MANUAL") << tr("PREF_PY_ALWAYS");
+  anIndicesList << 0                  << 1                  << 2                    << 3                   ;
+  pref->setItemProperty( "strings", aValuesList, pyCompletion );
+  pref->setItemProperty( "indexes", anIndicesList, pyCompletion );
+  // ... "Editor settings" group <<end>>
+
   // ... "Tab settings" group <<start>>
   int pyTabGroup = pref->addPreference( tr( "PREF_GROUP_PY_TAB" ), pyeditTab );
   pref->setItemProperty( "columns", 2, pyTabGroup );
index 52869a881afdef5f5d0923efdc4d372bde9204d5..fd899055d5edd1ab1ba8821063051945f5ab55c8 100644 (file)
@@ -1041,6 +1041,30 @@ File does not exist</translation>
     <source>PREF_PY_LINE_NUMBS_AREA</source>
     <translation>Display line numbers area</translation>
   </message>
+  <message>
+    <source>PREF_GROUP_PY_EDITOR</source>
+    <translation>Editor settings</translation>
+  </message>
+  <message>
+    <source>PREF_PY_COMPLETION_MODE</source>
+    <translation>Completion mode</translation>
+  </message>
+  <message>
+    <source>PREF_PY_NONE</source>
+    <translation>None</translation>
+  </message>
+  <message>
+    <source>PREF_PY_AUTO</source>
+    <translation>Auto</translation>
+  </message>
+  <message>
+    <source>PREF_PY_MANUAL</source>
+    <translation>Manual</translation>
+  </message>
+  <message>
+    <source>PREF_PY_ALWAYS</source>
+    <translation>Always</translation>
+  </message>
   <message>
     <source>PREF_GROUP_PY_TAB</source>
     <translation>Tab settings</translation>
index c19a0da0feb5b22a20a8019f5e8b831218621ea8..b91790d59cb55def86d2ff787702ab6eeb8c973d 100755 (executable)
@@ -1041,6 +1041,30 @@ Le fichier n&apos;existe pas</translation>
         <source>PREF_PY_LINE_NUMBS_AREA</source>
         <translation>Affiche les numéros de ligne</translation>
     </message>
+    <message>
+        <source>PREF_GROUP_PY_EDITOR</source>
+       <translation type="unfinished">Editor settings</translation>
+    </message>
+    <message>
+        <source>PREF_PY_COMPLETION_MODE</source>
+       <translation type="unfinished">Completion mode</translation>
+    </message>
+    <message>
+        <source>PREF_PY_NONE</source>
+       <translation type="unfinished">None</translation>
+    </message>
+    <message>
+        <source>PREF_PY_AUTO</source>
+       <translation type="unfinished">Auto</translation>
+    </message>
+    <message>
+        <source>PREF_PY_MANUAL</source>
+       <translation type="unfinished">Manual</translation>
+    </message>
+    <message>
+        <source>PREF_PY_ALWAYS</source>
+       <translation type="unfinished">Always</translation>
+    </message>
     <message>
         <source>PREF_GROUP_PY_TAB</source>
         <translation>Indentation</translation>
index 4fb5afcc26a38529ebf2c614f3c17ab62ca523a9..02fa314f2647521f2980250ebcec7d88d61f5449 100644 (file)
@@ -1040,6 +1040,30 @@ Pythonファイルは、文字、数字、アンダースコアが含まれて
       <source>PREF_PY_LINE_NUMBS_AREA</source>
       <translation>ライン数エリアの表示</translation>
     </message>
+    <message>
+        <source>PREF_GROUP_PY_EDITOR</source>
+       <translation type="unfinished">Editor settings</translation>
+    </message>
+    <message>
+        <source>PREF_PY_COMPLETION_MODE</source>
+       <translation type="unfinished">Completion mode</translation>
+    </message>
+    <message>
+        <source>PREF_PY_NONE</source>
+       <translation type="unfinished">None</translation>
+    </message>
+    <message>
+        <source>PREF_PY_AUTO</source>
+       <translation type="unfinished">Auto</translation>
+    </message>
+    <message>
+        <source>PREF_PY_MANUAL</source>
+       <translation type="unfinished">Manual</translation>
+    </message>
+    <message>
+        <source>PREF_PY_ALWAYS</source>
+       <translation type="unfinished">Always</translation>
+    </message>
     <message>
       <source>PREF_GROUP_PY_TAB</source>
       <translation>設定タブ</translation>