← Back to team overview

openlp-core team mailing list archive

[Merge] lp:~googol-hush/openlp/bibles into lp:openlp

 

Andreas Preikschat has proposed merging lp:~googol-hush/openlp/bibles into lp:openlp.

Requested reviews:
  OpenLP Core (openlp-core)

For more details, see:
https://code.launchpad.net/~googol-hush/openlp/bibles/+merge/45905

Hello!

I suggest to replaced the "bibles_showprogress" and "bibles_hideprogress" with the "cursor_busy" and "cursor_normal" signals. I think the cursor_busy suits this better:

- less code
- progress bar seems to be out of place, in the lower left corner
- for me the progress bar did not work well, it just did not look like a progress bar (not smooth enough and is restarts suddenly).
- sometimes the download is that fast, that the progress bar just pops up (-> distracting). If the cursor is busy during the short moment, that'll be less distracting, as it is a more common behaviour.

It's up to you :-)

-- 
https://code.launchpad.net/~googol-hush/openlp/bibles/+merge/45905
Your team OpenLP Core is requested to review the proposed merge of lp:~googol-hush/openlp/bibles into lp:openlp.
=== modified file 'openlp/core/lib/eventreceiver.py'
--- openlp/core/lib/eventreceiver.py	2011-01-01 15:28:10 +0000
+++ openlp/core/lib/eventreceiver.py	2011-01-11 20:16:59 +0000
@@ -207,12 +207,6 @@
     ``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
 

=== modified file 'openlp/plugins/bibles/lib/http.py'
--- openlp/plugins/bibles/lib/http.py	2011-01-10 17:19:25 +0000
+++ openlp/plugins/bibles/lib/http.py	2011-01-11 20:16:59 +0000
@@ -438,7 +438,7 @@
                     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 @@
                     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)
 

=== modified file 'openlp/plugins/bibles/lib/mediaitem.py'
--- openlp/plugins/bibles/lib/mediaitem.py	2011-01-10 19:04:16 +0000
+++ openlp/plugins/bibles/lib/mediaitem.py	2011-01-11 20:16:59 +0000
@@ -43,10 +43,6 @@
         self.PluginName = u'Bibles'
         BaseListWithDnD.__init__(self, parent)
 
-    def resizeEvent(self, event):
-        self.parent().onListViewResize(event.size().width(),
-            event.size().width())
-
 
 class BibleMediaItem(MediaManagerItem):
     """
@@ -256,22 +252,9 @@
         # 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')
@@ -340,18 +323,6 @@
         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,


Follow ups