Fix max_lenght of entry for new char with size = None

This commit is contained in:
C?dric Krier 2008-03-11 20:01:21 +01:00
parent 9cef660ac1
commit 1c54c7ac85
4 changed files with 4 additions and 4 deletions

View file

@ -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)

View file

@ -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)

View file

@ -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)

View file

@ -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)