mirror of
https://github.com/NaN-tic/tryton-gtk2.git
synced 2023-12-14 03:12:58 +01:00
Fix max_lenght of entry for new char with size = None
This commit is contained in:
parent
9cef660ac1
commit
1c54c7ac85
4 changed files with 4 additions and 4 deletions
|
@ -10,7 +10,7 @@ class Char(WidgetInterface):
|
|||
self.widget = gtk.HBox()
|
||||
self.entry = gtk.Entry()
|
||||
self.entry.set_property('activates_default', True)
|
||||
self.entry.set_max_length(int(attrs.get('size', 16)))
|
||||
self.entry.set_max_length(int(attrs.get('size', 0)))
|
||||
self.entry.set_width_chars(5)
|
||||
|
||||
self.entry.connect('button_press_event', self._menu_open)
|
||||
|
|
|
@ -11,7 +11,7 @@ class FloatTime(WidgetInterface):
|
|||
attrs=attrs)
|
||||
|
||||
self.widget = gtk.Entry()
|
||||
self.widget.set_max_length(int(attrs.get('size', 11)))
|
||||
self.widget.set_max_length(11)
|
||||
self.widget.set_visibility(not attrs.get('invisible', False))
|
||||
self.widget.set_width_chars(5)
|
||||
self.widget.set_property('activates_default', True)
|
||||
|
|
|
@ -14,7 +14,7 @@ class URL(WidgetInterface):
|
|||
self.widget = gtk.HBox(homogeneous=False)
|
||||
|
||||
self.entry = gtk.Entry()
|
||||
self.entry.set_max_length(int(attrs.get('size', 16)))
|
||||
self.entry.set_max_length(int(attrs.get('size', 0)))
|
||||
self.entry.set_width_chars(5)
|
||||
self.entry.set_property('activates_default', True)
|
||||
self.entry.connect('activate', self.sig_activate)
|
||||
|
|
|
@ -13,7 +13,7 @@ class Char(Interface):
|
|||
super(Char, self).__init__(name, parent, attrs)
|
||||
|
||||
self.widget = gtk.Entry()
|
||||
self.widget.set_max_length(int(attrs.get('size', 16)))
|
||||
self.widget.set_max_length(int(attrs.get('size', 0)))
|
||||
self.widget.set_width_chars(5)
|
||||
self.widget.set_property('activates_default', True)
|
||||
|
||||
|
|
Loading…
Reference in a new issue