polish geoview

svn: r11736
This commit is contained in:
Benny Malengier 2009-01-26 21:26:20 +00:00
parent 0b0253f6ef
commit cb3817e6f4

View File

@ -295,8 +295,8 @@ class HtmlView(PageView.PageView):
with an embedded webbrowser showing a given URL with an embedded webbrowser showing a given URL
""" """
def __init__(self, dbstate, uistate): def __init__(self, dbstate, uistate, title=_('HtmlView')):
PageView.PageView.__init__(self, _('HtmlView'), dbstate, uistate) PageView.PageView.__init__(self, title, dbstate, uistate)
self.dbstate = dbstate self.dbstate = dbstate
@ -512,13 +512,19 @@ class HtmlView(PageView.PageView):
class GeoView(HtmlView): class GeoView(HtmlView):
def __init__(self,dbstate,uistate): def __init__(self,dbstate,uistate):
HtmlView.__init__(self, dbstate, uistate) HtmlView.__init__(self, dbstate, uistate, title=_('GeoView'))
self.usedmap = "openstreetmap" self.usedmap = "openstreetmap"
self.displaytype = "person" self.displaytype = "person"
self.nbmarkers = 0 self.nbmarkers = 0
self.nbpages = 0 self.nbpages = 0
def top_widget(self):
"""
The top widget to use, for GeoView, none
"""
return gtk.Label()
def on_delete(self): def on_delete(self):
""" """
We need to suppress temporary files here. We need to suppress temporary files here.
@ -967,6 +973,8 @@ class GeoView(HtmlView):
# We center the map on a point at the center of all markers # We center the map on a point at the center of all markers
self.centerlat = maxlat/2 self.centerlat = maxlat/2
self.centerlon = maxlong/2 self.centerlon = maxlong/2
latit = self.centerlat
longt = self.centerlon
for mark in self.sort: for mark in self.sort:
cent = int(mark[6]) cent = int(mark[6])
if cent: if cent: