2006-07-21 Don Allingham <don@gramps-project.org>

* src/DataViews/_RelationView.py: provide number for children/siblings
	* src/GrampsWidgets.py: fix spacing on link box



svn: r7054
This commit is contained in:
Don Allingham 2006-07-22 04:12:09 +00:00
parent 731d4d80f7
commit 10f6d9aaa9
3 changed files with 22 additions and 7 deletions

View File

@ -1,3 +1,7 @@
2006-07-21 Don Allingham <don@gramps-project.org>
* src/DataViews/_RelationView.py: provide number for children/siblings
* src/GrampsWidgets.py: fix spacing on link box
2006-07-20 Don Allingham <don@gramps-project.org>
* src/GrampsWidgets.py: fix spacing on link label

View File

@ -559,8 +559,10 @@ class RelationshipView(PageView.PersonNavView):
self.row+1, xoptions=gtk.FILL|gtk.SHRINK,
yoptions=gtk.FILL)
i = 1
for child_handle in child_list:
self.write_child(vbox, child_handle)
self.write_child(vbox, child_handle, i)
i += 1
eventbox.add(vbox)
self.attach.attach(
@ -620,20 +622,27 @@ class RelationshipView(PageView.PersonNavView):
return GrampsWidgets.MarkupLabel(format % cgi.escape(title))
def write_child(self, vbox, handle):
def write_child(self, vbox, handle, index):
link_label = GrampsWidgets.LinkLabel(self.get_name(handle, True),
self.button_press, handle)
if self.use_shade:
link_label.modify_bg(gtk.STATE_NORMAL, self.color)
link_label.set_padding(3, 0)
button = GrampsWidgets.IconButton(self.edit_button_press, handle)
vbox.pack_start(GrampsWidgets.LinkBox(link_label, button))
hbox = gtk.HBox()
hbox.pack_start(GrampsWidgets.BasicLabel("%d." % index),
False, False, 0)
hbox.pack_start(GrampsWidgets.LinkBox(link_label, button),
False, False, 4)
hbox.show()
vbox.pack_start(hbox)
if self.show_details:
value = self.info_string(handle)
if value:
l = GrampsWidgets.BasicLabel(value)
l.set_padding(3, 0)
l.set_padding(16, 0)
vbox.add(l)
def write_data(self, box, title, start_col=_SDATA_START,
@ -744,8 +753,10 @@ class RelationshipView(PageView.PersonNavView):
self.row+1, xoptions=gtk.FILL|gtk.SHRINK,
yoptions=gtk.FILL)
i = 1
for child_ref in child_list:
self.write_child(vbox, child_ref.ref)
self.write_child(vbox, child_ref.ref, i)
i += 1
eventbox.add(vbox)
self.attach.attach(

View File

@ -59,7 +59,7 @@ class LinkLabel(gtk.EventBox):
self.label.set_alignment(0, 0.5)
hbox = gtk.HBox()
hbox.pack_start(self.label, False, False, 4)
hbox.pack_start(self.label, False, False, 0)
if label[1]:
hbox.pack_start(GenderLabel(label[1]), False, False, 4)
self.add(hbox)