* src/PedView.py: Dont use a black border for living people

svn: r5655
This commit is contained in:
Martin Hawlisch 2006-01-02 22:11:19 +00:00
parent cfd706ee2e
commit e739d24062
2 changed files with 19 additions and 5 deletions

View File

@ -1,6 +1,8 @@
2006-01-02 Martin Hawlisch <Martin.Hawlisch@gmx.de>
* src/PedView.py: Show marriage data
* src/ViewManager.py (post_load): Request interface rebuild after upgrading the database
* src/PedView.py: Show marriage data; Dont use a black border for
living people
* src/ViewManager.py (post_load): Request interface rebuild after
upgrading the database
2006-01-01 Eero Tamminen <eerot@sf>
* doc/gramps.1.in: nroff and a couple of typo fixes

View File

@ -138,13 +138,25 @@ class PersonBoxWidget( gtk.DrawingArea):
self.shadow_gc.line_style = gtk.gdk.LINE_SOLID
self.shadow_gc.line_width = 4
if self.person:
self.border_gc.set_foreground( self.get_colormap().alloc_color("#000000"))
if self.person.get_gender() == RelLib.Person.MALE:
alive = Utils.probably_alive(self.person,self.fh.db)
if alive and self.person.get_gender() == RelLib.Person.MALE:
self.bg_gc.set_foreground( self.get_colormap().alloc_color("#F5FFFF"))
elif self.person.get_gender() == RelLib.Person.FEMALE:
self.border_gc.set_foreground( self.get_colormap().alloc_color("#009999"))
elif self.person.get_gender() == RelLib.Person.MALE:
self.bg_gc.set_foreground( self.get_colormap().alloc_color("#F5FFFF"))
self.border_gc.set_foreground( self.get_colormap().alloc_color("#000000"))
elif alive and self.person.get_gender() == RelLib.Person.FEMALE:
self.bg_gc.set_foreground( self.get_colormap().alloc_color("#FFF5FF"))
self.border_gc.set_foreground( self.get_colormap().alloc_color("#990099"))
elif self.person.get_gender() == RelLib.Person.FEMALE:
self.bg_gc.set_foreground( self.get_colormap().alloc_color("#FFF5FF"))
self.border_gc.set_foreground( self.get_colormap().alloc_color("#000000"))
elif alive:
self.bg_gc.set_foreground( self.get_colormap().alloc_color("#FFFFF5"))
self.border_gc.set_foreground( self.get_colormap().alloc_color("#999900"))
else:
self.bg_gc.set_foreground( self.get_colormap().alloc_color("#FFFFF5"))
self.border_gc.set_foreground( self.get_colormap().alloc_color("#000000"))
else:
self.bg_gc.set_foreground( self.get_colormap().alloc_color("#eeeeee"))
self.border_gc.set_foreground( self.get_colormap().alloc_color("#777777"))