removed showprogress and hideprogress and added cursor_busy and cursor_normal

This commit is contained in:
Andreas Preikschat 2011-01-11 20:56:55 +01:00
parent 7362fcf399
commit 76000d918b
3 changed files with 2 additions and 37 deletions

View File

@ -207,12 +207,6 @@ class EventReceiver(QtCore.QObject):
``bibles_nobook``
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``
Stops the Bible Import

View File

@ -438,7 +438,7 @@ class HTTPBible(BibleDB):
book_details[u'testament_id'])
book = db_book.name
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')
search_results = self.get_chapter(book, reference[1])
if search_results and search_results.has_verselist():
@ -453,7 +453,7 @@ class HTTPBible(BibleDB):
self.create_chapter(db_book.id, search_results.chapter,
search_results.verselist)
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')
return BibleDB.get_verses(self, reference_list)

View File

@ -44,10 +44,6 @@ class BibleListView(BaseListWithDnD):
self.PluginName = u'Bibles'
BaseListWithDnD.__init__(self, parent)
def resizeEvent(self, event):
self.parent().onListViewResize(event.size().width(),
event.size().width())
class BibleMediaItem(MediaManagerItem):
"""
@ -257,22 +253,9 @@ class BibleMediaItem(MediaManagerItem):
# Other stuff
QtCore.QObject.connect(self.quickSearchEdit,
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):
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):
log.debug(u'configUpdated')
@ -341,18 +324,6 @@ class BibleMediaItem(MediaManagerItem):
self.configUpdated()
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):
if not hasattr(self, u'import_wizard'):
self.import_wizard = BibleImportForm(self, self.parent.manager,