9527: Configuration of 'Enclosing' and 'Enclosed by' Date gramplets to show Place IDs

This commit is contained in:
SNoiraud 2016-06-18 12:07:08 +02:00
parent e32fc6e761
commit 2d7089ec60

View File

@ -83,7 +83,8 @@ class Locations(Gramplet, DbGUIElement):
titles = [('', 0, 50), titles = [('', 0, 50),
(_('Name'), 1, 300), (_('Name'), 1, 300),
(_('Type'), 2, 150), (_('Type'), 2, 150),
(_('Date'), 4, 150), (_('Date'), 3, 150),
(_('ID'), 4, 100),
('', NOSORT, 50)] ('', NOSORT, 50)]
self.model = ListModel(top, titles, list_mode="tree", self.model = ListModel(top, titles, list_mode="tree",
event_func=self.edit_place) event_func=self.edit_place)
@ -133,11 +134,13 @@ class Locations(Gramplet, DbGUIElement):
place_sort = '%012d' % placeref.get_date_object().get_sort_value() place_sort = '%012d' % placeref.get_date_object().get_sort_value()
place_name = place.get_name().get_value() place_name = place.get_name().get_value()
place_type = str(place.get_type()) place_type = str(place.get_type())
place_id = place.get_gramps_id()
new_node = self.model.add([place.handle, new_node = self.model.add([place.handle,
place_name, place_name,
place_type, place_type,
place_date, place_date,
place_id,
place_sort], place_sort],
node=node) node=node)