Correct query for osmgpsmap. glib import removed, is not used

svn: r20310
This commit is contained in:
Benny Malengier 2012-09-02 09:08:31 +00:00
parent 14c05dcba3
commit 9b42432844
2 changed files with 10 additions and 6 deletions

View File

@ -241,11 +241,16 @@ def show_settings():
cairover_str = 'not found'
try:
from gi.repository import OsmGpsMap as osmgpsmap
try:
osmgpsmap_str = osmgpsmap._version
except :# any failure to 'get' the version
osmgpsmap_str = 'unknown version'
from gi import Repository
repository = Repository.get_default()
if repository.enumerate_versions("OsmGpsMap"):
from gi.repository import OsmGpsMap as osmgpsmap
try:
osmgpsmap_str = osmgpsmap._version
except :# any failure to 'get' the version
osmgpsmap_str = 'unknown version'
else:
osmgpsmap_str = 'not found'
except ImportError:
osmgpsmap_str = 'not found'

View File

@ -40,7 +40,6 @@ from gi.repository import Gdk
KEY_TAB = Gdk.KEY_Tab
import socket
from gi.repository import Gtk
import glib
#-------------------------------------------------------------------------
#