changeset b2483ea26df9 in tryton:default
details: https://hg.tryton.org/tryton?cmd=changeset;node=b2483ea26df9
description:
        Always append ':' at the end of the string

        issue8041
        review51611002
diffstat:

 tryton/gui/window/view_form/view/form.py                |  6 +-----
 tryton/gui/window/view_form/view/form_gtk/dictionary.py |  5 +----
 tryton/gui/window/view_form/view/form_gtk/widget.py     |  5 +----
 tryton/gui/window/view_form/view/list.py                |  5 +----
 4 files changed, 4 insertions(+), 17 deletions(-)

diffs (61 lines):

diff -r a4e3fdb55e8e -r b2483ea26df9 tryton/gui/window/view_form/view/form.py
--- a/tryton/gui/window/view_form/view/form.py  Wed Jan 30 11:47:04 2019 +0100
+++ b/tryton/gui/window/view_form/view/form.py  Sun Feb 03 20:19:17 2019 +0100
@@ -256,11 +256,7 @@
             if 'states' not in attributes and 'states' in field.attrs:
                 attributes['states'] = field.attrs['states']
             if 'string' not in attributes:
-                if gtk.widget_get_default_direction() == \
-                        gtk.TEXT_DIR_RTL:
-                    attributes['string'] = _(':') + field.attrs['string']
-                else:
-                    attributes['string'] = field.attrs['string'] + _(':')
+                attributes['string'] = field.attrs['string'] + _(':')
         if CONFIG['client.modepda']:
             attributes['xalign'] = 0.0
 
diff -r a4e3fdb55e8e -r b2483ea26df9 
tryton/gui/window/view_form/view/form_gtk/dictionary.py
--- a/tryton/gui/window/view_form/view/form_gtk/dictionary.py   Wed Jan 30 
11:47:04 2019 +0100
+++ b/tryton/gui/window/view_form/view/form_gtk/dictionary.py   Sun Feb 03 
20:19:17 2019 +0100
@@ -479,10 +479,7 @@
         alignment.add(hbox)
         n_rows = self.table.props.n_rows
         self.table.resize(n_rows + 1, 3)
-        if gtk.widget_get_default_direction() == gtk.TEXT_DIR_RTL:
-            text = _(':') + key_schema['string']
-        else:
-            text = key_schema['string'] + _(':')
+        text = key_schema['string'] + _(':')
         label = gtk.Label(set_underline(text))
         label.set_use_underline(True)
         label.set_alignment(1., .5)
diff -r a4e3fdb55e8e -r b2483ea26df9 
tryton/gui/window/view_form/view/form_gtk/widget.py
--- a/tryton/gui/window/view_form/view/form_gtk/widget.py       Wed Jan 30 
11:47:04 2019 +0100
+++ b/tryton/gui/window/view_form/view/form_gtk/widget.py       Sun Feb 03 
20:19:17 2019 +0100
@@ -169,10 +169,7 @@
         table.set_row_spacings(2)
         table.set_border_width(1)
         for i, language in enumerate(languages):
-            if gtk.widget_get_default_direction() == gtk.TEXT_DIR_RTL:
-                label = _(':') + language['name']
-            else:
-                label = language['name'] + _(':')
+            label = language['name'] + _(':')
             label = gtk.Label(label)
             label.set_alignment(1.0, 0.0 if self.widget.expand else 0.5)
             table.attach(label, 0, 1, i, i + 1, xoptions=gtk.FILL, xpadding=2)
diff -r a4e3fdb55e8e -r b2483ea26df9 tryton/gui/window/view_form/view/list.py
--- a/tryton/gui/window/view_form/view/list.py  Wed Jan 30 11:47:04 2019 +0100
+++ b/tryton/gui/window/view_form/view/list.py  Sun Feb 03 20:19:17 2019 +0100
@@ -514,10 +514,7 @@
     def add_sum(self, attributes):
         if 'sum' not in attributes:
             return
-        if gtk.widget_get_default_direction() == gtk.TEXT_DIR_RTL:
-            text = _(':') + attributes['sum']
-        else:
-            text = attributes['sum'] + _(':')
+        text = attributes['sum'] + _(':')
         label, sum_ = gtk.Label(text), gtk.Label()
 
         hbox = gtk.HBox()

Reply via email to