8981 Specify required GtkSpell and GExiv2 version

This commit is contained in:
Sam Manzi 2016-04-23 10:17:52 +10:00
parent c27f663137
commit 230c9d6bd0
No known key found for this signature in database
GPG Key ID: F4A16068AE36B402
2 changed files with 6 additions and 0 deletions

View File

@ -251,6 +251,8 @@ def show_settings():
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
try:
gexiv2_str = GExiv2._version

View File

@ -58,12 +58,16 @@ HAVE_GTKSPELL = False
repository = Repository.get_default()
if repository.enumerate_versions("GtkSpell"):
try:
import gi
gi.require_version('GtkSpell', '3.0')
from gi.repository import GtkSpell as Gtkspell
HAVE_GTKSPELL = True
except:
pass
elif repository.enumerate_versions("Gtkspell"):
try:
import gi
gi.require_version('GtkSpell', '3.0')
from gi.repository import Gtkspell
HAVE_GTKSPELL = True
except: