* src/DisplayTabs/_ChildModel.py:

* src/Editors/_EditFamily.py: add fallback for birth date (feature #1448)
2007-12-15 Gary Burton <gary.burton@zen.co.uk>
	* src/Editors/_EditFamily.py: emit family-update signal (bug #1416)



svn: r9513
This commit is contained in:
Gary Burton 2007-12-15 23:54:52 +00:00
parent 2eaaa8369e
commit 253990ff81
3 changed files with 15 additions and 6 deletions

View File

@ -1,5 +1,9 @@
2007-12-15 Gary Burton <gary.burton@zen.co.uk> 2007-12-15 Gary Burton <gary.burton@zen.co.uk>
* 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 <gary.burton@zen.co.uk>
* src/Editors/_EditFamily.py: emit family-update signal (bug #1416)
2007-12-15 Douglas S. Blank <dblank@cs.brynmawr.edu> 2007-12-15 Douglas S. Blank <dblank@cs.brynmawr.edu>
* src/plugins/Calendar.py: Added relationships (feature #1086) * src/plugins/Calendar.py: Added relationships (feature #1086)

View File

@ -26,6 +26,7 @@
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
import gtk import gtk
import cgi
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
# #
@ -35,6 +36,8 @@ import gtk
import DateHandler import DateHandler
from BasicUtils import name_displayer from BasicUtils import name_displayer
import Utils import Utils
from ReportBase import ReportUtils
import gen.lib
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
# #
@ -75,10 +78,12 @@ class ChildModel(gtk.ListStore):
return self.family.get_child_ref_list() return self.family.get_child_ref_list()
def column_birth_day(self, data): def column_birth_day(self, data):
event_ref = data.get_birth_ref() birth = ReportUtils.get_birth_or_fallback(self.db, data)
if event_ref and event_ref.ref: if birth:
event = self.db.get_event_from_handle(event_ref.ref) if birth.get_type() == gen.lib.EventType.BIRTH:
return DateHandler.get_date(event) return DateHandler.get_date(birth)
else:
return '<i>%s</i>' % cgi.escape(DateHandler.get_date(birth))
else: else:
return u"" return u""

View File

@ -167,7 +167,7 @@ class ChildEmbedList(EmbeddedList):
continue continue
name = self._column_names[pair[1]][0] name = self._column_names[pair[1]][0]
render = gtk.CellRendererText() 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_min_width(50)
column.set_resizable(True) column.set_resizable(True)