2006-05-23 Don Allingham <don@gramps-project.org>

* src/DataViews/_FamilyView.py: more shading



svn: r6756
This commit is contained in:
Don Allingham 2006-05-23 16:33:42 +00:00
parent 05b6f9f1e7
commit fbdf65148e
2 changed files with 24 additions and 23 deletions

View File

@ -1,3 +1,6 @@
2006-05-23 Don Allingham <don@gramps-project.org>
* src/DataViews/_FamilyView.py: more shading
2006-05-22 Alex Roitman <shura@gramps-project.org> 2006-05-22 Alex Roitman <shura@gramps-project.org>
* data/gramps.schemas.in: Typos. * data/gramps.schemas.in: Typos.
* src/DataViews/_PedigreeView.py (rebuild): Typo. * src/DataViews/_PedigreeView.py (rebuild): Typo.

View File

@ -89,6 +89,7 @@ class FamilyView(PageView.PersonNavView):
self.show_details = Config.get(Config.FAMILY_DETAILS) self.show_details = Config.get(Config.FAMILY_DETAILS)
self.connect_to_db(dbstate.db) self.connect_to_db(dbstate.db)
self.redrawing = False self.redrawing = False
self.color = gtk.TextView().style.white
self.child = None self.child = None
def build_tree(self): def build_tree(self):
@ -359,7 +360,7 @@ class FamilyView(PageView.PersonNavView):
table.attach(hbox, 0, 2, 0, 1) table.attach(hbox, 0, 2, 0, 1)
eventbox = gtk.EventBox() eventbox = gtk.EventBox()
eventbox.modify_bg(gtk.STATE_NORMAL, gtk.gdk.color_parse('#ffffff')) eventbox.modify_bg(gtk.STATE_NORMAL, self.color)
table.attach(eventbox, 1, 2, 1, 2) table.attach(eventbox, 1, 2, 1, 2)
subtbl = gtk.Table(3, 3) subtbl = gtk.Table(3, 3)
subtbl.set_col_spacings(12) subtbl.set_col_spacings(12)
@ -414,11 +415,6 @@ class FamilyView(PageView.PersonNavView):
mbox.show_all() mbox.show_all()
self.vbox.pack_start(mbox,False) self.vbox.pack_start(mbox,False)
# separator
sep = gtk.HSeparator()
sep.show()
self.vbox.pack_start(sep, False)
def write_person_event(self, ename, event): def write_person_event(self, ename, event):
if event: if event:
dobj = event.get_date_object() dobj = event.get_date_object()
@ -531,19 +527,7 @@ class FamilyView(PageView.PersonNavView):
return return
self.write_label("%s:" % _('Parents'), family, True) self.write_label("%s:" % _('Parents'), family, True)
self.write_person(_('Father'), family.get_father_handle()) self.write_person(_('Father'), family.get_father_handle())
if self.show_details:
value = self.info_string(family.get_father_handle())
if value:
self.attach.attach(GrampsWidgets.BasicLabel(value), _PDTLS_START,
_PDTLS_STOP, self.row, self.row+1)
self.row += 1
self.write_person(_('Mother'), family.get_mother_handle()) self.write_person(_('Mother'), family.get_mother_handle())
if self.show_details:
value = self.info_string(family.get_mother_handle())
if value:
self.attach.attach(GrampsWidgets.BasicLabel(value), _PDTLS_START,
_PDTLS_STOP, self.row, self.row+1)
self.row += 1
if self.show_siblings: if self.show_siblings:
active = self.dbstate.active.handle active = self.dbstate.active.handle
@ -566,23 +550,37 @@ class FamilyView(PageView.PersonNavView):
label = GrampsWidgets.MarkupLabel(format % cgi.escape(title)) label = GrampsWidgets.MarkupLabel(format % cgi.escape(title))
self.attach.attach(label, _PLABEL_START, _PLABEL_STOP, self.row, self.attach.attach(label, _PLABEL_START, _PLABEL_STOP, self.row,
self.row+1, xoptions=gtk.FILL|gtk.SHRINK) self.row+1, xoptions=gtk.FILL|gtk.SHRINK,
yoptions=gtk.FILL|gtk.SHRINK)
vbox = gtk.VBox()
if handle: if handle:
link_label = GrampsWidgets.LinkLabel(self.get_name(handle, True), link_label = GrampsWidgets.LinkLabel(self.get_name(handle, True),
self.button_press, handle) self.button_press, handle)
link_label.modify_bg(gtk.STATE_NORMAL, self.color)
button = GrampsWidgets.IconButton(self.edit_button_press, handle) button = GrampsWidgets.IconButton(self.edit_button_press, handle)
self.attach.attach(GrampsWidgets.LinkBox(link_label, button), vbox.pack_start(GrampsWidgets.LinkBox(link_label, button))
_PDATA_START, _PDATA_STOP, self.row, self.row+1)
else: else:
link_label = gtk.Label(_('Unknown')) link_label = gtk.Label(_('Unknown'))
link_label.set_alignment(0, 0.5) link_label.set_alignment(0, 0.5)
link_label.show() link_label.show()
self.attach.attach(link_label, vbox.pack_start(link_label)
_PDATA_START, _PDATA_STOP, self.row, self.row+1)
if self.show_details:
value = self.info_string(handle)
if value:
vbox.pack_start(GrampsWidgets.BasicLabel(value))
eventbox = gtk.EventBox()
eventbox.modify_bg(gtk.STATE_NORMAL, self.color)
eventbox.add(vbox)
self.attach.attach(eventbox, _PDATA_START, _PDATA_STOP,
self.row, self.row+1)
self.row += 1 self.row += 1
def write_child(self, title, handle): def write_child(self, title, handle):
if title: if title:
format = '<span weight="bold">%s: </span>' format = '<span weight="bold">%s: </span>'