GeoView : add signal when places are added. thanks nick.

svn: r13889
This commit is contained in:
Serge Noiraud 2009-12-23 07:06:44 +00:00
parent 172988ff36
commit a8e5f3acf9

View File

@ -322,6 +322,11 @@ class GeoView(HtmlView):
self.without_coord_file = os.path.join(GEOVIEW_SUBPATH,
"without_coord.html")
self.endinit = False
self.signal_map = {'place-add': self._place_added}
def _place_added(self, handle_list):
self.displaytype = "places"
self._geo_places()
def top_widget(self):
"""
@ -920,7 +925,7 @@ class GeoView(HtmlView):
self.displaytype = "event"
self._geo_places()
def _new_database(self, *args): # pylint: disable-msg=W0613
def _new_database(self, db):
"""
We just change the database.
Restore the initial config. Is it good ?
@ -932,6 +937,9 @@ class GeoView(HtmlView):
config.get('geoview.latitude'),
config.get('geoview.longitude'),
"D.D8")
self._change_db(db)
for sig in self.signal_map:
self.callman.add_db_signal(sig, self.signal_map[sig])
def _geo_places(self):
"""