Head r1377

This commit is contained in:
Jon Tibble 2011-03-12 00:36:07 +00:00
commit aaf1fa5269
3 changed files with 13 additions and 3 deletions

View File

@ -256,7 +256,7 @@ def init_schema(url):
mapper(Song, songs_table,
properties={
'authors': relation(Author, backref='songs',
secondary=authors_songs_table),
secondary=authors_songs_table, lazy=False),
'book': relation(Book, backref='songs'),
'media_files': relation(MediaFile, backref='songs',
secondary=media_files_songs_table),

View File

@ -253,9 +253,9 @@ class SongMediaItem(MediaManagerItem):
if self.searchAsYouType:
search_length = 1
if self.searchTextEdit.currentSearchType() == SongSearch.Entire:
search_length = 7
search_length = 4
elif self.searchTextEdit.currentSearchType() == SongSearch.Lyrics:
search_length = 6
search_length = 3
if len(text) > search_length:
self.onSearchTextButtonClick()
elif len(text) == 0:
@ -310,6 +310,7 @@ class SongMediaItem(MediaManagerItem):
item_id = (self.editItem.data(QtCore.Qt.UserRole)).toInt()[0]
self.edit_song_form.loadSong(item_id, False)
self.edit_song_form.exec_()
self.editItem = None
def onDeleteClick(self):
"""

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')) % (