show required field in a dataform with an *

This commit is contained in:
Yann Leboulanger 2010-08-11 09:18:15 +02:00
parent 39f96a92be
commit 6cd341ad69
1 changed files with 7 additions and 2 deletions

View File

@ -555,8 +555,13 @@ class SingleForm(gtk.Table, object):
widget.set_sensitive(readwrite)
widget = decorate_with_tooltip(widget, field)
self.attach(widget, 1, 2, linecounter, linecounter+1,
yoptions=gtk.FILL)
widget.show_all()
yoptions=gtk.FILL)
if field.required:
label = gtk.Label('*')
label.set_tooltip_text(_('This field is required'))
self.attach(label, 2, 3, linecounter, linecounter+1, xoptions=0,
yoptions=0)
linecounter+=1
if self.get_property('visible'):