forked from openlp/openlp
Bible Plugin visual change and shorten delay
This commit is contained in:
parent
9c4e5ae137
commit
e3998431fc
@ -322,8 +322,7 @@ c
|
|||||||
Rest can be guessed at !
|
Rest can be guessed at !
|
||||||
"""
|
"""
|
||||||
text = []
|
text = []
|
||||||
self.media.setQuickMsg1(u'')
|
self.media.setQuickMessage(u'')
|
||||||
self.media.setQuickMsg2(u'')
|
|
||||||
log.debug(u'get_verse_text %s,%s,%s,%s,%s,%s',
|
log.debug(u'get_verse_text %s,%s,%s,%s,%s,%s',
|
||||||
bible, bookname, schapter, echapter, sverse, everse)
|
bible, bookname, schapter, echapter, sverse, everse)
|
||||||
# check to see if book/chapter exists fow HTTP bibles and load cache
|
# check to see if book/chapter exists fow HTTP bibles and load cache
|
||||||
@ -331,10 +330,10 @@ c
|
|||||||
if self.bible_http_cache[bible] is not None:
|
if self.bible_http_cache[bible] is not None:
|
||||||
book = self.bible_db_cache[bible].get_bible_book(bookname)
|
book = self.bible_db_cache[bible].get_bible_book(bookname)
|
||||||
if book is None:
|
if book is None:
|
||||||
self.media.setQuickMsg1(u'Downloading')
|
|
||||||
log.debug(u'get_verse_text : new book')
|
log.debug(u'get_verse_text : new book')
|
||||||
for chapter in range(schapter, echapter + 1):
|
for chapter in range(schapter, echapter + 1):
|
||||||
self.media.setQuickMsg2(u'%s: %s'% (bookname, chapter))
|
self.media.setQuickMessage \
|
||||||
|
(u'Downloading %s: %s'% (bookname, chapter))
|
||||||
search_results = \
|
search_results = \
|
||||||
self.bible_http_cache[bible].get_bible_chapter(
|
self.bible_http_cache[bible].get_bible_chapter(
|
||||||
bible, 0, bookname, chapter)
|
bible, 0, bookname, chapter)
|
||||||
@ -374,9 +373,8 @@ c
|
|||||||
book.id, chapter)
|
book.id, chapter)
|
||||||
if v is None:
|
if v is None:
|
||||||
try:
|
try:
|
||||||
self.media.setQuickMsg1(u'Downloading')
|
self.media.setQuickMessage \
|
||||||
self.media.setQuickMsg2(u'%s: %s'% \
|
(u'Downloading %s: %s'% (bookname, chapter))
|
||||||
(bookname, chapter))
|
|
||||||
search_results = \
|
search_results = \
|
||||||
self.bible_http_cache[bible].get_bible_chapter(
|
self.bible_http_cache[bible].get_bible_chapter(
|
||||||
bible, book.id, bookname, chapter)
|
bible, book.id, bookname, chapter)
|
||||||
|
@ -76,7 +76,9 @@ class BibleMediaItem(MediaManagerItem):
|
|||||||
# Add the Quick Search tab
|
# Add the Quick Search tab
|
||||||
self.QuickTab = QtGui.QWidget()
|
self.QuickTab = QtGui.QWidget()
|
||||||
self.QuickTab.setObjectName(u'QuickTab')
|
self.QuickTab.setObjectName(u'QuickTab')
|
||||||
self.QuickLayout = QtGui.QGridLayout(self.QuickTab)
|
self.QuickVerticalLayout = QtGui.QVBoxLayout(self.QuickTab)
|
||||||
|
self.QuickVerticalLayout.setObjectName("verticalLayout")
|
||||||
|
self.QuickLayout = QtGui.QGridLayout()
|
||||||
self.QuickLayout.setMargin(5)
|
self.QuickLayout.setMargin(5)
|
||||||
self.QuickLayout.setSpacing(4)
|
self.QuickLayout.setSpacing(4)
|
||||||
self.QuickLayout.setObjectName(u'QuickLayout')
|
self.QuickLayout.setObjectName(u'QuickLayout')
|
||||||
@ -107,12 +109,10 @@ class BibleMediaItem(MediaManagerItem):
|
|||||||
self.ClearQuickSearchComboBox = QtGui.QComboBox(self.QuickTab)
|
self.ClearQuickSearchComboBox = QtGui.QComboBox(self.QuickTab)
|
||||||
self.ClearQuickSearchComboBox.setObjectName(u'ClearQuickSearchComboBox')
|
self.ClearQuickSearchComboBox.setObjectName(u'ClearQuickSearchComboBox')
|
||||||
self.QuickLayout.addWidget(self.ClearQuickSearchComboBox, 3, 1, 1, 1)
|
self.QuickLayout.addWidget(self.ClearQuickSearchComboBox, 3, 1, 1, 1)
|
||||||
self.QuickMsg1 = QtGui.QLabel(self.QuickTab)
|
self.QuickVerticalLayout.addLayout(self.QuickLayout)
|
||||||
self.QuickMsg1.setObjectName(u'QuickSearchLabel')
|
self.QuickMessage = QtGui.QLabel(self.QuickTab)
|
||||||
self.QuickLayout.addWidget(self.QuickMsg1, 4, 0, 1, 1)
|
self.QuickMessage.setObjectName(u'QuickMessage')
|
||||||
self.QuickMsg2 = QtGui.QLabel(self.QuickTab)
|
self.QuickVerticalLayout.addWidget(self.QuickMessage)
|
||||||
self.QuickMsg2.setObjectName(u'QuickSearchLabel')
|
|
||||||
self.QuickLayout.addWidget(self.QuickMsg2, 4, 1, 1, 1)
|
|
||||||
self.SearchTabWidget.addTab(self.QuickTab, 'Quick')
|
self.SearchTabWidget.addTab(self.QuickTab, 'Quick')
|
||||||
QuickSpacerItem = QtGui.QSpacerItem(20, 40, QtGui.QSizePolicy.Minimum,
|
QuickSpacerItem = QtGui.QSpacerItem(20, 40, QtGui.QSizePolicy.Minimum,
|
||||||
QtGui.QSizePolicy.Expanding)
|
QtGui.QSizePolicy.Expanding)
|
||||||
@ -230,14 +230,11 @@ class BibleMediaItem(MediaManagerItem):
|
|||||||
self.loadBibles()
|
self.loadBibles()
|
||||||
self.parent.biblemanager.set_media_manager(self)
|
self.parent.biblemanager.set_media_manager(self)
|
||||||
|
|
||||||
def setQuickMsg1(self, text):
|
def setQuickMessage(self, text):
|
||||||
self.QuickMsg1.setText(translate(u'BibleMediaItem', unicode(text)))
|
self.QuickMessage.setText(translate(u'BibleMediaItem', unicode(text)))
|
||||||
|
|
||||||
def setQuickMsg2(self, text):
|
|
||||||
self.QuickMsg2.setText(translate(u'BibleMediaItem', unicode(text)))
|
|
||||||
Receiver().send_message(u'process_events')
|
Receiver().send_message(u'process_events')
|
||||||
#minor delay to get the events processed
|
#minor delay to get the events processed
|
||||||
time.sleep(0.5)
|
time.sleep(0.1)
|
||||||
|
|
||||||
def loadBibles(self):
|
def loadBibles(self):
|
||||||
log.debug(u'Loading Bibles')
|
log.debug(u'Loading Bibles')
|
||||||
|
Loading…
Reference in New Issue
Block a user