Geography : 0008982: Gobject Instrospection displays a warning and ask to set a version to load.
This commit is contained in:
parent
78fef48559
commit
81eda27f5d
@ -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
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
|
@ -60,6 +60,8 @@ import cairo
|
||||
#-------------------------------------------------------------------------
|
||||
|
||||
try:
|
||||
import gi
|
||||
gi.require_version('OsmGpsMap', '1.0')
|
||||
from gi.repository import OsmGpsMap as osmgpsmap
|
||||
except:
|
||||
raise
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -59,6 +59,8 @@ import cairo
|
||||
#-------------------------------------------------------------------------
|
||||
|
||||
try:
|
||||
import gi
|
||||
gi.require_version('OsmGpsMap', '1.0')
|
||||
from gi.repository import OsmGpsMap as osmgpsmap
|
||||
except:
|
||||
raise
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user