8128: GtkDialog mapped without a transient parent (Geography)
This commit is contained in:
@ -133,7 +133,7 @@ class GeoGraphyView(OsmGps, NavigationView):
|
|||||||
NavigationView.__init__(self, title, pdata, dbstate, uistate,
|
NavigationView.__init__(self, title, pdata, dbstate, uistate,
|
||||||
bm_type, nav_group)
|
bm_type, nav_group)
|
||||||
|
|
||||||
OsmGps.__init__(self)
|
OsmGps.__init__(self, uistate)
|
||||||
self.dbstate = dbstate
|
self.dbstate = dbstate
|
||||||
self.dbstate.connect('database-changed', self.change_db)
|
self.dbstate.connect('database-changed', self.change_db)
|
||||||
self.default_text = "Enter location here!"
|
self.default_text = "Enter location here!"
|
||||||
|
@ -85,7 +85,7 @@ class OsmGps:
|
|||||||
"""
|
"""
|
||||||
This class is used to create a map
|
This class is used to create a map
|
||||||
"""
|
"""
|
||||||
def __init__(self):
|
def __init__(self, uistate):
|
||||||
"""
|
"""
|
||||||
Initialize the map
|
Initialize the map
|
||||||
"""
|
"""
|
||||||
@ -105,6 +105,7 @@ class OsmGps:
|
|||||||
self.end_selection = None
|
self.end_selection = None
|
||||||
self.current_map = None
|
self.current_map = None
|
||||||
self.places_found = None
|
self.places_found = None
|
||||||
|
self.uistate = uistate
|
||||||
|
|
||||||
def build_widget(self):
|
def build_widget(self):
|
||||||
"""
|
"""
|
||||||
@ -116,8 +117,9 @@ class OsmGps:
|
|||||||
try:
|
try:
|
||||||
os.makedirs(cache_path, 0o755) # create dir like mkdir -p
|
os.makedirs(cache_path, 0o755) # create dir like mkdir -p
|
||||||
except:
|
except:
|
||||||
ErrorDialog(_("Can't create " # no-parent
|
ErrorDialog(_("Can't create " # parent-OK
|
||||||
"tiles cache directory %s") % cache_path)
|
"tiles cache directory %s") % cache_path,
|
||||||
|
parent=self.uistate.window)
|
||||||
return self.vbox
|
return self.vbox
|
||||||
|
|
||||||
self.change_map(None, config.get("geography.map_service"))
|
self.change_map(None, config.get("geography.map_service"))
|
||||||
@ -138,9 +140,10 @@ class OsmGps:
|
|||||||
try:
|
try:
|
||||||
os.makedirs(tiles_path, 0o755) # create dir like mkdir -p
|
os.makedirs(tiles_path, 0o755) # create dir like mkdir -p
|
||||||
except:
|
except:
|
||||||
ErrorDialog(_("Can't create " # no-parent
|
ErrorDialog(_("Can't create " # parent-OK
|
||||||
"tiles cache directory for '%s'.") %
|
"tiles cache directory for '%s'.") %
|
||||||
constants.MAP_TITLE[map_type])
|
constants.MAP_TITLE[map_type],
|
||||||
|
parent=self.uistate.window)
|
||||||
config.set("geography.map_service", map_type)
|
config.set("geography.map_service", map_type)
|
||||||
self.current_map = map_type
|
self.current_map = map_type
|
||||||
http_proxy = get_env_var('http_proxy')
|
http_proxy = get_env_var('http_proxy')
|
||||||
|
Reference in New Issue
Block a user