This commit is contained in:
Tim Bentley 2010-03-27 20:28:04 +00:00
commit 68a0cd06e5
12 changed files with 169 additions and 46 deletions

View File

@ -92,16 +92,23 @@ class OpenLP(QtGui.QApplication):
app_version = { app_version = {
u'full': full_version, u'full': full_version,
u'version': bits[0], u'version': bits[0],
u'build': bits[1] u'build': bits[1] if len(bits) > 1 else None
} }
log.info(u'Openlp version %s build %s' % ( if app_version[u'build']:
app_version[u'version'], app_version[u'build'])) log.info(
u'Openlp version %s build %s',
app_version[u'version'],
app_version[u'build']
)
else:
log.info(u'Openlp version %s' % app_version[u'version'])
except: except:
app_version = { log.exception('Error in version file.')
u'full': u'1.9.0-bzr000', app_version = {
u'version': u'1.9.0', u'full': u'1.9.0-bzr000',
u'build': u'bzr000' u'version': u'1.9.0',
} u'build': u'bzr000'
}
finally: finally:
if fversion: if fversion:
fversion.close() fversion.close()

View File

@ -1 +1 @@
1.9.0-bzr743 1.9.0

View File

@ -115,7 +115,7 @@ class Ui_AboutDialog(object):
def retranslateUi(self, AboutDialog): def retranslateUi(self, AboutDialog):
AboutDialog.setWindowTitle(self.trUtf8('About OpenLP')) AboutDialog.setWindowTitle(self.trUtf8('About OpenLP'))
self.AboutTextEdit.setPlainText(self.trUtf8( self.AboutTextEdit.setPlainText(self.trUtf8(
'OpenLP <version> build <revision> - Open Source Lyrics ' 'OpenLP <version><revision> - Open Source Lyrics '
'Projection\n' 'Projection\n'
'\n' '\n'
'OpenLP is free church presentation software, or lyrics ' 'OpenLP is free church presentation software, or lyrics '
@ -166,9 +166,9 @@ class Ui_AboutDialog(object):
self.AboutNotebook.indexOf(self.CreditsTab), self.AboutNotebook.indexOf(self.CreditsTab),
self.trUtf8('Credits')) self.trUtf8('Credits'))
self.LicenseTextEdit.setPlainText(self.trUtf8( self.LicenseTextEdit.setPlainText(self.trUtf8(
'Copyright ' + u'\u00a9'.encode('utf8') + ' 2004-2009 Raoul ' 'Copyright ' + u'\u00a9'.encode('utf8') + ' 2004-2010 Raoul '
'Snyman\n' 'Snyman\n'
'Portions copyright ' + u'\u00a9'.encode('utf8') + ' 2004-2009 ' 'Portions copyright ' + u'\u00a9'.encode('utf8') + ' 2004-2010 '
'Tim Bentley, Jonathan Corwin, Michael Gorven, Scott Guerrieri, ' 'Tim Bentley, Jonathan Corwin, Michael Gorven, Scott Guerrieri, '
'Christian Richter, Maikel Stuivenberg, Martin Thompson, Jon ' 'Christian Richter, Maikel Stuivenberg, Martin Thompson, Jon '
'Tibble, Carsten Tinggaard\n' 'Tibble, Carsten Tinggaard\n'

View File

@ -39,11 +39,16 @@ class AboutForm(QtGui.QDialog, Ui_AboutDialog):
QtGui.QDialog.__init__(self, parent) QtGui.QDialog.__init__(self, parent)
self.applicationVersion = applicationVersion self.applicationVersion = applicationVersion
self.setupUi(self) self.setupUi(self)
self.AboutTextEdit.setPlainText( about_text = self.AboutTextEdit.toPlainText()
self.AboutTextEdit.toPlainText()\ about_text = about_text.replace(u'<version>',
.replace(u'<version>', self.applicationVersion[u'version'])\ self.applicationVersion[u'version'])
.replace(u'<revision>', self.applicationVersion[u'build']) if self.applicationVersion[u'build']:
) build_text = u' %s %s' % (self.trUtf8('build'),
self.applicationVersion[u'build'])
else:
build_text = u''
about_text = about_text.replace(u'<revision>', build_text)
self.AboutTextEdit.setPlainText(about_text)
QtCore.QObject.connect(self.ContributeButton, QtCore.QObject.connect(self.ContributeButton,
QtCore.SIGNAL(u'clicked()'), self.onContributeButtonClicked) QtCore.SIGNAL(u'clicked()'), self.onContributeButtonClicked)

View File

@ -71,7 +71,7 @@ class VersionThread(QtCore.QThread):
Receiver.send_message(u'blank_check') Receiver.send_message(u'blank_check')
version = check_latest_version(self.generalConfig, self.app_version) version = check_latest_version(self.generalConfig, self.app_version)
#new version has arrived #new version has arrived
if version != self.app_version: if version != self.app_version[u'full']:
Receiver.send_message(u'version_check', u'%s' % version) Receiver.send_message(u'version_check', u'%s' % version)
@ -554,11 +554,12 @@ class MainWindow(QtGui.QMainWindow, Ui_MainWindow):
Checks the version of the Application called from openlp.pyw Checks the version of the Application called from openlp.pyw
""" """
app_version = self.applicationVersion[u'full'] app_version = self.applicationVersion[u'full']
version_text = unicode(self.trUtf8('OpenLP version %s has been updated ' version_text = unicode(self.trUtf8('Version %s of OpenLP is now '
'to version %s\n\nYou can obtain the latest version from http://openlp.org')) 'available for download (you are currently running version %s).'
'\n\nYou can download the latest version from http://openlp.org'))
QtGui.QMessageBox.question(self, QtGui.QMessageBox.question(self,
self.trUtf8('OpenLP Version Updated'), self.trUtf8('OpenLP Version Updated'),
version_text % (app_version, version), version_text % (version, app_version),
QtGui.QMessageBox.StandardButtons(QtGui.QMessageBox.Ok), QtGui.QMessageBox.StandardButtons(QtGui.QMessageBox.Ok),
QtGui.QMessageBox.Ok) QtGui.QMessageBox.Ok)
@ -597,8 +598,8 @@ class MainWindow(QtGui.QMainWindow, Ui_MainWindow):
QtGui.QMessageBox.Ok) QtGui.QMessageBox.Ok)
def versionThread(self): def versionThread(self):
app_version = self.applicationVersion[u'full'] #app_version = self.applicationVersion[u'full']
vT = VersionThread(self, app_version, self.generalConfig) vT = VersionThread(self, self.applicationVersion, self.generalConfig)
vT.start() vT.start()
def onHelpAboutItemClicked(self): def onHelpAboutItemClicked(self):

View File

@ -29,6 +29,8 @@ import logging
import urllib2 import urllib2
from datetime import datetime from datetime import datetime
from PyQt4 import QtCore
import openlp import openlp
log = logging.getLogger(__name__) log = logging.getLogger(__name__)
@ -105,34 +107,44 @@ def check_latest_version(config, current_version):
``current_version`` ``current_version``
The current version of OpenLP. The current version of OpenLP.
""" """
version_string = current_version version_string = current_version[u'full']
#set to prod in the distribution confif file. #set to prod in the distribution confif file.
last_test = config.get_config(u'last version test', datetime.now().date()) last_test = config.get_config(u'last version test', datetime.now().date())
this_test = unicode(datetime.now().date()) this_test = unicode(datetime.now().date())
config.set_config(u'last version test', this_test) config.set_config(u'last version test', this_test)
if last_test != this_test: if last_test != this_test:
version_string = u'' version_string = u''
req = urllib2.Request(u'http://www.openlp.org/files/version.txt') if current_version[u'build']:
req.add_header(u'User-Agent', u'OpenLP/%s' % current_version) req = urllib2.Request(u'http://www.openlp.org/files/dev_version.txt')
else:
req = urllib2.Request(u'http://www.openlp.org/files/version.txt')
req.add_header(u'User-Agent', u'OpenLP/%s' % current_version[u'full'])
try: try:
handle = urllib2.urlopen(req, None) version_string = unicode(urllib2.urlopen(req, None).read()).strip()
html = handle.read()
version_string = unicode(html).rstrip()
except IOError, e: except IOError, e:
if hasattr(e, u'reason'): if hasattr(e, u'reason'):
log.exception(u'Reason for failure: %s', e.reason) log.exception(u'Reason for failure: %s', e.reason)
return version_string return version_string
def string_to_unicode(string):
"""
Converts a QString to a Python unicode object.
"""
if isinstance(string, QtCore.QString):
string = unicode(string.toUtf8(), u'utf8')
return string
def variant_to_unicode(variant): def variant_to_unicode(variant):
""" """
Converts a QVariant to a unicode string. Converts a QVariant to a Python unicode object.
``variant`` ``variant``
The QVariant instance to convert to unicode. The QVariant instance to convert to unicode.
""" """
string = variant.toString() if isinstance(variant, QtCore.QVariant):
string = variant.toString()
if not isinstance(string, unicode): if not isinstance(string, unicode):
string = unicode(string, u'utf8') string = string_to_unicode(string)
return string return string
from registry import Registry from registry import Registry

View File

@ -73,7 +73,7 @@ class BiblePlugin(Plugin):
self.ImportBibleItem.setText(import_menu.trUtf8('&Bible')) self.ImportBibleItem.setText(import_menu.trUtf8('&Bible'))
# Signals and slots # Signals and slots
QtCore.QObject.connect(self.ImportBibleItem, QtCore.QObject.connect(self.ImportBibleItem,
QtCore.SIGNAL(u'triggered()'), self.onBibleNewClick) QtCore.SIGNAL(u'triggered()'), self.onBibleImportClick)
self.ImportBibleItem.setVisible(False) self.ImportBibleItem.setVisible(False)
def add_export_menu_item(self, export_menu): def add_export_menu_item(self, export_menu):
@ -83,9 +83,9 @@ class BiblePlugin(Plugin):
self.ExportBibleItem.setText(export_menu.trUtf8('&Bible')) self.ExportBibleItem.setText(export_menu.trUtf8('&Bible'))
self.ExportBibleItem.setVisible(False) self.ExportBibleItem.setVisible(False)
def onBibleNewClick(self): def onBibleImportClick(self):
if self.media_item: if self.media_item:
self.media_item.onNewClick() self.media_item.onImportClick()
def about(self): def about(self):
about_text = self.trUtf8('<strong>Bible Plugin</strong><br />This ' about_text = self.trUtf8('<strong>Bible Plugin</strong><br />This '

View File

@ -32,7 +32,7 @@ from PyQt4 import QtCore, QtGui
from bibleimportwizard import Ui_BibleImportWizard from bibleimportwizard import Ui_BibleImportWizard
from openlp.core.lib import Receiver from openlp.core.lib import Receiver
from openlp.core.utils import AppLocation, variant_to_unicode from openlp.core.utils import AppLocation, variant_to_unicode, string_to_unicode
from openlp.plugins.bibles.lib.manager import BibleFormat from openlp.plugins.bibles.lib.manager import BibleFormat
log = logging.getLogger(__name__) log = logging.getLogger(__name__)
@ -425,3 +425,4 @@ class ImportWizardForm(QtGui.QWizard, Ui_BibleImportWizard):
self.finishButton.setVisible(True) self.finishButton.setVisible(True)
self.cancelButton.setVisible(False) self.cancelButton.setVisible(False)
Receiver.send_message(u'process_events') Receiver.send_message(u'process_events')

View File

@ -33,7 +33,7 @@ only_verses = re.compile(r'([\w .]+)[ ]+([0-9]+)[ ]*[:|v|V][ ]*([0-9]+)'
r'(?:[ ]*-[ ]*([0-9]+|end))?(?:[ ]*,[ ]*([0-9]+)(?:[ ]*-[ ]*([0-9]+|end))?)?', r'(?:[ ]*-[ ]*([0-9]+|end))?(?:[ ]*,[ ]*([0-9]+)(?:[ ]*-[ ]*([0-9]+|end))?)?',
re.UNICODE) re.UNICODE)
chapter_range = re.compile(r'([\w .]+)[ ]+([0-9]+)[ ]*[:|v|V][ ]*' chapter_range = re.compile(r'([\w .]+)[ ]+([0-9]+)[ ]*[:|v|V][ ]*'
r'([0-9]+)[ ]*-[ ]*([0-9]+)[ ]*[:|v|V][ ]*([0-9]+)', r'([0-9]+|end)[ ]*-[ ]*([0-9]+)[ ]*[:|v|V][ ]*([0-9]+|end)',
re.UNICODE) re.UNICODE)
log = logging.getLogger(__name__) log = logging.getLogger(__name__)

View File

@ -95,6 +95,9 @@ class BibleDB(QtCore.QObject):
self.get_name() self.get_name()
def get_name(self): def get_name(self):
"""
Returns the version name of the Bible.
"""
version_name = self.get_meta(u'Version') version_name = self.get_meta(u'Version')
if version_name: if version_name:
self.name = version_name.value self.name = version_name.value
@ -103,12 +106,22 @@ class BibleDB(QtCore.QObject):
return self.name return self.name
def clean_filename(self, old_filename): def clean_filename(self, old_filename):
"""
Clean up the version name of the Bible and convert it into a valid
file name.
``old_filename``
The "dirty" file name or version name.
"""
if not isinstance(old_filename, unicode): if not isinstance(old_filename, unicode):
old_filename = unicode(old_filename, u'utf-8') old_filename = unicode(old_filename, u'utf-8')
old_filename = re.sub(r'[^\w]+', u'_', old_filename).strip(u'_') old_filename = re.sub(r'[^\w]+', u'_', old_filename).strip(u'_')
return old_filename + u'.sqlite' return old_filename + u'.sqlite'
def delete(self): def delete(self):
"""
Remove the Bible database file. Used when a Bible import fails.
"""
try: try:
os.remove(self.db_file) os.remove(self.db_file)
return True return True
@ -119,18 +132,27 @@ class BibleDB(QtCore.QObject):
""" """
This method basically just initialialises the database. It is called This method basically just initialialises the database. It is called
from the Bible Manager when a Bible is imported. Descendant classes from the Bible Manager when a Bible is imported. Descendant classes
may want to override this method to suVersionpply their own custom may want to override this method to supply their own custom
initialisation as well. initialisation as well.
``wizard``
The actual Qt wizard form.
""" """
self.wizard = wizard self.wizard = wizard
self.create_tables() self.create_tables()
return self.name return self.name
def commit(self): def commit(self):
"""
Perform a database commit.
"""
log.debug('Committing...') log.debug('Committing...')
self.session.commit() self.session.commit()
def create_tables(self): def create_tables(self):
"""
Create some initial metadata.
"""
log.debug(u'createTables') log.debug(u'createTables')
self.create_meta(u'dbversion', u'2') self.create_meta(u'dbversion', u'2')
self.create_testament(u'Old Testament') self.create_testament(u'Old Testament')
@ -138,11 +160,29 @@ class BibleDB(QtCore.QObject):
self.create_testament(u'Apocrypha') self.create_testament(u'Apocrypha')
def create_testament(self, testament): def create_testament(self, testament):
"""
Add a testament to the database.
``testament``
The testament name.
"""
log.debug(u'BibleDB.create_testament("%s")', testament) log.debug(u'BibleDB.create_testament("%s")', testament)
self.session.add(Testament.populate(name=testament)) self.session.add(Testament.populate(name=testament))
self.commit() self.commit()
def create_book(self, name, abbrev, testament=1): def create_book(self, name, abbrev, testament=1):
"""
Add a book to the database.
``name``
The name of the book.
``abbrev``
The abbreviation of the book.
``testament``
*Defaults to 1.* The id of the testament this book belongs to.
"""
log.debug(u'create_book %s,%s', name, abbrev) log.debug(u'create_book %s,%s', name, abbrev)
book = Book.populate(name=name, abbreviation=abbrev, book = Book.populate(name=name, abbreviation=abbrev,
testament_id=testament) testament_id=testament)
@ -151,6 +191,19 @@ class BibleDB(QtCore.QObject):
return book return book
def create_chapter(self, book_id, chapter, textlist): def create_chapter(self, book_id, chapter, textlist):
"""
Add a chapter and it's verses to a book.
``book_id``
The id of the book being appended.
``chapter``
The chapter number.
``textlist``
A dict of the verses to be inserted. The key is the verse number,
and the value is the verse text.
"""
log.debug(u'create_chapter %s,%s', book_id, chapter) log.debug(u'create_chapter %s,%s', book_id, chapter)
#text list has book and chapter as first two elements of the array #text list has book and chapter as first two elements of the array
for verse_number, verse_text in textlist.iteritems(): for verse_number, verse_text in textlist.iteritems():
@ -164,6 +217,21 @@ class BibleDB(QtCore.QObject):
self.commit() self.commit()
def create_verse(self, book_id, chapter, verse, text): def create_verse(self, book_id, chapter, verse, text):
"""
Add a single verse to a chapter.
``book_id``
The id of the book being appended.
``chapter``
The chapter number.
``verse``
The verse number.
``text``
The verse text.
"""
if not isinstance(text, unicode): if not isinstance(text, unicode):
details = chardet.detect(text) details = chardet.detect(text)
text = unicode(text, details[u'encoding']) text = unicode(text, details[u'encoding'])

View File

@ -27,6 +27,7 @@ import logging
import urllib2 import urllib2
import os import os
import sqlite3 import sqlite3
import re
from BeautifulSoup import BeautifulSoup, Tag, NavigableString from BeautifulSoup import BeautifulSoup, Tag, NavigableString
@ -202,7 +203,9 @@ class BGExtract(BibleCommon):
# Let's get the page, and then open it in BeautifulSoup, so as to # Let's get the page, and then open it in BeautifulSoup, so as to
# attempt to make "easy" work of bad HTML. # attempt to make "easy" work of bad HTML.
page = urllib2.urlopen(urlstring) page = urllib2.urlopen(urlstring)
Receiver.send_message(u'process_events')
soup = BeautifulSoup(page) soup = BeautifulSoup(page)
Receiver.send_message(u'process_events')
verses = soup.find(u'div', u'result-text-style-normal') verses = soup.find(u'div', u'result-text-style-normal')
verse_number = 0 verse_number = 0
verse_list = {0: u''} verse_list = {0: u''}
@ -210,6 +213,7 @@ class BGExtract(BibleCommon):
# This is a PERFECT example of opening the Cthulu tag! # This is a PERFECT example of opening the Cthulu tag!
# O Bible Gateway, why doth ye such horrific HTML produce? # O Bible Gateway, why doth ye such horrific HTML produce?
for verse in verses: for verse in verses:
Receiver.send_message(u'process_events')
if isinstance(verse, Tag) and verse.name == u'div' and filter(lambda a: a[0] == u'class', verse.attrs)[0][1] == u'footnotes': if isinstance(verse, Tag) and verse.name == u'div' and filter(lambda a: a[0] == u'class', verse.attrs)[0][1] == u'footnotes':
break break
if isinstance(verse, Tag) and verse.name == u'sup' and filter(lambda a: a[0] == u'class', verse.attrs)[0][1] != u'versenum': if isinstance(verse, Tag) and verse.name == u'sup' and filter(lambda a: a[0] == u'class', verse.attrs)[0][1] != u'versenum':
@ -218,6 +222,7 @@ class BGExtract(BibleCommon):
continue continue
if isinstance(verse, Tag) and (verse.name == u'p' or verse.name == u'font') and verse.contents: if isinstance(verse, Tag) and (verse.name == u'p' or verse.name == u'font') and verse.contents:
for item in verse.contents: for item in verse.contents:
Receiver.send_message(u'process_events')
if isinstance(item, Tag) and (item.name == u'h4' or item.name == u'h5'): if isinstance(item, Tag) and (item.name == u'h4' or item.name == u'h5'):
continue continue
if isinstance(item, Tag) and item.name == u'sup' and filter(lambda a: a[0] == u'class', item.attrs)[0][1] != u'versenum': if isinstance(item, Tag) and item.name == u'sup' and filter(lambda a: a[0] == u'class', item.attrs)[0][1] != u'versenum':
@ -230,6 +235,7 @@ class BGExtract(BibleCommon):
continue continue
if isinstance(item, Tag) and item.name == u'font': if isinstance(item, Tag) and item.name == u'font':
for subitem in item.contents: for subitem in item.contents:
Receiver.send_message(u'process_events')
if isinstance(subitem, Tag) and subitem.name == u'sup' and filter(lambda a: a[0] == u'class', subitem.attrs)[0][1] != u'versenum': if isinstance(subitem, Tag) and subitem.name == u'sup' and filter(lambda a: a[0] == u'class', subitem.attrs)[0][1] != u'versenum':
continue continue
if isinstance(subitem, Tag) and subitem.name == u'p' and not subitem.contents: if isinstance(subitem, Tag) and subitem.name == u'p' and not subitem.contents:
@ -288,23 +294,42 @@ class CWExtract(BibleCommon):
(version, urlbookname.lower(), chapter) (version, urlbookname.lower(), chapter)
log.debug(u'URL: %s', chapter_url) log.debug(u'URL: %s', chapter_url)
page = urllib2.urlopen(chapter_url) page = urllib2.urlopen(chapter_url)
Receiver.send_message(u'process_events')
if not page: if not page:
return None return None
soup = BeautifulSoup(page) soup = BeautifulSoup(page)
Receiver.send_message(u'process_events')
htmlverses = soup.findAll(u'span', u'versetext') htmlverses = soup.findAll(u'span', u'versetext')
verses = {} verses = {}
reduce_spaces = re.compile(r'[ ]{2,}')
fix_punctuation = re.compile(r'[ ]+([.,;])')
for verse in htmlverses: for verse in htmlverses:
Receiver.send_message(u'process_events') Receiver.send_message(u'process_events')
versenumber = int(verse.contents[0].contents[0]) versenumber = int(verse.contents[0].contents[0])
versetext = u'' versetext = u''
for part in verse.contents: for part in verse.contents:
if str(part)[0] != u'<': Receiver.send_message(u'process_events')
if isinstance(part, NavigableString):
versetext = versetext + part versetext = versetext + part
elif part and part.attrMap and part.attrMap[u'class'] == u'WordsOfChrist': elif part and part.attrMap and \
(part.attrMap[u'class'] == u'WordsOfChrist' or \
part.attrMap[u'class'] == u'strongs'):
for subpart in part.contents: for subpart in part.contents:
if str(subpart)[0] != '<': Receiver.send_message(u'process_events')
if isinstance(subpart, NavigableString):
versetext = versetext + subpart versetext = versetext + subpart
elif subpart and subpart.attrMap and \
subpart.attrMap[u'class'] == u'strongs':
for subsub in subpart.contents:
Receiver.send_message(u'process_events')
if isinstance(subsub, NavigableString):
versetext = versetext + subsub
Receiver.send_message(u'process_events')
# Fix up leading and trailing spaces, multiple spaces, and spaces
# between text and , and .
versetext = versetext.strip(u'\n\r\t ') versetext = versetext.strip(u'\n\r\t ')
versetext = reduce_spaces.sub(u' ', versetext)
versetext = fix_punctuation.sub(r'\1', versetext)
verses[versenumber] = versetext verses[versenumber] = versetext
return SearchResults(bookname, chapter, verses) return SearchResults(bookname, chapter, verses)
@ -405,10 +430,12 @@ class HTTPBible(BibleDB):
## we get a correct book. For example it is possible ## we get a correct book. For example it is possible
## to request ac and get Acts back. ## to request ac and get Acts back.
bookname = search_results.get_book() bookname = search_results.get_book()
Receiver.send_message(u'process_events')
# check to see if book/chapter exists # check to see if book/chapter exists
db_book = self.get_book(bookname) db_book = self.get_book(bookname)
self.create_chapter(db_book.id, search_results.get_chapter(), self.create_chapter(db_book.id, search_results.get_chapter(),
search_results.get_verselist()) search_results.get_verselist())
Receiver.send_message(u'process_events')
Receiver.send_message(u'bible_hideprogress') Receiver.send_message(u'bible_hideprogress')
Receiver.send_message(u'process_events') Receiver.send_message(u'process_events')
return BibleDB.get_verses(self, reference_list) return BibleDB.get_verses(self, reference_list)

View File

@ -268,8 +268,9 @@ class BibleMediaItem(MediaManagerItem):
MediaManagerItem.addListViewToToolBar(self) MediaManagerItem.addListViewToToolBar(self)
# Progress Bar # Progress Bar
self.SearchProgress = QtGui.QProgressBar(self) self.SearchProgress = QtGui.QProgressBar(self)
self.SearchProgress.setFormat('%p%') self.SearchProgress.setFormat('')
self.SearchProgress.setMaximum(3) self.SearchProgress.setMinimum(0)
self.SearchProgress.setMaximum(0)
self.SearchProgress.setGeometry(self.ListView.geometry().left(), self.SearchProgress.setGeometry(self.ListView.geometry().left(),
self.ListView.geometry().top(), 81, 23) self.ListView.geometry().top(), 81, 23)
self.SearchProgress.setVisible(False) self.SearchProgress.setVisible(False)
@ -353,9 +354,10 @@ class BibleMediaItem(MediaManagerItem):
def onSearchProgressShow(self): def onSearchProgressShow(self):
self.SearchProgress.setVisible(True) self.SearchProgress.setVisible(True)
self.SearchProgress.setMinimum(0) Receiver.send_message(u'process_events')
self.SearchProgress.setMaximum(2) #self.SearchProgress.setMinimum(0)
self.SearchProgress.setValue(1) #self.SearchProgress.setMaximum(2)
#self.SearchProgress.setValue(1)
def onSearchProgressHide(self): def onSearchProgressHide(self):
self.SearchProgress.setVisible(False) self.SearchProgress.setVisible(False)