forked from openlp/openlp
A fix to the OSIS importer, and added the version file.
bzr-revno: 721
This commit is contained in:
commit
e0acec1274
@ -32,6 +32,7 @@ from logging import FileHandler
|
|||||||
from optparse import OptionParser
|
from optparse import OptionParser
|
||||||
from PyQt4 import QtCore, QtGui
|
from PyQt4 import QtCore, QtGui
|
||||||
|
|
||||||
|
import openlp
|
||||||
from openlp.core.lib import Receiver, str_to_bool
|
from openlp.core.lib import Receiver, str_to_bool
|
||||||
from openlp.core.resources import qInitResources
|
from openlp.core.resources import qInitResources
|
||||||
from openlp.core.ui import MainWindow, SplashScreen, ScreenList
|
from openlp.core.ui import MainWindow, SplashScreen, ScreenList
|
||||||
@ -77,8 +78,8 @@ class OpenLP(QtGui.QApplication):
|
|||||||
Run the OpenLP application.
|
Run the OpenLP application.
|
||||||
"""
|
"""
|
||||||
#Load and store current Application Version
|
#Load and store current Application Version
|
||||||
filepath = os.path.split(os.path.abspath(__file__))[0]
|
filepath = os.path.split(os.path.abspath(openlp.__file__))[0]
|
||||||
filepath = os.path.abspath(os.path.join(filepath, u'version.txt'))
|
filepath = os.path.abspath(os.path.join(filepath, u'.version'))
|
||||||
fversion = None
|
fversion = None
|
||||||
try:
|
try:
|
||||||
fversion = open(filepath, u'r')
|
fversion = open(filepath, u'r')
|
||||||
|
@ -1 +1 @@
|
|||||||
1.9.0-bzr720
|
1.9.0-bzr721
|
||||||
|
@ -30,6 +30,8 @@ import chardet
|
|||||||
import codecs
|
import codecs
|
||||||
import re
|
import re
|
||||||
|
|
||||||
|
from PyQt4 import QtCore
|
||||||
|
|
||||||
from openlp.core.lib import Receiver
|
from openlp.core.lib import Receiver
|
||||||
from db import BibleDB
|
from db import BibleDB
|
||||||
|
|
||||||
@ -94,10 +96,11 @@ class OSISBible(BibleDB):
|
|||||||
Loads a Bible from file.
|
Loads a Bible from file.
|
||||||
"""
|
"""
|
||||||
log.debug(u'Starting OSIS import from "%s"' % self.filename)
|
log.debug(u'Starting OSIS import from "%s"' % self.filename)
|
||||||
|
self.wizard.incrementProgressBar(u'Detecting encoding (this may take a few minutes)...')
|
||||||
detect_file = None
|
detect_file = None
|
||||||
try:
|
try:
|
||||||
detect_file = open(self.filename, u'r')
|
detect_file = open(self.filename, u'r')
|
||||||
details = chardet.detect(detect_file.read(3000))
|
details = chardet.detect(detect_file.read())
|
||||||
except:
|
except:
|
||||||
log.exception(u'Failed to detect OSIS file encoding')
|
log.exception(u'Failed to detect OSIS file encoding')
|
||||||
return
|
return
|
||||||
|
@ -1 +1 @@
|
|||||||
1.9.0-720
|
1.9.0-721
|
||||||
|
Loading…
Reference in New Issue
Block a user