9801 Silence remaining PyGIWarning
This commit is contained in:
parent
cc50e4e972
commit
9be31757e0
@ -250,6 +250,8 @@ def show_settings():
|
||||
from gi import Repository
|
||||
repository = Repository.get_default()
|
||||
if repository.enumerate_versions("OsmGpsMap"):
|
||||
import gi
|
||||
gi.require_version('OsmGpsMap', '1.0')
|
||||
from gi.repository import OsmGpsMap as osmgpsmap
|
||||
try:
|
||||
osmgpsmap_str = osmgpsmap._version
|
||||
|
@ -384,6 +384,8 @@ try:
|
||||
from gi import Repository
|
||||
repository = Repository.get_default()
|
||||
if repository.enumerate_versions("GExiv2"):
|
||||
import gi
|
||||
gi.require_version('GExiv2', '0.10')
|
||||
from gi.repository import GExiv2
|
||||
available = True
|
||||
else:
|
||||
|
@ -32,6 +32,8 @@ import os
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
from gi.repository import Gtk
|
||||
import gi
|
||||
gi.require_version('GExiv2', '0.10')
|
||||
from gi.repository import GExiv2
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
|
@ -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,6 +44,8 @@ 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. "
|
||||
|
Loading…
Reference in New Issue
Block a user