GeoView : coordinates on all views.

svn: r14352
This commit is contained in:
Serge Noiraud 2010-02-13 15:37:38 +00:00
parent 0ab98a1b11
commit 1896479c83

View File

@ -390,6 +390,7 @@ class GeoView(HtmlView):
'place-update' : self._place_changed} 'place-update' : self._place_changed}
self.init_config() self.init_config()
self.context_id = 0 self.context_id = 0
self.active = False
self.alt_provider = self._config.get('preferences.alternate-provider') self.alt_provider = self._config.get('preferences.alternate-provider')
if self.alt_provider: if self.alt_provider:
self.usedmap = "google" self.usedmap = "google"
@ -745,6 +746,7 @@ class GeoView(HtmlView):
self._goto_active_person) self._goto_active_person)
self._goto_active_person() self._goto_active_person()
self.filter.hide() # hide the filter self.filter.hide() # hide the filter
self.active = True
def set_inactive(self): def set_inactive(self):
""" """
@ -752,6 +754,7 @@ class GeoView(HtmlView):
""" """
HtmlView.set_inactive(self) HtmlView.set_inactive(self)
self.dbstate.disconnect(self.key_active_changed) self.dbstate.disconnect(self.key_active_changed)
self.active = False
def get_stock(self): def get_stock(self):
""" """
@ -774,6 +777,7 @@ class GeoView(HtmlView):
Then we can get the new title with the new values. Then we can get the new title with the new values.
""" """
res = self.dbstate.db.get_researcher() res = self.dbstate.db.get_researcher()
title = None
if res: # Don't modify the current values if no db is loaded. if res: # Don't modify the current values if no db is loaded.
start = 0 start = 0
try: try:
@ -788,13 +792,15 @@ class GeoView(HtmlView):
except: # pylint: disable-msg=W0704 except: # pylint: disable-msg=W0704
pass # pylint: disable-msg=W0702 pass # pylint: disable-msg=W0702
if timeloop: if timeloop:
if title: if self.active:
self.uistate.status.pop(self.context_id) if title != None:
mess = "lon = %s \tlat = %s\tzoom = %s" % ( self.reallatitude, self.uistate.status.pop(self.context_id)
self.reallongitude, mess = "lon= %s \tlat= %s\tzoom= %s" % ( self.reallatitude,
self.realzoom) self.reallongitude,
self.context_id = self.uistate.status.push(1, mess) self.realzoom)
gobject.timeout_add(timeloop, self._savezoomandposition, timeloop) self.context_id = self.uistate.status.push(1, mess)
gobject.timeout_add(timeloop,
self._savezoomandposition, timeloop)
def _do_we_need_to_zoom_between_map(self): def _do_we_need_to_zoom_between_map(self):
""" """