diff --git a/ChangeLog b/ChangeLog index 5dea763d8..e0563049e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2006-07-21 Don Allingham + * src/DataViews/_RelationView.py: provide number for children/siblings + * src/GrampsWidgets.py: fix spacing on link box + 2006-07-20 Don Allingham * src/GrampsWidgets.py: fix spacing on link label diff --git a/src/DataViews/_RelationView.py b/src/DataViews/_RelationView.py index 96ee387cd..1c2c20cb3 100644 --- a/src/DataViews/_RelationView.py +++ b/src/DataViews/_RelationView.py @@ -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): - link_label = GrampsWidgets.LinkLabel(self.get_name(handle, True), + 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( diff --git a/src/GrampsWidgets.py b/src/GrampsWidgets.py index 60574858f..42786dac1 100644 --- a/src/GrampsWidgets.py +++ b/src/GrampsWidgets.py @@ -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)