Grammalecte  Check-in [8ae3ac26d6]

Overview
Comment:[lo] conjugueur: small adjustments
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk | lo
Files: files | file ages | folders
SHA3-256: 8ae3ac26d6a5bf6e8150fc856b5e35e98bb129b1936aa7c3af7c8ea19f9fcb1a
User & Date: olr on 2018-03-02 18:43:22
Original Comment: [lo] conjugueur: smal adjustments
Other Links: manifest | tags
Context
2018-03-02
18:48
[lo] formateur de texte : ajustement de la barre de progression check-in: 26e2ffe074 user: olr tags: trunk, lo
18:43
[lo] conjugueur: small adjustments check-in: 8ae3ac26d6 user: olr tags: trunk, lo
18:26
[lo] conjugueur: new UI check-in: 03e54b8bc1 user: olr tags: trunk, lo
Changes

Modified gc_lang/fr/oxt/Conjugueur/Conjugueur.py from [19c95000c0] to [79fb2363d1].

16
17
18
19
20
21
22
23

24
25
26
27
28
29
30
31

class Conjugueur (unohelper.Base, XActionListener, XJobExecutor):
    def __init__ (self, ctx):
        self.ctx = ctx
        self.xSvMgr = self.ctx.ServiceManager
        self.xContainer = None
        self.xDialog = None
        self.lDropDown = ["être", "avoir", "aller", "vouloir", "pouvoir", "devoir", "faire", "envoyer", "prendre", "connaître", \

                          "savoir", "partir", "répondre", "dire", "voir", "mettre", "tenir", "sentir", "manger", "commencer", "finir", "haïr"]
        self.sWarning = "Verbe non vérifié.\nOptions “pronominal” et “temps composés” désactivées."

    def _addWidget (self, name, wtype, x, y, w, h, **kwargs):
        xWidget = self.xDialog.createInstance('com.sun.star.awt.UnoControl%sModel' % wtype)
        xWidget.Name = name
        xWidget.PositionX = x
        xWidget.PositionY = y







|
>
|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32

class Conjugueur (unohelper.Base, XActionListener, XJobExecutor):
    def __init__ (self, ctx):
        self.ctx = ctx
        self.xSvMgr = self.ctx.ServiceManager
        self.xContainer = None
        self.xDialog = None
        self.lDropDown = ["être", "avoir", "aller", "vouloir", "pouvoir", "devoir", "acquérir", "connaître", "dire", "faire", \
                          "mettre", "partir", "prendre", "répondre", "savoir", "sentir", "tenir", "vaincre", "venir", "voir", \
                          "appeler", "envoyer", "commencer", "manger", "trouver", "accomplir", "agir", "finir", "haïr", "réussir"]
        self.sWarning = "Verbe non vérifié.\nOptions “pronominal” et “temps composés” désactivées."

    def _addWidget (self, name, wtype, x, y, w, h, **kwargs):
        xWidget = self.xDialog.createInstance('com.sun.star.awt.UnoControl%sModel' % wtype)
        xWidget.Name = name
        xWidget.PositionX = x
        xWidget.PositionY = y
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
        nSubTitleColor = 0x000033

        # grid
        nX1 = 10; nX2 = nX1+145;
        nY0 = 5; nY1 = nY0+17; nY2 = nY1+2; nY3 = nY2+30; nY4 = nY3+46; nY5 = nY4+55; nY6 = nY5+55; nY7 = nY6+55; nY6b = nY6+13; nY7b = nY6b+55

        # input field + button
        self.input = self._addWidget('input', 'ComboBox', nX1, nY0, 80, 14, \
                                     FontDescriptor = xFDinput, TextColor = 0x666666, Dropdown = True, LineCount = 22)
        for n, s in enumerate(self.lDropDown):
            self.input.insertItemText(n, s)
        # button
        self.cbutton = self._addWidget('cbutton', 'Button', nX1+85, nY0, 50, 14, Label = "Conjuguer", FontDescriptor = xFDinput)
        # options
        self.oneg = self._addWidget('oneg', 'CheckBox', nX1+140, nY0, 40, nHeight, Label = "négation")
        self.opro = self._addWidget('opro', 'CheckBox', nX1+185, nY0, 55, nHeight, Label = "pronominal")
        self.ofem = self._addWidget('ofem', 'CheckBox', nX1+240, nY0, 50, nHeight, Label = "féminin")
        self.oint = self._addWidget('oint', 'CheckBox', nX1+140, nY0+8, 60, nHeight, Label = "interrogatif")
        self.otco = self._addWidget('otco', 'CheckBox', nX1+215, nY0+8, 60, nHeight, Label = "temps composés")

        # group box // indicatif
        gb_infi = self._addWidget('groupbox_infi', 'FixedLine', nX1, nY2, nWidth, 10, Label = "Infinitif", \
                                  FontDescriptor = xFDmode, FontRelief = 0, TextColor = nTitleColor)
        self.infi = self._addWidget('infi', 'FixedText', nX1, nY2+10, nWidth, nHeight, Label = "", FontDescriptor = xFDbold)

        # informations







|
|



|

|
|
|
|
|







79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
        nSubTitleColor = 0x000033

        # grid
        nX1 = 10; nX2 = nX1+145;
        nY0 = 5; nY1 = nY0+17; nY2 = nY1+2; nY3 = nY2+30; nY4 = nY3+46; nY5 = nY4+55; nY6 = nY5+55; nY7 = nY6+55; nY6b = nY6+13; nY7b = nY6b+55

        # input field + button
        self.input = self._addWidget('input', 'ComboBox', nX1, nY0, 85, 14, \
                                     FontDescriptor = xFDinput, TextColor = 0x666666, Dropdown = True, LineCount = 30)
        for n, s in enumerate(self.lDropDown):
            self.input.insertItemText(n, s)
        # button
        self.cbutton = self._addWidget('cbutton', 'Button', nX1+90, nY0, 50, 14, Label = "Conjuguer", FontDescriptor = xFDinput)
        # options
        self.oneg = self._addWidget('oneg', 'CheckBox', nX2, nY0, 40, nHeight, Label = "négation")
        self.opro = self._addWidget('opro', 'CheckBox', nX2+45, nY0, 55, nHeight, Label = "pronominal")
        self.ofem = self._addWidget('ofem', 'CheckBox', nX2+100, nY0, 50, nHeight, Label = "féminin")
        self.oint = self._addWidget('oint', 'CheckBox', nX2, nY0+8, 60, nHeight, Label = "interrogatif")
        self.otco = self._addWidget('otco', 'CheckBox', nX2+75, nY0+8, 60, nHeight, Label = "temps composés")

        # group box // indicatif
        gb_infi = self._addWidget('groupbox_infi', 'FixedLine', nX1, nY2, nWidth, 10, Label = "Infinitif", \
                                  FontDescriptor = xFDmode, FontRelief = 0, TextColor = nTitleColor)
        self.infi = self._addWidget('infi', 'FixedText', nX1, nY2+10, nWidth, nHeight, Label = "", FontDescriptor = xFDbold)

        # informations