9704: Events coordinates : add place ID.
This commit is contained in:
parent
5eb348f815
commit
8258e6a399
@ -88,8 +88,9 @@ class GeoEvents(Gramplet, DbGUIElement):
|
|||||||
(_('Date'), 3, 160),
|
(_('Date'), 3, 160),
|
||||||
('', NOSORT, 50),
|
('', NOSORT, 50),
|
||||||
(_('Place'), 4, 300),
|
(_('Place'), 4, 300),
|
||||||
(_('Latitude'), 5, 130),
|
(_('Id'), 5, 80),
|
||||||
(_('Longitude'), 6, 130)
|
(_('Latitude'), 6, 130),
|
||||||
|
(_('Longitude'), 7, 130),
|
||||||
]
|
]
|
||||||
self.model = ListModel(top, titles, event_func=self.edit_event)
|
self.model = ListModel(top, titles, event_func=self.edit_event)
|
||||||
return top
|
return top
|
||||||
@ -104,10 +105,11 @@ class GeoEvents(Gramplet, DbGUIElement):
|
|||||||
event_sort = '%012d' % event.get_date_object().get_sort_value()
|
event_sort = '%012d' % event.get_date_object().get_sort_value()
|
||||||
place_name = place_displayer.display_event(self.dbstate.db, event)
|
place_name = place_displayer.display_event(self.dbstate.db, event)
|
||||||
place_handle = event.get_place_handle()
|
place_handle = event.get_place_handle()
|
||||||
latitude = longitude = ""
|
place_id = latitude = longitude = ""
|
||||||
if place_handle:
|
if place_handle:
|
||||||
plc = self.dbstate.db.get_place_from_handle(place_handle)
|
plc = self.dbstate.db.get_place_from_handle(place_handle)
|
||||||
if plc:
|
if plc:
|
||||||
|
place_id = plc.get_gramps_id()
|
||||||
latitude = plc.get_latitude()
|
latitude = plc.get_latitude()
|
||||||
longitude = plc.get_longitude()
|
longitude = plc.get_longitude()
|
||||||
latitude, longitude = conv_lat_lon(latitude, longitude, "D.D8")
|
latitude, longitude = conv_lat_lon(latitude, longitude, "D.D8")
|
||||||
@ -122,6 +124,7 @@ class GeoEvents(Gramplet, DbGUIElement):
|
|||||||
event_date,
|
event_date,
|
||||||
event_sort,
|
event_sort,
|
||||||
place_name,
|
place_name,
|
||||||
|
place_id,
|
||||||
latitude,
|
latitude,
|
||||||
longitude
|
longitude
|
||||||
))
|
))
|
||||||
|
@ -1307,7 +1307,7 @@ register(GRAMPLET,
|
|||||||
fname="coordinates.py",
|
fname="coordinates.py",
|
||||||
height=200,
|
height=200,
|
||||||
gramplet = 'GeoPersonEvents',
|
gramplet = 'GeoPersonEvents',
|
||||||
gramplet_title=_("Coordinates"),
|
gramplet_title=_("Events Coordinates"),
|
||||||
navtypes=["Person"],
|
navtypes=["Person"],
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -1321,6 +1321,6 @@ register(GRAMPLET,
|
|||||||
fname="coordinates.py",
|
fname="coordinates.py",
|
||||||
height=200,
|
height=200,
|
||||||
gramplet = 'GeoFamilyEvents',
|
gramplet = 'GeoFamilyEvents',
|
||||||
gramplet_title=_("Coordinates"),
|
gramplet_title=_("Events Coordinates"),
|
||||||
navtypes=["Family"],
|
navtypes=["Family"],
|
||||||
)
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user