Index: gc_lang/fr/oxt/Lexicographer/Enumerator.py ================================================================== --- gc_lang/fr/oxt/Lexicographer/Enumerator.py +++ gc_lang/fr/oxt/Lexicographer/Enumerator.py @@ -102,11 +102,11 @@ # fonts xFDTitle = uno.createUnoStruct("com.sun.star.awt.FontDescriptor") xFDTitle.Height = 9 xFDTitle.Weight = uno.getConstantByName("com.sun.star.awt.FontWeight.BOLD") xFDTitle.Name = "Verdana" - + xFDSubTitle = uno.createUnoStruct("com.sun.star.awt.FontDescriptor") xFDSubTitle.Height = 8 xFDSubTitle.Weight = uno.getConstantByName("com.sun.star.awt.FontWeight.BOLD") xFDSubTitle.Name = "Verdana" @@ -129,11 +129,11 @@ ) self._addWidget('num_of_entries', 'FixedText', nX, nY1+210, 60, nHeight, Label = self.dUI.get('num_of_entries', "#err"), Align = 2) self.xNumWord = self._addWidget('num_of_entries_res', 'FixedText', nX+65, nY1+210, 30, nHeight, Label = "—") self._addWidget('tot_of_entries', 'FixedText', nX+100, nY1+210, 60, nHeight, Label = self.dUI.get('tot_of_entries', "#err"), Align = 2) self.xTotWord = self._addWidget('tot_of_entries_res', 'FixedText', nX+165, nY1+210, 30, nHeight, Label = "—") - + # Tag # Note: the only way to group RadioButtons is to create them successively self._addWidget("dformat_section", 'FixedLine', nX, nY2, 90, nHeight, Label = self.dUI.get("dformat_section", "#err"), FontDescriptor = xFDTitle) self._addWidget("charstyle_section", 'FixedLine', nX+100, nY2, 90, nHeight, Label = self.dUI.get("charstyle_section", "#err"), FontDescriptor = xFDTitle) self.xUnderline = self._addWidget('underline', 'RadioButton', nX, nY2+12, 40, nHeight, Label = self.dUI.get('underline', "#err")) @@ -140,11 +140,11 @@ self.xNoUnderline = self._addWidget('nounderline', 'RadioButton', nX+50, nY2+12, 40, nHeight, Label = self.dUI.get('nounderline', "#err")) self.xAccent = self._addWidget('accentuation', 'RadioButton', nX+100, nY2+12, 50, nHeight, Label = self.dUI.get('accentuation', "#err")) self.xNoAccent = self._addWidget('noaccentuation', 'RadioButton', nX+155, nY2+12, 40, nHeight, Label = self.dUI.get('noaccentuation', "#err")) self.xTag = self._addWidget('tag_button', 'Button', self.xDialog.Width-40, nY2+10, 30, 11, Label = self.dUI.get('tag_button', "#err"), FontDescriptor = xFDTitle, TextColor = 0x005500) - + # Progress bar self.xProgressBar = self._addWidget('progress_bar', 'ProgressBar', nX, self.xDialog.Height-25, 160, 14) self.xProgressBar.ProgressValueMin = 0 self.xProgressBar.ProgressValueMax = 1 # to calculate later @@ -163,14 +163,14 @@ self.xContainer.getControl('unknown_button').setActionCommand('UnknownWords') self.xContainer.getControl('tag_button').addActionListener(self) self.xContainer.getControl('tag_button').setActionCommand('Tag') self.xContainer.getControl('close_button').addActionListener(self) self.xContainer.getControl('close_button').setActionCommand('Close') - self.xContainer.setVisible(False) + self.xContainer.setVisible(True) # True for non modal dialog xToolkit = self.xSvMgr.createInstanceWithContext('com.sun.star.awt.ExtToolkit', self.ctx) self.xContainer.createPeer(xToolkit, None) - self.xContainer.execute() + #self.xContainer.execute() # Don’t excute for non modal dialog # XActionListener def actionPerformed (self, xActionEvent): try: if xActionEvent.ActionCommand == "Count": @@ -196,14 +196,15 @@ sAction = "accentuation" elif self.xNoAccent.State: sAction = "noaccentuation" self.tagText(aWord, sAction) elif xActionEvent.ActionCommand == "Close": - self.xContainer.endExecute() + self.xContainer.dispose() # Non modal dialog + #self.xContainer.endExecute() # Modal dialog except: traceback.print_exc() - + # XJobExecutor def trigger (self, args): try: xDialog = Enumerator(self.ctx) xDialog.run()