9801 Silence remaining PyGIWarning
This commit is contained in:
parent
cc50e4e972
commit
9be31757e0
@ -250,6 +250,8 @@ def show_settings():
|
|||||||
from gi import Repository
|
from gi import Repository
|
||||||
repository = Repository.get_default()
|
repository = Repository.get_default()
|
||||||
if repository.enumerate_versions("OsmGpsMap"):
|
if repository.enumerate_versions("OsmGpsMap"):
|
||||||
|
import gi
|
||||||
|
gi.require_version('OsmGpsMap', '1.0')
|
||||||
from gi.repository import OsmGpsMap as osmgpsmap
|
from gi.repository import OsmGpsMap as osmgpsmap
|
||||||
try:
|
try:
|
||||||
osmgpsmap_str = osmgpsmap._version
|
osmgpsmap_str = osmgpsmap._version
|
||||||
|
@ -384,6 +384,8 @@ try:
|
|||||||
from gi import Repository
|
from gi import Repository
|
||||||
repository = Repository.get_default()
|
repository = Repository.get_default()
|
||||||
if repository.enumerate_versions("GExiv2"):
|
if repository.enumerate_versions("GExiv2"):
|
||||||
|
import gi
|
||||||
|
gi.require_version('GExiv2', '0.10')
|
||||||
from gi.repository import GExiv2
|
from gi.repository import GExiv2
|
||||||
available = True
|
available = True
|
||||||
else:
|
else:
|
||||||
|
@ -32,6 +32,8 @@ import os
|
|||||||
#
|
#
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
from gi.repository import Gtk
|
from gi.repository import Gtk
|
||||||
|
import gi
|
||||||
|
gi.require_version('GExiv2', '0.10')
|
||||||
from gi.repository import GExiv2
|
from gi.repository import GExiv2
|
||||||
|
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
|
@ -28,6 +28,8 @@
|
|||||||
from gramps.gen.lib import EventType
|
from gramps.gen.lib import EventType
|
||||||
import os
|
import os
|
||||||
from gramps.gen.const import HOME_DIR
|
from gramps.gen.const import HOME_DIR
|
||||||
|
import gi
|
||||||
|
gi.require_version('OsmGpsMap', '1.0')
|
||||||
from gi.repository import OsmGpsMap as osmgpsmap
|
from gi.repository import OsmGpsMap as osmgpsmap
|
||||||
|
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
|
@ -60,6 +60,8 @@ import cairo
|
|||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
import gi
|
||||||
|
gi.require_version('OsmGpsMap', '1.0')
|
||||||
from gi.repository import OsmGpsMap as osmgpsmap
|
from gi.repository import OsmGpsMap as osmgpsmap
|
||||||
except:
|
except:
|
||||||
raise
|
raise
|
||||||
|
@ -49,6 +49,8 @@ _LOG = logging.getLogger("maps.dummylayer")
|
|||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
import gi
|
||||||
|
gi.require_version('OsmGpsMap', '1.0')
|
||||||
from gi.repository import OsmGpsMap as osmgpsmap
|
from gi.repository import OsmGpsMap as osmgpsmap
|
||||||
except:
|
except:
|
||||||
raise
|
raise
|
||||||
|
@ -49,6 +49,8 @@ _LOG = logging.getLogger("maps.dummynogps")
|
|||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
import gi
|
||||||
|
gi.require_version('OsmGpsMap', '1.0')
|
||||||
from gi.repository import OsmGpsMap as osmgpsmap
|
from gi.repository import OsmGpsMap as osmgpsmap
|
||||||
except:
|
except:
|
||||||
raise
|
raise
|
||||||
|
@ -62,6 +62,8 @@ from gramps.gui.editors import EditPlace, EditEvent, EditFamily, EditPerson
|
|||||||
from gramps.gui.selectors.selectplace import SelectPlace
|
from gramps.gui.selectors.selectplace import SelectPlace
|
||||||
from gramps.gen.constfunc import conv_to_unicode
|
from gramps.gen.constfunc import conv_to_unicode
|
||||||
|
|
||||||
|
import gi
|
||||||
|
gi.require_version('OsmGpsMap', '1.0')
|
||||||
from gi.repository import OsmGpsMap as osmgpsmap
|
from gi.repository import OsmGpsMap as osmgpsmap
|
||||||
from . import constants
|
from . import constants
|
||||||
from .osmgps import OsmGps
|
from .osmgps import OsmGps
|
||||||
|
@ -63,6 +63,8 @@ from .libkml import Kml
|
|||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
import gi
|
||||||
|
gi.require_version('OsmGpsMap', '1.0')
|
||||||
from gi.repository import OsmGpsMap as osmgpsmap
|
from gi.repository import OsmGpsMap as osmgpsmap
|
||||||
except:
|
except:
|
||||||
raise
|
raise
|
||||||
|
@ -59,6 +59,8 @@ import cairo
|
|||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
import gi
|
||||||
|
gi.require_version('OsmGpsMap', '1.0')
|
||||||
from gi.repository import OsmGpsMap as osmgpsmap
|
from gi.repository import OsmGpsMap as osmgpsmap
|
||||||
except:
|
except:
|
||||||
raise
|
raise
|
||||||
|
@ -67,6 +67,8 @@ _LOG = logging.getLogger("GeoGraphy.markerlayer")
|
|||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
import gi
|
||||||
|
gi.require_version('OsmGpsMap', '1.0')
|
||||||
from gi.repository import OsmGpsMap as osmgpsmap
|
from gi.repository import OsmGpsMap as osmgpsmap
|
||||||
except:
|
except:
|
||||||
raise
|
raise
|
||||||
|
@ -60,6 +60,8 @@ from gi.repository import Pango, PangoCairo
|
|||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
import gi
|
||||||
|
gi.require_version('OsmGpsMap', '1.0')
|
||||||
from gi.repository import OsmGpsMap as osmgpsmap
|
from gi.repository import OsmGpsMap as osmgpsmap
|
||||||
except:
|
except:
|
||||||
raise
|
raise
|
||||||
|
@ -72,6 +72,8 @@ from gramps.gen.constfunc import get_env_var
|
|||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
import gi
|
||||||
|
gi.require_version('OsmGpsMap', '1.0')
|
||||||
from gi.repository import OsmGpsMap as osmgpsmap
|
from gi.repository import OsmGpsMap as osmgpsmap
|
||||||
except:
|
except:
|
||||||
raise
|
raise
|
||||||
|
@ -50,6 +50,8 @@ _LOG = logging.getLogger("maps.selectionlayer")
|
|||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
import gi
|
||||||
|
gi.require_version('OsmGpsMap', '1.0')
|
||||||
from gi.repository import OsmGpsMap as osmgpsmap
|
from gi.repository import OsmGpsMap as osmgpsmap
|
||||||
except:
|
except:
|
||||||
raise
|
raise
|
||||||
|
@ -44,6 +44,8 @@ repository = Repository.get_default()
|
|||||||
if repository.enumerate_versions("OsmGpsMap"):
|
if repository.enumerate_versions("OsmGpsMap"):
|
||||||
try :
|
try :
|
||||||
# current osmgpsmap support GTK3
|
# current osmgpsmap support GTK3
|
||||||
|
import gi
|
||||||
|
gi.require_version('OsmGpsMap', '1.0')
|
||||||
from gi.repository import OsmGpsMap as osmgpsmap
|
from gi.repository import OsmGpsMap as osmgpsmap
|
||||||
if osmgpsmap._version < '0.8':
|
if osmgpsmap._version < '0.8':
|
||||||
_LOG.warning( _("OsmGpsMap module not loaded. "
|
_LOG.warning( _("OsmGpsMap module not loaded. "
|
||||||
|
Loading…
Reference in New Issue
Block a user