GeoView : issue 4547 : applying const.WEBSTUFF_DIR

svn: r16488
This commit is contained in:
Serge Noiraud 2011-01-27 19:07:40 +00:00
parent d0083b4777
commit 4501c0b6bd

View File

@ -447,8 +447,7 @@ class GeoView(HtmlView):
self.already_testing = False self.already_testing = False
self.alt_provider = self._config.get('preferences.alternate-provider') self.alt_provider = self._config.get('preferences.alternate-provider')
self.usedmap = "googlev3" if self.alt_provider else "openlayers" self.usedmap = "googlev3" if self.alt_provider else "openlayers"
fpath = os.path.join(const.ROOT_DIR, 'plugins/webstuff/images', fpath = os.path.join(const.WEBSTUFF_DIR, 'images', 'crosshairs.png')
'crosshairs.png')
self.crosspath = urlparse.urlunsplit( self.crosspath = urlparse.urlunsplit(
('file', '', URL_SEP.join(fpath.split(os.sep)), '', '') ('file', '', URL_SEP.join(fpath.split(os.sep)), '', '')
) )
@ -1800,7 +1799,7 @@ class GeoView(HtmlView):
"css" : self._add_stylesheet() "css" : self._add_stylesheet()
} }
) )
fpath = os.path.join(const.ROOT_DIR, 'plugins/webstuff/js/mapstraction', fpath = os.path.join(const.WEBSTUFF_DIR, 'js/mapstraction',
"mxn.js?(googlev3,openlayers)") "mxn.js?(googlev3,openlayers)")
upath = urlparse.urlunsplit( upath = urlparse.urlunsplit(
('file', '', URL_SEP.join(fpath.split(os.sep)), '', '') ('file', '', URL_SEP.join(fpath.split(os.sep)), '', '')
@ -2034,7 +2033,7 @@ class GeoView(HtmlView):
value = 'gramps-geo-default' # we use default icon. value = 'gramps-geo-default' # we use default icon.
if ( value == "gramps-geo-default" ): if ( value == "gramps-geo-default" ):
value = value.replace("default",'" + default_icon + "') value = value.replace("default",'" + default_icon + "')
ipath = os.path.join(const.ROOT_DIR, 'plugins/webstuff/images', '%s.png' % value ) ipath = os.path.join(const.WEBSTUFF_DIR, 'images', '%s.png' % value )
upath = urlparse.urlunsplit(('file', '', upath = urlparse.urlunsplit(('file', '',
URL_SEP.join(ipath.split(os.sep)), '', '')) URL_SEP.join(ipath.split(os.sep)), '', ''))
# Workaround to avoid a drift problem with openlayers. # Workaround to avoid a drift problem with openlayers.
@ -2542,10 +2541,7 @@ class GeoView(HtmlView):
dblp = '<link media="screen" ' dblp = '<link media="screen" '
delp = 'type="text/css" rel="stylesheet" />\n' delp = 'type="text/css" rel="stylesheet" />\n'
# Get the GeoView stylesheet. # Get the GeoView stylesheet.
cpath = os.path.join(const.ROOT_DIR, cpath = os.path.join(const.WEBSTUFF_DIR, 'css', 'GeoView.css')
'plugins/webstuff/css',
'GeoView.css'
)
gpath = urlparse.urlunsplit(('file', '', gpath = urlparse.urlunsplit(('file', '',
URL_SEP.join(cpath.split(os.sep)), URL_SEP.join(cpath.split(os.sep)),
'', '')) '', ''))