Geography : 0008982: Gobject Instrospection displays a warning and ask to set a version to load.

This commit is contained in:
SNoiraud 2015-10-12 14:59:09 +02:00
parent 78fef48559
commit 81eda27f5d
12 changed files with 25 additions and 7 deletions

View File

@ -28,6 +28,8 @@
from gramps.gen.lib import EventType
import os
from gramps.gen.const import HOME_DIR
import gi
gi.require_version('OsmGpsMap', '1.0')
from gi.repository import OsmGpsMap as osmgpsmap
#-------------------------------------------------------------------------

View File

@ -60,6 +60,8 @@ import cairo
#-------------------------------------------------------------------------
try:
import gi
gi.require_version('OsmGpsMap', '1.0')
from gi.repository import OsmGpsMap as osmgpsmap
except:
raise

View File

@ -49,6 +49,8 @@ _LOG = logging.getLogger("maps.dummylayer")
#-------------------------------------------------------------------------
try:
import gi
gi.require_version('OsmGpsMap', '1.0')
from gi.repository import OsmGpsMap as osmgpsmap
except:
raise

View File

@ -49,6 +49,8 @@ _LOG = logging.getLogger("maps.dummynogps")
#-------------------------------------------------------------------------
try:
import gi
gi.require_version('OsmGpsMap', '1.0')
from gi.repository import OsmGpsMap as osmgpsmap
except:
raise

View File

@ -62,6 +62,8 @@ from gramps.gui.editors import EditPlace, EditEvent, EditFamily, EditPerson
from gramps.gui.selectors.selectplace import SelectPlace
from gramps.gen.constfunc import conv_to_unicode
import gi
gi.require_version('OsmGpsMap', '1.0')
from gi.repository import OsmGpsMap as osmgpsmap
from . import constants
from .osmgps import OsmGps

View File

@ -63,6 +63,8 @@ from .libkml import Kml
#-------------------------------------------------------------------------
try:
import gi
gi.require_version('OsmGpsMap', '1.0')
from gi.repository import OsmGpsMap as osmgpsmap
except:
raise

View File

@ -59,6 +59,8 @@ import cairo
#-------------------------------------------------------------------------
try:
import gi
gi.require_version('OsmGpsMap', '1.0')
from gi.repository import OsmGpsMap as osmgpsmap
except:
raise

View File

@ -67,6 +67,8 @@ _LOG = logging.getLogger("GeoGraphy.markerlayer")
#-------------------------------------------------------------------------
try:
import gi
gi.require_version('OsmGpsMap', '1.0')
from gi.repository import OsmGpsMap as osmgpsmap
except:
raise

View File

@ -60,6 +60,8 @@ from gi.repository import Pango, PangoCairo
#-------------------------------------------------------------------------
try:
import gi
gi.require_version('OsmGpsMap', '1.0')
from gi.repository import OsmGpsMap as osmgpsmap
except:
raise

View File

@ -72,6 +72,8 @@ from gramps.gen.constfunc import get_env_var
#-------------------------------------------------------------------------
try:
import gi
gi.require_version('OsmGpsMap', '1.0')
from gi.repository import OsmGpsMap as osmgpsmap
except:
raise

View File

@ -50,6 +50,8 @@ _LOG = logging.getLogger("maps.selectionlayer")
#-------------------------------------------------------------------------
try:
import gi
gi.require_version('OsmGpsMap', '1.0')
from gi.repository import OsmGpsMap as osmgpsmap
except:
raise

View File

@ -44,14 +44,10 @@ repository = Repository.get_default()
if repository.enumerate_versions("OsmGpsMap"):
try :
# current osmgpsmap support GTK3
import gi
gi.require_version('OsmGpsMap', '1.0')
from gi.repository import OsmGpsMap as osmgpsmap
if osmgpsmap._version < '0.8':
_LOG.warning( _("OsmGpsMap module not loaded. "
"OsmGpsMap must be >= 0.8. yours is %s") %
osmgpsmap._version)
else:
OSMGPSMAP = True
_LOG.info("OsmGpsMap loaded, version : " + osmgpsmap._version)
OSMGPSMAP = True
except:
pass