From 1e4f6769b3bbcf08f9e70464ac0128420e2a495d Mon Sep 17 00:00:00 2001 From: Serge Noiraud Date: Tue, 9 Dec 2008 07:26:03 +0000 Subject: [PATCH] removing gtkhtml, cleaning svn: r11448 --- src/DataViews/GeoView.py | 53 ++++++++++++++++------------------------ 1 file changed, 21 insertions(+), 32 deletions(-) diff --git a/src/DataViews/GeoView.py b/src/DataViews/GeoView.py index 2f41a7533..0b001ff01 100644 --- a/src/DataViews/GeoView.py +++ b/src/DataViews/GeoView.py @@ -55,6 +55,19 @@ import gtk import logging 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 @@ -71,29 +84,12 @@ try: WebKit = 2 except: pass -try: - import gtkhtml - WebKit = 3 -except: - pass #no interfaces present, raise Error so that options for GeoView do not show if WebKit == 0 : + Config.set(Config.GEOVIEW, False) LOG.warning(_("GeoView not enabled, no html plugin for GTK 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 @@ -117,7 +113,6 @@ class GeoView(PageView.PersonNavView): global WebKit if (WebKit == 1): LOG.info("GeoView uses WebKit") elif (WebKit == 2): LOG.info("GeoView uses gtkmozembed") - elif (WebKit == 3): LOG.info("GeoView uses gtkhtml") self.dbstate = dbstate self.usedmap = "openstreetmap" @@ -246,14 +241,6 @@ class GeoView(PageView.PersonNavView): self.set_mozembed_proxy() self.m = gtkmozembed.MozEmbed() 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) : self.table_2.add(self.m) @@ -550,7 +537,6 @@ class GeoView(PageView.PersonNavView): self.geo += " \n" else: # openstreetmap and google self.geo += " \n" @@ -1157,15 +1143,18 @@ class GeoView(PageView.PersonNavView): geo += " Geo Maps JavaScript API for Gramps\n" geo += " \n" geo += " \n" - geo += "
\n" % 600 + geo += "
\n" % 600 geo += "




\n" geo += "

" - geo += _("You can choose between free and proprietary maps.") + geo += _("You can choose between two maps. One free and a second one.") geo += "
" - #geo += _("The best choices are the free maps like openstreetmap or openlayers.") geo += _("The best choice is the free map like openstreetmap.") geo += "
" - 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 += "
" + geo += _("You can select Edit/Preferences to choose the second map provider.") + geo += "
" + geo += _("They are : Googlemaps, Yahoo! maps, Microsoft maps and Openlayers.") geo += "

" geo += "
\n" geo += " \n"