openlp-core team mailing list archive
-
openlp-core team
-
Mailing list archive
-
Message #05183
[Merge] lp:~trb143/openlp/bugs into lp:openlp
Tim Bentley has proposed merging lp:~trb143/openlp/bugs into lp:openlp.
Requested reviews:
OpenLP Core (openlp-core)
Related bugs:
#693150 Custom Slide Display footer option
https://bugs.launchpad.net/bugs/693150
#693202 delete theme
https://bugs.launchpad.net/bugs/693202
For more details, see:
https://code.launchpad.net/~trb143/openlp/bugs/+merge/44976
Add Cursor display code the the system so we get a Cursor Busy when OpenLP is doing things.
--
https://code.launchpad.net/~trb143/openlp/bugs/+merge/44976
Your team OpenLP Core is requested to review the proposed merge of lp:~trb143/openlp/bugs into lp:openlp.
=== modified file 'openlp.pyw'
--- openlp.pyw 2010-12-26 11:04:47 +0000
+++ openlp.pyw 2011-01-01 12:54:53 +0000
@@ -162,6 +162,10 @@
#provide a listener for widgets to reqest a screen update.
QtCore.QObject.connect(Receiver.get_receiver(),
QtCore.SIGNAL(u'openlp_process_events'), self.processEvents)
+ QtCore.QObject.connect(Receiver.get_receiver(),
+ QtCore.SIGNAL(u'cursor_busy'), self.setBusyCursor)
+ QtCore.QObject.connect(Receiver.get_receiver(),
+ QtCore.SIGNAL(u'cursor_normal'), self.setNormalCursor)
self.setOrganizationName(u'OpenLP')
self.setOrganizationDomain(u'openlp.org')
self.setApplicationName(u'OpenLP')
@@ -201,8 +205,21 @@
self.exceptionForm = ExceptionForm(self.mainWindow)
self.exceptionForm.exceptionTextEdit.setPlainText(
''.join(format_exception(exctype, value, traceback)))
+ self.setNormalCursor()
self.exceptionForm.exec_()
+ def setBusyCursor(self):
+ """
+ Sets the Busy Cursor for the Application
+ """
+ self.setOverrideCursor(QtCore.Qt.BusyCursor)
+
+ def setNormalCursor(self):
+ """
+ Sets the Normal Cursor forthe Application
+ """
+ self.restoreOverrideCursor()
+
def main():
"""
The main function which parses command line options and then runs
@@ -264,4 +281,4 @@
"""
Instantiate and run the application.
"""
- main()
\ No newline at end of file
+ main()
=== modified file 'openlp/core/lib/eventreceiver.py'
--- openlp/core/lib/eventreceiver.py 2011-01-01 10:33:14 +0000
+++ openlp/core/lib/eventreceiver.py 2011-01-01 12:54:53 +0000
@@ -220,6 +220,21 @@
Waits for openlp to do something "interesting" and sends a
remotes_poll_response signal when it does
+ ``openlp_critical_message``
+ Displays a standalong Critical Message
+
+ ``openlp_error_message``
+ Displays a standalong Error Message
+
+ ``openlp_information_message``
+ Displays a standalong Information Message
+
+ ``cursor_busy``
+ Makes the cursor got to a busy form
+
+ ``cursor_normal``
+ Resets the cursor to default
+
"""
def __init__(self):
"""
=== modified file 'openlp/core/lib/mediamanageritem.py'
--- openlp/core/lib/mediamanageritem.py 2010-12-31 19:22:41 +0000
+++ openlp/core/lib/mediamanageritem.py 2011-01-01 12:54:53 +0000
@@ -349,11 +349,13 @@
self.OnNewFileMasks)
log.info(u'New files(s) %s', unicode(files))
if files:
+ Receiver.send_message(u'cursor_busy')
self.loadList(files)
lastDir = os.path.split(unicode(files[0]))[0]
SettingsManager.set_last_dir(self.settingsSection, lastDir)
SettingsManager.set_list(self.settingsSection,
self.settingsSection, self.getFileList())
+ Receiver.send_message(u'cursor_normal')
def getFileList(self):
"""
=== modified file 'openlp/core/ui/mainwindow.py'
--- openlp/core/ui/mainwindow.py 2011-01-01 12:48:00 +0000
+++ openlp/core/ui/mainwindow.py 2011-01-01 12:54:53 +0000
@@ -612,6 +612,7 @@
QtCore.SIGNAL(u'config_screen_changed'), self.screenChanged)
QtCore.QObject.connect(Receiver.get_receiver(),
QtCore.SIGNAL(u'maindisplay_status_text'), self.showStatusMessage)
+ Receiver.send_message(u'cursor_busy')
# Simple message boxes
QtCore.QObject.connect(Receiver.get_receiver(),
QtCore.SIGNAL(u'openlp_error_message'), self.onErrorMessage)
@@ -667,6 +668,7 @@
if savedPlugin != -1:
self.MediaToolBox.setCurrentIndex(savedPlugin)
self.settingsForm.postSetUp()
+ Receiver.send_message(u'cursor_normal')
def setAutoLanguage(self, value):
self.LanguageGroup.setDisabled(value)
=== modified file 'openlp/core/ui/servicemanager.py'
--- openlp/core/ui/servicemanager.py 2011-01-01 12:25:12 +0000
+++ openlp/core/ui/servicemanager.py 2011-01-01 12:54:53 +0000
@@ -895,6 +895,7 @@
Rebuild the service list as things have changed and a
repaint is the easiest way to do this.
"""
+ Receiver.send_message(u'cursor_busy')
log.debug(u'regenerateServiceItems')
# force reset of renderer as theme data has changed
self.parent.renderManager.themedata = None
@@ -909,6 +910,7 @@
# Set to False as items may have changed rendering
# does not impact the saved song so True may also be valid
self.setModified(True)
+ Receiver.send_message(u'cursor_normal')
def serviceItemUpdate(self, message):
"""
=== modified file 'openlp/plugins/images/lib/mediaitem.py'
--- openlp/plugins/images/lib/mediaitem.py 2010-12-31 19:22:41 +0000
+++ openlp/plugins/images/lib/mediaitem.py 2011-01-01 12:54:53 +0000
@@ -139,8 +139,6 @@
self.settingsSection, self.getFileList())
def loadList(self, list):
- self.listView.setCursor(QtCore.Qt.BusyCursor)
- Receiver.send_message(u'openlp_process_events')
for file in list:
filename = os.path.split(unicode(file))[1]
thumb = os.path.join(self.servicePath, filename)
@@ -155,8 +153,6 @@
item_name.setIcon(icon)
item_name.setData(QtCore.Qt.UserRole, QtCore.QVariant(file))
self.listView.addItem(item_name)
- self.listView.setCursor(QtCore.Qt.ArrowCursor)
- Receiver.send_message(u'openlp_process_events')
def generateSlideData(self, service_item, item=None, xmlVersion=False):
items = self.listView.selectedIndexes()
Follow ups