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