diff --git a/ChangeLog b/ChangeLog index fc3ebea7f..86d637c81 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2007-12-15 Gary Burton - * src/Editors/_EditFamily.py: emit family-update signal #1416 + * src/DisplayTabs/_ChildModel.py: + * src/Editors/_EditFamily.py: add fallback for birth date (feature #1448) + +2007-12-15 Gary Burton + * src/Editors/_EditFamily.py: emit family-update signal (bug #1416) 2007-12-15 Douglas S. Blank * src/plugins/Calendar.py: Added relationships (feature #1086) diff --git a/src/DisplayTabs/_ChildModel.py b/src/DisplayTabs/_ChildModel.py index 13b46402b..2e9eee093 100644 --- a/src/DisplayTabs/_ChildModel.py +++ b/src/DisplayTabs/_ChildModel.py @@ -26,6 +26,7 @@ # #------------------------------------------------------------------------- import gtk +import cgi #------------------------------------------------------------------------- # @@ -35,6 +36,8 @@ import gtk import DateHandler from BasicUtils import name_displayer import Utils +from ReportBase import ReportUtils +import gen.lib #------------------------------------------------------------------------- # @@ -75,10 +78,12 @@ class ChildModel(gtk.ListStore): return self.family.get_child_ref_list() def column_birth_day(self, data): - event_ref = data.get_birth_ref() - if event_ref and event_ref.ref: - event = self.db.get_event_from_handle(event_ref.ref) - return DateHandler.get_date(event) + birth = ReportUtils.get_birth_or_fallback(self.db, data) + if birth: + if birth.get_type() == gen.lib.EventType.BIRTH: + return DateHandler.get_date(birth) + else: + return '%s' % cgi.escape(DateHandler.get_date(birth)) else: return u"" diff --git a/src/Editors/_EditFamily.py b/src/Editors/_EditFamily.py index 8bb4f7274..82c9f2940 100644 --- a/src/Editors/_EditFamily.py +++ b/src/Editors/_EditFamily.py @@ -167,7 +167,7 @@ class ChildEmbedList(EmbeddedList): continue name = self._column_names[pair[1]][0] render = gtk.CellRendererText() - column = gtk.TreeViewColumn(name, render, text=pair[1]) + column = gtk.TreeViewColumn(name, render, markup=pair[1]) column.set_min_width(50) column.set_resizable(True)