text-single fields in read-only forms are gtk.Labels
This commit is contained in:
parent
8f9643b3bc
commit
ac9220116e
1 changed files with 13 additions and 5 deletions
|
@ -415,11 +415,19 @@ class SingleForm(gtk.Table, object):
|
||||||
else:# field.type == 'text-single' or field.type is nonstandard:
|
else:# field.type == 'text-single' or field.type is nonstandard:
|
||||||
# JEP says that if we don't understand some type, we
|
# JEP says that if we don't understand some type, we
|
||||||
# should handle it as text-single
|
# should handle it as text-single
|
||||||
widget = gtk.Entry()
|
if readwrite:
|
||||||
widget.connect('changed', self.on_text_single_entry_changed, field)
|
widget = gtk.Entry()
|
||||||
if field.value is None:
|
widget.connect('changed', self.on_text_single_entry_changed, field)
|
||||||
field.value = u''
|
if field.value is None:
|
||||||
widget.set_text(field.value)
|
field.value = u''
|
||||||
|
widget.set_text(field.value)
|
||||||
|
else:
|
||||||
|
commonwidget=False
|
||||||
|
widget = gtk.Label(field.value)
|
||||||
|
widget.set_sensitive(True)
|
||||||
|
widget.set_alignment(0.0, 0.5)
|
||||||
|
self.attach(widget, 1, 2, linecounter, linecounter+1,
|
||||||
|
yoptions=gtk.FILL)
|
||||||
|
|
||||||
if commonlabel and field.label is not None:
|
if commonlabel and field.label is not None:
|
||||||
label = gtk.Label(field.label)
|
label = gtk.Label(field.label)
|
||||||
|
|
Loading…
Add table
Reference in a new issue