Grammalecte  Check-in [5c5ea1fd5b]

Overview
Comment:[lo] dictionary options: update
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | lo | multid
Files: files | file ages | folders
SHA3-256: 5c5ea1fd5b63b4a6393de9ad8490d02976ee72fb9d6f79e180dc5c4c82d4d1de
User & Date: olr on 2018-02-28 16:28:09
Other Links: branch diff | manifest | tags
Context
2018-02-28
17:24
[lo] lexicon editor: prevent deleting unexistant rows check-in: b156d2110e user: olr tags: lo, multid
16:28
[lo] dictionary options: update check-in: 5c5ea1fd5b user: olr tags: lo, multid
16:27
[lo] lexicon editor: update check-in: 00fe4c5157 user: olr tags: lo, multid
Changes

Modified gc_lang/fr/oxt/DictOptions/DictOptions.py from [afd6778ebd] to [3451cecc0b].

    39     39           dUI = do_strings.getUI(sLang)
    40     40   
    41     41           self.xSettingNode = helpers.getConfigSetting("/org.openoffice.Lightproof_grammalecte/Other/", True)
    42     42   
    43     43           # dialog
    44     44           self.xDialog = self.xSvMgr.createInstanceWithContext('com.sun.star.awt.UnoControlDialogModel', self.ctx)
    45     45           self.xDialog.Width = 200
    46         -        self.xDialog.Height = 255
           46  +        self.xDialog.Height = 210
    47     47           self.xDialog.Title = dUI.get('title', "#title#")
    48     48           xWindowSize = helpers.getWindowSize()
    49     49           self.xDialog.PositionX = int((xWindowSize.Width / 2) - (self.xDialog.Width / 2))
    50     50           self.xDialog.PositionY = int((xWindowSize.Height / 2) - (self.xDialog.Height / 2))
    51     51   
    52     52           # fonts
    53     53           xFDTitle = uno.createUnoStruct("com.sun.star.awt.FontDescriptor")
................................................................................
    79     79           self.xGraphspellSugg = self._addWidget('activate_spell_sugg', 'CheckBox', nX, nY2+15, nWidth, nHeight, Label = dUI.get('activate_spell_sugg', "#err"))
    80     80           self._addWidget('activate_spell_sugg_descr', 'FixedText', nX, nY2+25, nWidth, nHeight*4, Label = dUI.get('activate_spell_sugg_descr', "#err"), MultiLine = True)
    81     81   
    82     82           # Personal dictionary section
    83     83           self._addWidget("personal_section", 'FixedLine', nX, nY3, nWidth, nHeight, Label = dUI.get("personal_section", "#err"), FontDescriptor = xFDTitle)
    84     84           self.xPersonalDic = self._addWidget('activate_personal', 'CheckBox', nX, nY3+15, nWidth, nHeight, Label = dUI.get('activate_personal', "#err"))
    85     85           self._addWidget('activate_personnal_descr', 'FixedText', nX, nY3+25, nWidth, nHeight*3, Label = dUI.get('activate_personal_descr', "#err"), MultiLine = True)
    86         -        self._addWidget('import_personal', 'FixedText', nX, nY3+55, nWidth-60, nHeight, Label = dUI.get('import_personal', "#err"), FontDescriptor = xFDSubTitle)
    87         -        self.xMsg = self._addWidget('msg', 'FixedText', nX, nY3+65, nWidth-50, nHeight, Label = "[néant]")
    88         -        self._addWidget('import_button', 'Button', self.xDialog.Width-50, nY3+65, 40, 10, Label = dUI.get('import_button', "#err"), TextColor = 0x005500)
    89         -        self._addWidget('create_dictionary', 'FixedText', nX, nY3+75, nWidth, nHeight*2, Label = dUI.get('create_dictionary', "#err"), MultiLine = True)
    90         -
           86  +        
    91     87           # Button
    92         -        self._addWidget('apply_button', 'Button', self.xDialog.Width-120, self.xDialog.Height-25, 50, 14, Label = dUI.get('apply_button', "#err"), FontDescriptor = xFDTitle, TextColor = 0x005500)
           88  +        self._addWidget('apply_button', 'Button', self.xDialog.Width-115, self.xDialog.Height-25, 50, 14, Label = dUI.get('apply_button', "#err"), FontDescriptor = xFDTitle, TextColor = 0x005500)
    93     89           self._addWidget('cancel_button', 'Button', self.xDialog.Width-60, self.xDialog.Height-25, 50, 14, Label = dUI.get('cancel_button', "#err"), FontDescriptor = xFDTitle, TextColor = 0x550000)
    94     90   
    95     91           self._loadOptions()
    96     92   
    97     93           # container
    98     94           self.xContainer = self.xSvMgr.createInstanceWithContext('com.sun.star.awt.UnoControlDialog', self.ctx)
    99     95           self.xContainer.setModel(self.xDialog)
   100     96           self.xContainer.getControl('apply_button').addActionListener(self)
   101     97           self.xContainer.getControl('apply_button').setActionCommand('Apply')
   102         -        self.xContainer.getControl('import_button').addActionListener(self)
   103         -        self.xContainer.getControl('import_button').setActionCommand('Import')
   104     98           self.xContainer.getControl('cancel_button').addActionListener(self)
   105     99           self.xContainer.getControl('cancel_button').setActionCommand('Cancel')
   106    100           self.xContainer.setVisible(False)
   107    101           toolkit = self.xSvMgr.createInstanceWithContext('com.sun.star.awt.ExtToolkit', self.ctx)
   108    102           self.xContainer.createPeer(toolkit, None)
   109    103           self.xContainer.execute()
   110    104   
