svn: r6974

This commit is contained in:
Don Allingham 2006-06-30 14:16:09 +00:00
parent 97c11250d4
commit 4e0c9e816e
2 changed files with 18 additions and 3 deletions

View File

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

View File

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