openlp-core team mailing list archive
-
openlp-core team
-
Mailing list archive
-
Message #06010
[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/48628
Fix setup.py so it works following file removal.
Fix settings to work with -d option
Upgrade Exception form to allow an attachment.
Upgrade Exception form to force a 20 character error description.
--
https://code.launchpad.net/~trb143/openlp/bugs/+merge/48628
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 2011-01-23 14:33:50 +0000
+++ openlp.pyw 2011-02-04 16:55:37 +0000
@@ -76,7 +76,7 @@
"""
Load and store current Application Version
"""
- if u'--dev-version' in sys.argv:
+ if u'--dev-version' in sys.argv or u'-d' in sys.argv:
# If we're running the dev version, let's use bzr to get the version
try:
# If bzrlib is availble, use it
@@ -216,6 +216,7 @@
Sets the Busy Cursor for the Application
"""
self.setOverrideCursor(QtCore.Qt.BusyCursor)
+ self.processEvents()
def setNormalCursor(self):
"""
=== modified file 'openlp/core/ui/exceptiondialog.py'
--- openlp/core/ui/exceptiondialog.py 2010-12-31 18:10:45 +0000
+++ openlp/core/ui/exceptiondialog.py 2011-02-04 16:55:37 +0000
@@ -46,6 +46,15 @@
self.messageLabel.setObjectName(u'messageLabel')
self.messageLayout.addWidget(self.messageLabel)
self.exceptionLayout.addLayout(self.messageLayout)
+ self.descriptionExplanation = QtGui.QLabel(exceptionDialog)
+ self.descriptionExplanation.setObjectName(u'descriptionExplanation')
+ self.exceptionLayout.addWidget(self.descriptionExplanation)
+ self.descriptionTextEdit = QtGui.QPlainTextEdit(exceptionDialog)
+ self.descriptionTextEdit.setObjectName(u'descriptionTextEdit')
+ self.exceptionLayout.addWidget(self.descriptionTextEdit)
+ self.descriptionWordCount = QtGui.QLabel(exceptionDialog)
+ self.descriptionWordCount.setObjectName(u'descriptionWordCount')
+ self.exceptionLayout.addWidget(self.descriptionWordCount)
self.exceptionTextEdit = QtGui.QPlainTextEdit(exceptionDialog)
self.exceptionTextEdit.setReadOnly(True)
self.exceptionTextEdit.setObjectName(u'exceptionTextEdit')
@@ -65,19 +74,31 @@
self.saveReportButton.setObjectName(u'saveReportButton')
self.exceptionButtonBox.addButton(self.saveReportButton,
QtGui.QDialogButtonBox.ActionRole)
+ self.attachFileButton = QtGui.QPushButton(exceptionDialog)
+ self.attachFileButton.setIcon(build_icon(u':/general/general_open.png'))
+ self.attachFileButton.setObjectName(u'attachFileButton')
+ self.exceptionButtonBox.addButton(self.attachFileButton,
+ QtGui.QDialogButtonBox.ActionRole)
self.retranslateUi(exceptionDialog)
+ QtCore.QObject.connect(self.descriptionTextEdit,
+ QtCore.SIGNAL(u'textChanged()'), self.onDescriptionUpdated)
QtCore.QObject.connect(self.exceptionButtonBox,
QtCore.SIGNAL(u'rejected()'), exceptionDialog.reject)
QtCore.QObject.connect(self.sendReportButton,
QtCore.SIGNAL(u'pressed()'), self.onSendReportButtonPressed)
QtCore.QObject.connect(self.saveReportButton,
QtCore.SIGNAL(u'pressed()'), self.onSaveReportButtonPressed)
+ QtCore.QObject.connect(self.attachFileButton,
+ QtCore.SIGNAL(u'pressed()'), self.onAttachFileButtonPressed)
QtCore.QMetaObject.connectSlotsByName(exceptionDialog)
def retranslateUi(self, exceptionDialog):
exceptionDialog.setWindowTitle(
translate('OpenLP.ExceptionDialog', 'Error Occurred'))
+ self.descriptionExplanation.setText(translate('OpenLP.ExceptionDialog',
+ 'Please enter a description of what you were doing to cause this '
+ 'error \n(Minimum 20 characters)'))
self.messageLabel.setText(translate('OpenLP.ExceptionDialog', 'Oops! '
'OpenLP hit a problem, and couldn\'t recover. The text in the box '
'below contains information that might be helpful to the OpenLP '
@@ -88,3 +109,5 @@
'Send E-Mail'))
self.saveReportButton.setText(translate('OpenLP.ExceptionDialog',
'Save to File'))
+ self.attachFileButton.setText(translate('OpenLP.ExceptionDialog',
+ 'Attach File'))
=== modified file 'openlp/core/ui/exceptionform.py'
--- openlp/core/ui/exceptionform.py 2010-12-31 19:22:41 +0000
+++ openlp/core/ui/exceptionform.py 2011-02-04 16:55:37 +0000
@@ -70,8 +70,14 @@
self.setupUi(self)
self.settingsSection = u'crashreport'
+ def exec_(self):
+ self.onDescriptionUpdated()
+ self.fileAttachment = None
+ return QtGui.QDialog.exec_(self)
+
def _createReport(self):
openlp_version = self.parent().applicationVersion[u'full']
+ description = unicode(self.descriptionTextEdit.toPlainText())
traceback = unicode(self.exceptionTextEdit.toPlainText())
system = unicode(translate('OpenLP.ExceptionForm',
'Platform: %s\n')) % platform.platform()
@@ -90,7 +96,7 @@
system = system + u'Desktop: KDE SC\n'
elif os.environ.get(u'GNOME_DESKTOP_SESSION_ID'):
system = system + u'Desktop: GNOME\n'
- return (openlp_version, traceback, system, libraries)
+ return (openlp_version, description, traceback, system, libraries)
def onSaveReportButtonPressed(self):
"""
@@ -99,6 +105,7 @@
report = unicode(translate('OpenLP.ExceptionForm',
'**OpenLP Bug Report**\n'
'Version: %s\n\n'
+ '--- Details of the Exception. ---\n\n%s\n\n '
'--- Exception Traceback ---\n%s\n'
'--- System information ---\n%s\n'
'--- Library Versions ---\n%s\n'))
@@ -129,21 +136,52 @@
Opening systems default email client and inserting exception log and
system informations.
"""
+ attach = None
body = unicode(translate('OpenLP.ExceptionForm',
'*OpenLP Bug Report*\n'
'Version: %s\n\n'
- '--- Please enter the report below this line. ---\n\n\n'
+ '--- Details of the Exception. ---\n\n%s\n\n '
'--- Exception Traceback ---\n%s\n'
'--- System information ---\n%s\n'
'--- Library Versions ---\n%s\n',
'Please add the information that bug reports are favoured written '
'in English.'))
content = self._createReport()
- for line in content[1].split(u'\n'):
+ for line in content[2].split(u'\n'):
if re.search(r'[/\\]openlp[/\\]', line):
source = re.sub(r'.*[/\\]openlp[/\\](.*)".*', r'\1', line)
if u':' in line:
exception = line.split(u'\n')[-1].split(u':')[0]
subject = u'Bug report: %s in %s' % (exception, source)
- mailto(address=u'bugs@xxxxxxxxxx', subject=subject,
- body=body % content)
+ if self.fileAttachment:
+ mailto(address=u'bugs@xxxxxxxxxx', subject=subject,
+ body=body % content, attach=self.fileAttachment)
+ else:
+ mailto(address=u'bugs@xxxxxxxxxx', subject=subject,
+ body=body % content)
+
+ def onDescriptionUpdated(self):
+ count = int(20 - len(self.descriptionTextEdit.toPlainText()))
+ if count < 0:
+ count = 0
+ self.__buttonState(True)
+ else:
+ self.__buttonState(False)
+ self.descriptionWordCount.setText(
+ unicode(translate('OpenLP.ExceptionDialog',
+ 'Description characters to enter : %s')) % count )
+
+ def onAttachFileButtonPressed(self):
+ files = QtGui.QFileDialog.getOpenFileName(
+ self,translate('ImagePlugin.ExceptionDialog',
+ 'Select Attachment'),
+ SettingsManager.get_last_dir(u'exceptions'),
+ u'%s (*.*) (*)' %
+ unicode(translate('ImagePlugin.MediaItem', 'All Files')))
+ log.info(u'New files(s) %s', unicode(files))
+ if files:
+ self.fileAttachment = unicode(files)
+
+ def __buttonState(self, state):
+ self.saveReportButton.setEnabled(state)
+ self.sendReportButton.setEnabled(state)
=== modified file 'openlp/core/ui/servicemanager.py'
--- openlp/core/ui/servicemanager.py 2011-02-03 03:50:04 +0000
+++ openlp/core/ui/servicemanager.py 2011-02-04 16:55:37 +0000
@@ -507,7 +507,6 @@
p_file = filePath
if 'p_file' in locals():
Receiver.send_message(u'cursor_busy')
- Receiver.send_message(u'openlp_process_events')
fileTo = open(p_file, u'r')
items = cPickle.load(fileTo)
fileTo.close()
=== modified file 'openlp/plugins/bibles/lib/http.py'
--- openlp/plugins/bibles/lib/http.py 2011-02-02 23:12:31 +0000
+++ openlp/plugins/bibles/lib/http.py 2011-02-04 16:55:37 +0000
@@ -443,7 +443,6 @@
book = db_book.name
if BibleDB.get_verse_count(self, book, reference[1]) == 0:
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():
## We have found a book of the bible lets check to see
=== modified file 'openlp/plugins/songs/forms/songmaintenanceform.py'
--- openlp/plugins/songs/forms/songmaintenanceform.py 2011-02-03 17:28:48 +0000
+++ openlp/plugins/songs/forms/songmaintenanceform.py 2011-02-04 16:55:37 +0000
@@ -372,7 +372,6 @@
Utility method to merge two objects to leave one in the database.
"""
Receiver.send_message(u'cursor_busy')
- Receiver.send_message(u'openlp_process_events')
merge(dbObject)
reset()
Receiver.send_message(u'songs_load_list')
=== modified file 'resources/forms/exceptiondialog.ui'
--- resources/forms/exceptiondialog.ui 2010-09-14 18:18:47 +0000
+++ resources/forms/exceptiondialog.ui 2011-02-04 16:55:37 +0000
@@ -13,82 +13,128 @@
<property name="windowTitle">
<string>Dialog</string>
</property>
- <layout class="QVBoxLayout" name="exceptionLayout">
- <property name="spacing">
- <number>8</number>
- </property>
- <property name="margin">
- <number>8</number>
- </property>
- <item>
- <layout class="QHBoxLayout" name="messageLayout">
- <property name="spacing">
- <number>0</number>
- </property>
- <property name="leftMargin">
- <number>0</number>
- </property>
- <property name="rightMargin">
- <number>0</number>
- </property>
- <item>
- <widget class="QLabel" name="bugLabel">
- <property name="minimumSize">
- <size>
- <width>64</width>
- <height>64</height>
- </size>
- </property>
- <property name="maximumSize">
- <size>
- <width>64</width>
- <height>64</height>
- </size>
- </property>
- <property name="text">
- <string/>
- </property>
- <property name="pixmap">
- <pixmap resource="../images/openlp-2.qrc">:/graphics/exception.png</pixmap>
- </property>
- <property name="alignment">
- <set>Qt::AlignCenter</set>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QLabel" name="messageLabel">
- <property name="text">
- <string>Oops! OpenLP hit a problem, and couldn't recover. The text in the box below contains information that might be helpful to the OpenLP developers, so please e-mail it to bugs@xxxxxxxxxx, along with a detailed description of what you were doing when the problem occurred.</string>
- </property>
- <property name="wordWrap">
- <bool>true</bool>
- </property>
- </widget>
- </item>
- </layout>
- </item>
- <item>
- <widget class="QPlainTextEdit" name="exceptionTextEdit">
- <property name="readOnly">
- <bool>true</bool>
- </property>
- <property name="backgroundVisible">
- <bool>false</bool>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QDialogButtonBox" name="exceptionButtonBox">
- <property name="orientation">
- <enum>Qt::Horizontal</enum>
- </property>
- <property name="standardButtons">
- <set>QDialogButtonBox::Close</set>
- </property>
- </widget>
- </item>
- </layout>
+ <widget class="QPlainTextEdit" name="exceptionTextEdit">
+ <property name="geometry">
+ <rect>
+ <x>8</x>
+ <y>194</y>
+ <width>564</width>
+ <height>171</height>
+ </rect>
+ </property>
+ <property name="readOnly">
+ <bool>true</bool>
+ </property>
+ <property name="backgroundVisible">
+ <bool>false</bool>
+ </property>
+ </widget>
+ <widget class="QDialogButtonBox" name="exceptionButtonBox">
+ <property name="geometry">
+ <rect>
+ <x>8</x>
+ <y>373</y>
+ <width>83</width>
+ <height>26</height>
+ </rect>
+ </property>
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="standardButtons">
+ <set>QDialogButtonBox::Close</set>
+ </property>
+ </widget>
+ <widget class="QPlainTextEdit" name="discriptionplainTextEdit">
+ <property name="geometry">
+ <rect>
+ <x>8</x>
+ <y>103</y>
+ <width>561</width>
+ <height>71</height>
+ </rect>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ </widget>
+ <widget class="QLabel" name="characterCount">
+ <property name="geometry">
+ <rect>
+ <x>10</x>
+ <y>170</y>
+ <width>301</width>
+ <height>17</height>
+ </rect>
+ </property>
+ <property name="text">
+ <string>TextLabel</string>
+ </property>
+ </widget>
+ <widget class="QLabel" name="whatyouweredoinglabel">
+ <property name="geometry">
+ <rect>
+ <x>10</x>
+ <y>80</y>
+ <width>59</width>
+ <height>17</height>
+ </rect>
+ </property>
+ <property name="text">
+ <string>TextLabel</string>
+ </property>
+ </widget>
+ <widget class="QWidget" name="">
+ <layout class="QHBoxLayout" name="messageLayout">
+ <property name="spacing">
+ <number>0</number>
+ </property>
+ <property name="leftMargin">
+ <number>0</number>
+ </property>
+ <property name="rightMargin">
+ <number>0</number>
+ </property>
+ <item>
+ <widget class="QLabel" name="bugLabel">
+ <property name="minimumSize">
+ <size>
+ <width>64</width>
+ <height>64</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>64</width>
+ <height>64</height>
+ </size>
+ </property>
+ <property name="text">
+ <string/>
+ </property>
+ <property name="pixmap">
+ <pixmap resource="../images/openlp-2.qrc">:/graphics/exception.png</pixmap>
+ </property>
+ <property name="alignment">
+ <set>Qt::AlignCenter</set>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QLabel" name="messageLabel">
+ <property name="text">
+ <string>Oops! OpenLP hit a problem, and couldn't recover. The text in the box below contains information that might be helpful to the OpenLP developers, so please e-mail it to bugs@xxxxxxxxxx, along with a detailed description of what you were doing when the problem occurred.</string>
+ </property>
+ <property name="wordWrap">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
</widget>
<resources>
<include location="../images/openlp-2.qrc"/>
=== modified file 'setup.py'
--- setup.py 2010-12-26 11:04:47 +0000
+++ setup.py 2011-02-04 16:55:37 +0000
@@ -69,8 +69,7 @@
url='http://openlp.org/',
license='GNU General Public License',
packages=find_packages(exclude=['ez_setup', 'examples', 'tests']),
- scripts=['openlp.pyw', 'scripts/openlp-1to2-converter.py',
- 'scripts/bible-1to2-converter.py','scripts/openlp-remoteclient.py'],
+ scripts=['openlp.pyw', 'scripts/openlp-remoteclient.py'],
include_package_data=True,
zip_safe=False,
install_requires=[