Fix dynamic size for translate widget
Dynamic size was added in changeset 8ee7e142c8fd but the translate widget was not updated. review3271004
This commit is contained in:
1 parent
2ad92c8ba2
commit
a7ae4d4520
1 file changed
+4
-2
@@ -51,8 +51,10 @@ class Char(WidgetInterface, TranslateMixin):
|
||||
def translate_widget(self):
|
||||
entry = gtk.Entry()
|
||||
entry.set_property('activates_default', True)
|
||||
entry.set_width_chars(int(self.attrs.get('size', -1)))
|
||||
entry.set_max_length(int(self.attrs.get('size', 0)))
|
||||
if self.record:
|
||||
field_size = self.record.expr_eval(self.attrs.get('size'))
|
||||
entry.set_width_chars(field_size or -1)
|
||||
entry.set_max_length(field_size or 0)
|
||||
return entry
|
||||
|
||||
@staticmethod
|
||||
|
||||
Reference in new issue
Block a user