|
69 | 69 | from gramps.gen.datehandler import displayer, get_date
|
70 | 70 | from gramps.gen.utils.thumbnails import get_thumbnail_image
|
71 | 71 | from gramps.gen.config import config
|
| 72 | +from gramps.gen.relationship import get_relationship_calculator |
72 | 73 | from gramps.gui import widgets
|
73 | 74 | from gramps.gui.widgets.reorderfam import Reorder
|
74 | 75 | from gramps.gui.widgets.styledtexteditor import StyledTextEditor
|
@@ -1282,7 +1283,10 @@ def write_citation(self, vbox, chandle):
|
1282 | 1283 | citation = self.dbstate.db.get_citation_from_handle(chandle)
|
1283 | 1284 | shandle = citation.get_reference_handle()
|
1284 | 1285 | source = self.dbstate.db.get_source_from_handle(shandle)
|
1285 |
| - heading = source.get_title() + ' ' + citation.get_page() |
| 1286 | + heading = source.get_title() |
| 1287 | + page = citation.get_page() |
| 1288 | + if page: |
| 1289 | + heading += ' \u2022 ' + page |
1286 | 1290 |
|
1287 | 1291 | box = Gtk.Box(orientation=Gtk.Orientation.VERTICAL)
|
1288 | 1292 | url_label = self.get_url(citation)
|
@@ -1431,15 +1435,24 @@ def write_associations(self, person):
|
1431 | 1435 | self.stack.add_titled(scroll, 'associations', _('Associations'))
|
1432 | 1436 |
|
1433 | 1437 | for person_ref in person.get_person_ref_list():
|
1434 |
| - self.write_association(person_ref) |
| 1438 | + self.write_association(person, person_ref) |
1435 | 1439 |
|
1436 | 1440 |
|
1437 |
| - def write_association(self, person_ref): |
| 1441 | + def write_association(self, person1, person_ref): |
1438 | 1442 |
|
1439 | 1443 | vbox = self.write_person('assoc', person_ref.ref)
|
1440 |
| - rel = Gtk.Label(person_ref.rel) |
| 1444 | + |
| 1445 | + assoc = Gtk.Label(_('Association') + _(': ') + person_ref.rel) |
| 1446 | + assoc.set_halign(Gtk.Align.START) |
| 1447 | + vbox.pack_start(assoc, False, False, 0) |
| 1448 | + |
| 1449 | + calc = get_relationship_calculator() |
| 1450 | + person2 = self.dbstate.db.get_person_from_handle(person_ref.ref) |
| 1451 | + rel_txt = calc.get_one_relationship(self.dbstate.db, person1, person2) |
| 1452 | + rel = Gtk.Label(_('Relationship') + _(': ') + rel_txt) |
1441 | 1453 | rel.set_halign(Gtk.Align.START)
|
1442 | 1454 | vbox.pack_start(rel, False, False, 0)
|
| 1455 | + |
1443 | 1456 | eventbox = self.make_dragbox(vbox, 'Person', person_ref.ref)
|
1444 | 1457 | eventbox.show_all()
|
1445 | 1458 | self.vbox2.pack_start(eventbox, False, False, 1)
|
|
0 commit comments