Skip to content
Snippets Groups Projects
Commit ac922011 authored by Liorithiel's avatar Liorithiel
Browse files

text-single fields in read-only forms are gtk.Labels

parent 8f9643b3
No related branches found
No related tags found
No related merge requests found
...@@ -415,11 +415,19 @@ class SingleForm(gtk.Table, object): ...@@ -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)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment