removing gtkhtml, cleaning
svn: r11448
This commit is contained in:
parent
9aa7bc6030
commit
1e4f6769b3
@ -55,6 +55,19 @@ import gtk
|
|||||||
import logging
|
import logging
|
||||||
LOG = logging.getLogger(".GeoView")
|
LOG = logging.getLogger(".GeoView")
|
||||||
|
|
||||||
|
#-------------------------------------------------------------------------
|
||||||
|
#
|
||||||
|
# Gramps Modules
|
||||||
|
#
|
||||||
|
#-------------------------------------------------------------------------
|
||||||
|
import gen.lib
|
||||||
|
import ViewManager
|
||||||
|
import PageView
|
||||||
|
import Utils
|
||||||
|
import Errors
|
||||||
|
import Config
|
||||||
|
from BasicUtils import name_displayer as _nd
|
||||||
|
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
# Web interfaces
|
# Web interfaces
|
||||||
@ -71,29 +84,12 @@ try:
|
|||||||
WebKit = 2
|
WebKit = 2
|
||||||
except:
|
except:
|
||||||
pass
|
pass
|
||||||
try:
|
|
||||||
import gtkhtml
|
|
||||||
WebKit = 3
|
|
||||||
except:
|
|
||||||
pass
|
|
||||||
#no interfaces present, raise Error so that options for GeoView do not show
|
#no interfaces present, raise Error so that options for GeoView do not show
|
||||||
if WebKit == 0 :
|
if WebKit == 0 :
|
||||||
|
Config.set(Config.GEOVIEW, False)
|
||||||
LOG.warning(_("GeoView not enabled, no html plugin for GTK found."))
|
LOG.warning(_("GeoView not enabled, no html plugin for GTK found."))
|
||||||
raise ImportError, 'No GTK html plugin found'
|
raise ImportError, 'No GTK html plugin found'
|
||||||
|
|
||||||
#-------------------------------------------------------------------------
|
|
||||||
#
|
|
||||||
# Gramps Modules
|
|
||||||
#
|
|
||||||
#-------------------------------------------------------------------------
|
|
||||||
import gen.lib
|
|
||||||
import ViewManager
|
|
||||||
import PageView
|
|
||||||
import Utils
|
|
||||||
import Errors
|
|
||||||
import Config
|
|
||||||
from BasicUtils import name_displayer as _nd
|
|
||||||
|
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
# Constants
|
# Constants
|
||||||
@ -117,7 +113,6 @@ class GeoView(PageView.PersonNavView):
|
|||||||
global WebKit
|
global WebKit
|
||||||
if (WebKit == 1): LOG.info("GeoView uses WebKit")
|
if (WebKit == 1): LOG.info("GeoView uses WebKit")
|
||||||
elif (WebKit == 2): LOG.info("GeoView uses gtkmozembed")
|
elif (WebKit == 2): LOG.info("GeoView uses gtkmozembed")
|
||||||
elif (WebKit == 3): LOG.info("GeoView uses gtkhtml")
|
|
||||||
|
|
||||||
self.dbstate = dbstate
|
self.dbstate = dbstate
|
||||||
self.usedmap = "openstreetmap"
|
self.usedmap = "openstreetmap"
|
||||||
@ -246,14 +241,6 @@ class GeoView(PageView.PersonNavView):
|
|||||||
self.set_mozembed_proxy()
|
self.set_mozembed_proxy()
|
||||||
self.m = gtkmozembed.MozEmbed()
|
self.m = gtkmozembed.MozEmbed()
|
||||||
self.m.set_size_request(800, 600)
|
self.m.set_size_request(800, 600)
|
||||||
elif (WebKit == 3) :
|
|
||||||
# We use khtml
|
|
||||||
# Never tested. perhaps we should remove this.
|
|
||||||
self.browser=3
|
|
||||||
self.m = gtkhtml.Browser()
|
|
||||||
#self.m.view().resize(800,600);
|
|
||||||
#self.m.setJScriptEnabled(true);
|
|
||||||
#self.m.setPluginsEnabled(true);
|
|
||||||
|
|
||||||
if (WebKit != 0) :
|
if (WebKit != 0) :
|
||||||
self.table_2.add(self.m)
|
self.table_2.add(self.m)
|
||||||
@ -550,7 +537,6 @@ class GeoView(PageView.PersonNavView):
|
|||||||
self.geo += " </script>\n"
|
self.geo += " </script>\n"
|
||||||
else: # openstreetmap and google
|
else: # openstreetmap and google
|
||||||
self.geo += " <script id=\"googleapiimport\" \n"
|
self.geo += " <script id=\"googleapiimport\" \n"
|
||||||
self.geo += " id=\"googleapiimport\" \n"
|
|
||||||
self.geo += " src=\"http://maps.google.com/maps?file=api&v=2\"\n"
|
self.geo += " src=\"http://maps.google.com/maps?file=api&v=2\"\n"
|
||||||
self.geo += " type=\"text/javascript\">\n"
|
self.geo += " type=\"text/javascript\">\n"
|
||||||
self.geo += " </script>\n"
|
self.geo += " </script>\n"
|
||||||
@ -1157,15 +1143,18 @@ class GeoView(PageView.PersonNavView):
|
|||||||
geo += " <title>Geo Maps JavaScript API for Gramps</title>\n"
|
geo += " <title>Geo Maps JavaScript API for Gramps</title>\n"
|
||||||
geo += " </head>\n"
|
geo += " </head>\n"
|
||||||
geo += " <body >\n"
|
geo += " <body >\n"
|
||||||
geo += " <div id=\"map\" style=\"height: %dpx\"></div>\n" % 600
|
geo += " <div id=\"map\" style=\"height: %dpx\">\n" % 600
|
||||||
geo += " <br><br><br><br><br>\n"
|
geo += " <br><br><br><br><br>\n"
|
||||||
geo += " <H4>"
|
geo += " <H4>"
|
||||||
geo += _("You can choose between free and proprietary maps.")
|
geo += _("You can choose between two maps. One free and a second one.")
|
||||||
geo += " <br>"
|
geo += " <br>"
|
||||||
#geo += _("The best choices are the free maps like openstreetmap or openlayers.")
|
|
||||||
geo += _("The best choice is the free map like openstreetmap.")
|
geo += _("The best choice is the free map like openstreetmap.")
|
||||||
geo += " <br>"
|
geo += " <br>"
|
||||||
geo += _("You should use Googlemap only if the other map give no results ...")
|
geo += _("You should use the second map only if the first one give no results ...")
|
||||||
|
geo += " <br>"
|
||||||
|
geo += _("You can select Edit/Preferences to choose the second map provider.")
|
||||||
|
geo += " <br>"
|
||||||
|
geo += _("They are : Googlemaps, Yahoo! maps, Microsoft maps and Openlayers.")
|
||||||
geo += " </H4>"
|
geo += " </H4>"
|
||||||
geo += " </div>\n"
|
geo += " </div>\n"
|
||||||
geo += " </body>\n"
|
geo += " </body>\n"
|
||||||
|
Loading…
Reference in New Issue
Block a user