svn: r6974
This commit is contained in:
parent
97c11250d4
commit
4e0c9e816e
@ -358,9 +358,10 @@ class RelationshipView(PageView.PersonNavView):
|
||||
|
||||
# name and edit button
|
||||
name = NameDisplay.displayer.display(person)
|
||||
fmt = '<span size="larger" weight="bold">%s %s</span>'
|
||||
text = fmt % (cgi.escape(name), _GenderCode[person.gender])
|
||||
label = GrampsWidgets.MarkupLabel(text)
|
||||
fmt = '<span size="larger" weight="bold">%s</span>'
|
||||
text = fmt % cgi.escape(name)
|
||||
gender = fmt % _GenderCode[person.gender]
|
||||
label = GrampsWidgets.DualMarkupLabel(text, gender)
|
||||
button = GrampsWidgets.IconButton(self.edit_button_press,person.handle)
|
||||
hbox = GrampsWidgets.LinkBox(label, button)
|
||||
|
||||
|
@ -178,6 +178,20 @@ class MarkupLabel(gtk.Label):
|
||||
gtk.Label.__init__(self, text)
|
||||
self.set_alignment(0, 0.5)
|
||||
self.set_use_markup(True)
|
||||
self.show_all()
|
||||
|
||||
class DualMarkupLabel(gtk.HBox):
|
||||
|
||||
def __init__(self, text, alt):
|
||||
gtk.HBox.__init__(self)
|
||||
label = gtk.Label(text)
|
||||
label.set_alignment(0, 0.5)
|
||||
label.set_use_markup(True)
|
||||
|
||||
self.add(label)
|
||||
b = GenderLabel(alt)
|
||||
b.set_use_markup(True)
|
||||
self.add(b)
|
||||
self.show()
|
||||
|
||||
class IntEdit(gtk.Entry):
|
||||
|
Loading…
Reference in New Issue
Block a user