................................................................................
   114    108               if xActionEvent.ActionCommand == 'Apply':
   115    109                   xChild = self.xSettingNode.getByName("o_fr")
   116    110                   xChild.setPropertyValue("use_graphspell", self.xGraphspell.State)
   117    111                   xChild.setPropertyValue("use_graphspell_sugg", self.xGraphspellSugg.State)
   118    112                   #xChild.setPropertyValue("extended_dic", self.xExtendedDic.State)
   119    113                   xChild.setPropertyValue("use_personal_dic", self.xPersonalDic.State)
   120    114                   self.xSettingNode.commitChanges()
   121         -            elif xActionEvent.ActionCommand == "Import":
   122         -                xFilePicker = self.xSvMgr.createInstanceWithContext('com.sun.star.ui.dialogs.SystemFilePicker', self.ctx)
   123         -                xFilePicker.appendFilter("Supported files", "*.json; *.bdic")
   124         -                #xFilePicker.setDisplayDirectory("")
   125         -                #xFilePicker.setMultiSelectionMode(True)
   126         -                nResult = xFilePicker.execute()
   127         -                if nResult == 1:
   128         -                    pass
   129         -                    #lFile = xFilePicker.getSelectedFiles()
   130         -                    #lFile = xFilePicker.getFiles()
   131    115               else:
   132    116                   pass
   133    117               self.xContainer.endExecute()
   134    118           except:
   135    119               traceback.print_exc()
   136    120       
   137    121       # XJobExecutor

Modified gc_lang/fr/oxt/DictOptions/do_strings.py from [a801f3d0f2] to [894505c8e0].

     7      7       "fr": {
     8      8           "title": "Grammalecte · Options des dictionnaires",
     9      9           
    10     10           "spelling_section": "Correcteur orthographique",
    11     11           "activate_main": "Activer le correcteur orthographique de Grammalecte",
    12     12           "activate_main_descr": "Supplante le correcteur orthographique inclus dans LibreOffice (Hunspell).",
    13     13   
           14  +        "suggestion_section": "Moteur de suggestion orthographique",
           15  +        "activate_spell_sugg": "Activer le moteur de suggestion de Grammalecte",
           16  +        "activate_spell_sugg_descr": "Désactivée, cette option remplace la suggestion orthographique de Grammalecte par celle fournie par LibreOffice (Hunspell). Les mots inclus dans le dictionnaire personnalisé ne seront plus inclus aux suggestions.",
           17  +
    14     18           "personal_section": "Dictionnaire personnel",
    15     19           "activate_personal": "Utiliser",
    16     20           "activate_personal_descr": "Le dictionnaire personnel est une commodité pour ajouter le vocabulaire qui vous est utile. Il ne supplante pas le dictionnaire commun ; il ne fait qu’ajouter de nouveaux mots.",
    17         -        "import_personal": "Importer un dictionnaire personnel",
    18         -        "import_button": "Importer",
    19         -        "create_dictionary": "Vous pouvez créer un dictionnaire personnel avec l’extension Grammalecte pour Firefox ou Chrome.",
    20         -
    21         -        "suggestion_section": "Moteur de suggestion orthographique",
    22         -        "activate_spell_sugg": "Activer le moteur de suggestion de Grammalecte",
    23         -        "activate_spell_sugg_descr": "Désactivée, cette option remplace la suggestion orthographique de Grammalecte par celle fournie par LibreOffice (Hunspell). Les mots inclus dans le dictionnaire personnalisé ne seront plus inclus aux suggestions.",
    24     21   
    25     22           "apply_button": "Appliquer",
    26     23           "cancel_button": "Annuler",
    27     24       },
    28     25       "en": {
    29     26           "title": "Grammalecte · Options for dictionaries",
    30     27           
    31     28           "spelling_section": "Spell checker",
    32     29           "activate_main": "Activate the spell checker from Grammalecte",
    33     30           "activate_main_descr": "Overrides the spell checker included in LibreOffice (Hunspell)",
    34     31   
           32  +        "suggestion_section": "Spell suggestion engine",
           33  +        "activate_spell_sugg": "Activate the suggestion engine of Grammalecte",
           34  +        "activate_spell_sugg_descr": "Disactivated, this option replace the spell suggestion engine of Grammalecte by the one of LibreOffice (Hunspell). Words included in the personal dictionary won’t be included among suggestions.",
           35  +
    35     36           "personal_section": "Personal dictionary",
    36     37           "activate_personal": "Use",
    37     38           "activate_personal_descr": "The personal dictionary is a commodity to add the vocabulary you want. It doesn’t override the common dictionary ; it only adds new words.",
    38         -        "import_personal": "Import a personal dictionary",
    39         -        "import_button": "Import",
    40         -        "create_dictionary": "You can create a personal dictionary with the Grammalecte addon for Firefox or Chrome.",
    41         -
    42         -        "suggestion_section": "Spell suggestion engine",
    43         -        "activate_spell_sugg": "Activate the suggestion engine of Grammalecte",
    44         -        "activate_spell_sugg_descr": "Disactivated, this option replace the spell suggestion engine of Grammalecte by the one of LibreOffice (Hunspell). Words included in the personal dictionary won’t be included among suggestions.",
    45     39   
    46     40           "apply_button": "Apply",
    47     41           "cancel_button": "Cancel",
    48     42       },
    49     43   }