Geography: remove redundant class members

This commit is contained in:
zradosłav 2021-02-18 22:44:54 +02:00 committed by Nick Hall
parent 13bff0de47
commit 255d4e4997

View File

@ -183,7 +183,6 @@ class GeoGraphyView(OsmGps, NavigationView):
self.place_list_ref = []
self.select_fct = None
self.geo_mainmap = None
self.reloadtiles = None
theme = Gtk.IconTheme.get_default()
self.geo_mainmap = theme.load_surface('gramps-geo-mainmap', 48, 1,
None, 0)
@ -208,8 +207,6 @@ class GeoGraphyView(OsmGps, NavigationView):
self.menu = None
self.mark = None
self.path_entry = None
self.changemap = None
self.clearmap = None
self.nbplaces = 0
self.nbmarkers = 0
self.place_without_coordinates = []
@ -438,8 +435,7 @@ class GeoGraphyView(OsmGps, NavigationView):
add_item = Gtk.MenuItem(label=title)
menu.append(add_item)
self.changemap = Gtk.Menu()
changemap = self.changemap
changemap = Gtk.Menu()
add_item.set_submenu(changemap)
# show in the map menu all available providers
for my_map in constants.MAP_TYPE:
@ -449,17 +445,15 @@ class GeoGraphyView(OsmGps, NavigationView):
changemap.append(changemapitem)
reload_text = _("Reload all visible tiles for '%(map)s'.") % {
'map': map_name}
self.reloadtiles = Gtk.MenuItem(label=reload_text)
reloadtiles = self.reloadtiles
'map' : map_name}
reloadtiles = Gtk.MenuItem(label=reload_text)
reloadtiles.connect("activate", self.reload_visible_tiles)
menu.append(reloadtiles)
clear_text = _("Clear the '%(map)s' tiles cache.") % {
'map': map_name}
self.clearmap = Gtk.MenuItem(label=clear_text)
clearmap = self.clearmap
'map' : map_name}
clearmap = Gtk.MenuItem(label=clear_text)
clearmap.connect("activate", self.clear_map,
constants.TILES_PATH[config.get(
"geography.map_service")])