Grammalecte  Check-in [3a15f6b206]

Overview
Comment:[lo] lexical editor: wait pointers
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | lo | multid
Files: files | file ages | folders
SHA3-256: 3a15f6b206522d6f4d8e85e856dc9b1f8e17afc5243b90fe46c4b2d3bc12a395
User & Date: olr on 2018-03-27 13:01:14
Other Links: branch diff | manifest | tags
Context
2018-03-27
14:48
[lo] lexicon editor: export dictionary (sigh: file picker doesn’t work at all) check-in: d03e3c0ed1 user: olr tags: lo, multid
13:01
[lo] lexical editor: wait pointers check-in: 3a15f6b206 user: olr tags: lo, multid
09:02
[lo] lexicon editor: search check-in: 73ecf7a6c0 user: olr tags: lo, multid
Changes

Modified gc_lang/fr/oxt/DictOptions/SearchWords.py from [19b4306ad7] to [cd7d6b9804].

     1         -# Search and informations about tags
            1  +# Search
     2      2   # by Olivier R.
     3      3   # License: MPL 2
     4      4   
     5      5   import unohelper
     6      6   import uno
     7      7   import traceback
     8      8   
................................................................................
   169    169           except:
   170    170               traceback.print_exc()
   171    171   
   172    172       def initSpellChecker (self):
   173    173           if not self.oSpellChecker:
   174    174               self.oSpellChecker = sc.SpellChecker("fr", "fr.bdic", "", "", "")
   175    175   
          176  +    @_waitPointer
   176    177       def searchSimilar (self):
   177    178           self.initSpellChecker()
   178    179           sWord = self.xWord.Text.strip()
   179    180           if sWord:
   180    181               xGridDataModel = self.xGridModel.GridDataModel
   181    182               xGridDataModel.removeAllRows()
   182    183               lResult = self.oSpellChecker.getSimilarEntries(sWord, 20);
   183    184               for i, aEntry in enumerate(lResult):
   184    185                   xGridDataModel.addRow(i, aEntry)
   185    186   
          187  +    @_waitPointer
   186    188       def searchRegex (self):
   187    189           self.initSpellChecker()
   188    190           sFlexPattern = self.xFlexion.Text.strip()
   189    191           sTagsPattern = self.xTags.Text.strip()
   190    192           xGridDataModel = self.xGridModel.GridDataModel
   191    193           xGridDataModel.removeAllRows()
   192    194           for i, aEntry in enumerate(self.oSpellChecker.select(sFlexPattern, sTagsPattern)):
   193    195               xGridDataModel.addRow(i, aEntry)
   194    196               i += 1
   195    197               if i >= 2000:
   196    198                   break