From 4e0c9e816ef2b524a7421b18156345a7208a3c9b Mon Sep 17 00:00:00 2001 From: Don Allingham Date: Fri, 30 Jun 2006 14:16:09 +0000 Subject: [PATCH] svn: r6974 --- src/DataViews/_RelationView.py | 7 ++++--- src/GrampsWidgets.py | 14 ++++++++++++++ 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/src/DataViews/_RelationView.py b/src/DataViews/_RelationView.py index 9eefb2458..4de8c3b38 100644 --- a/src/DataViews/_RelationView.py +++ b/src/DataViews/_RelationView.py @@ -358,9 +358,10 @@ class RelationshipView(PageView.PersonNavView): # name and edit button name = NameDisplay.displayer.display(person) - fmt = '%s %s' - text = fmt % (cgi.escape(name), _GenderCode[person.gender]) - label = GrampsWidgets.MarkupLabel(text) + fmt = '%s' + 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) diff --git a/src/GrampsWidgets.py b/src/GrampsWidgets.py index f8a880c4a..44f599d5a 100644 --- a/src/GrampsWidgets.py +++ b/src/GrampsWidgets.py @@ -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):