forked from openlp/openlp
r1214
This commit is contained in:
commit
35ed76782c
@ -207,12 +207,6 @@ class EventReceiver(QtCore.QObject):
|
|||||||
``bibles_nobook``
|
``bibles_nobook``
|
||||||
Attempt to find book resulted in no match
|
Attempt to find book resulted in no match
|
||||||
|
|
||||||
``bibles_showprogress``
|
|
||||||
Show progress of bible verse import
|
|
||||||
|
|
||||||
``bibles_hideprogress``
|
|
||||||
Hide progress of bible verse import
|
|
||||||
|
|
||||||
``bibles_stop_import``
|
``bibles_stop_import``
|
||||||
Stops the Bible Import
|
Stops the Bible Import
|
||||||
|
|
||||||
|
@ -441,7 +441,7 @@ class HTTPBible(BibleDB):
|
|||||||
book_details[u'testament_id'])
|
book_details[u'testament_id'])
|
||||||
book = db_book.name
|
book = db_book.name
|
||||||
if BibleDB.get_verse_count(self, book, reference[1]) == 0:
|
if BibleDB.get_verse_count(self, book, reference[1]) == 0:
|
||||||
Receiver.send_message(u'bibles_showprogress')
|
Receiver.send_message(u'cursor_busy')
|
||||||
Receiver.send_message(u'openlp_process_events')
|
Receiver.send_message(u'openlp_process_events')
|
||||||
search_results = self.get_chapter(book, reference[1])
|
search_results = self.get_chapter(book, reference[1])
|
||||||
if search_results and search_results.has_verselist():
|
if search_results and search_results.has_verselist():
|
||||||
@ -456,7 +456,7 @@ class HTTPBible(BibleDB):
|
|||||||
self.create_chapter(db_book.id, search_results.chapter,
|
self.create_chapter(db_book.id, search_results.chapter,
|
||||||
search_results.verselist)
|
search_results.verselist)
|
||||||
Receiver.send_message(u'openlp_process_events')
|
Receiver.send_message(u'openlp_process_events')
|
||||||
Receiver.send_message(u'bibles_hideprogress')
|
Receiver.send_message(u'cursor_normal')
|
||||||
Receiver.send_message(u'openlp_process_events')
|
Receiver.send_message(u'openlp_process_events')
|
||||||
return BibleDB.get_verses(self, reference_list)
|
return BibleDB.get_verses(self, reference_list)
|
||||||
|
|
||||||
|
@ -43,10 +43,6 @@ class BibleListView(BaseListWithDnD):
|
|||||||
self.PluginName = u'Bibles'
|
self.PluginName = u'Bibles'
|
||||||
BaseListWithDnD.__init__(self, parent)
|
BaseListWithDnD.__init__(self, parent)
|
||||||
|
|
||||||
def resizeEvent(self, event):
|
|
||||||
self.parent().onListViewResize(event.size().width(),
|
|
||||||
event.size().width())
|
|
||||||
|
|
||||||
|
|
||||||
class BibleMediaItem(MediaManagerItem):
|
class BibleMediaItem(MediaManagerItem):
|
||||||
"""
|
"""
|
||||||
@ -256,22 +252,9 @@ class BibleMediaItem(MediaManagerItem):
|
|||||||
# Other stuff
|
# Other stuff
|
||||||
QtCore.QObject.connect(self.quickSearchEdit,
|
QtCore.QObject.connect(self.quickSearchEdit,
|
||||||
QtCore.SIGNAL(u'returnPressed()'), self.onQuickSearchButton)
|
QtCore.SIGNAL(u'returnPressed()'), self.onQuickSearchButton)
|
||||||
QtCore.QObject.connect(Receiver.get_receiver(),
|
|
||||||
QtCore.SIGNAL(u'bibles_showprogress'), self.onSearchProgressShow)
|
|
||||||
QtCore.QObject.connect(Receiver.get_receiver(),
|
|
||||||
QtCore.SIGNAL(u'bibles_hideprogress'), self.onSearchProgressHide)
|
|
||||||
|
|
||||||
def addListViewToToolBar(self):
|
def addListViewToToolBar(self):
|
||||||
MediaManagerItem.addListViewToToolBar(self)
|
MediaManagerItem.addListViewToToolBar(self)
|
||||||
# Progress Bar
|
|
||||||
self.SearchProgress = QtGui.QProgressBar(self)
|
|
||||||
self.SearchProgress.setFormat('')
|
|
||||||
self.SearchProgress.setMinimum(0)
|
|
||||||
self.SearchProgress.setMaximum(0)
|
|
||||||
self.SearchProgress.setGeometry(self.listView.geometry().left(),
|
|
||||||
self.listView.geometry().top(), 81, 23)
|
|
||||||
self.SearchProgress.setVisible(False)
|
|
||||||
self.SearchProgress.setObjectName(u'SearchProgress')
|
|
||||||
|
|
||||||
def configUpdated(self):
|
def configUpdated(self):
|
||||||
log.debug(u'configUpdated')
|
log.debug(u'configUpdated')
|
||||||
@ -340,18 +323,6 @@ class BibleMediaItem(MediaManagerItem):
|
|||||||
self.configUpdated()
|
self.configUpdated()
|
||||||
log.debug(u'bible manager initialise complete')
|
log.debug(u'bible manager initialise complete')
|
||||||
|
|
||||||
def onListViewResize(self, width, height):
|
|
||||||
listViewGeometry = self.listView.geometry()
|
|
||||||
self.SearchProgress.setGeometry(listViewGeometry.x(),
|
|
||||||
(listViewGeometry.y() + listViewGeometry.height()) - 23, 81, 23)
|
|
||||||
|
|
||||||
def onSearchProgressShow(self):
|
|
||||||
self.SearchProgress.setVisible(True)
|
|
||||||
Receiver.send_message(u'openlp_process_events')
|
|
||||||
|
|
||||||
def onSearchProgressHide(self):
|
|
||||||
self.SearchProgress.setVisible(False)
|
|
||||||
|
|
||||||
def onImportClick(self):
|
def onImportClick(self):
|
||||||
if not hasattr(self, u'import_wizard'):
|
if not hasattr(self, u'import_wizard'):
|
||||||
self.import_wizard = BibleImportForm(self, self.parent.manager,
|
self.import_wizard = BibleImportForm(self, self.parent.manager,
|
||||||
|
Loading…
Reference in New Issue
Block a user