Force path for Song Usage

bzr-revno: 1377
Fixes: https://launchpad.net/bugs/733271
This commit is contained in:
Tim Bentley 2011-03-11 20:47:19 +00:00
commit 4ad32acc82
1 changed files with 9 additions and 0 deletions

View File

@ -88,6 +88,15 @@ class SongUsageDetailForm(QtGui.QDialog, Ui_SongUsageDetailDialog):
"""
log.debug(u'accept')
path = unicode(self.fileLineEdit.text())
if path == u'':
Receiver.send_message(u'openlp_error_message', {
u'title': translate('SongUsagePlugin.SongUsageDetailForm',
'Output Path Not Selected'),
u'message': unicode(translate(
'SongUsagePlugin.SongUsageDetailForm', 'You have not set a '
'valid output location for your song usage report. Please '
'select an existing path on your computer.'))})
return
check_directory_exists(path)
filename = unicode(translate('SongUsagePlugin.SongUsageDetailForm',
'usage_detail_%s_%s.txt')) % (