From 2c6d14cfc8fbd68a2b942d255c5d283584e7aeaf Mon Sep 17 00:00:00 2001 From: Chris Blake Date: Mon, 8 Aug 2011 12:59:56 -0400 Subject: [PATCH 1/3] fixed bug #817674 'Export Song - Song list appears to be random order ' Fixes: https://launchpad.net/bugs/817674 --- openlp/plugins/songs/forms/songexportform.py | 1 + 1 file changed, 1 insertion(+) diff --git a/openlp/plugins/songs/forms/songexportform.py b/openlp/plugins/songs/forms/songexportform.py index 3432c8846..1e86c74a1 100644 --- a/openlp/plugins/songs/forms/songexportform.py +++ b/openlp/plugins/songs/forms/songexportform.py @@ -249,6 +249,7 @@ class SongExportForm(OpenLPWizard): # Load the list of songs. Receiver.send_message(u'cursor_busy') songs = self.plugin.manager.get_all_objects(Song) + songs.sort(key=lambda custom: custom.title.lower()) for song in songs: authors = u', '.join([author.display_name for author in song.authors]) From e75631d7f579e2f4990f89626a310703801c238a Mon Sep 17 00:00:00 2001 From: Chris Blake Date: Mon, 8 Aug 2011 13:30:45 -0400 Subject: [PATCH 2/3] fixed bug #817674 'Export Song - Song list appears to be random order ' Fixes: https://launchpad.net/bugs/817674 --- openlp/plugins/songs/forms/songexportform.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openlp/plugins/songs/forms/songexportform.py b/openlp/plugins/songs/forms/songexportform.py index 1e86c74a1..a654db486 100644 --- a/openlp/plugins/songs/forms/songexportform.py +++ b/openlp/plugins/songs/forms/songexportform.py @@ -249,7 +249,7 @@ class SongExportForm(OpenLPWizard): # Load the list of songs. Receiver.send_message(u'cursor_busy') songs = self.plugin.manager.get_all_objects(Song) - songs.sort(key=lambda custom: custom.title.lower()) + songs.sort(key=lambda song: song.title.lower()) for song in songs: authors = u', '.join([author.display_name for author in song.authors]) From 95f75ce26664d501c60a89263aceca8467f08be3 Mon Sep 17 00:00:00 2001 From: Chris Blake Date: Mon, 8 Aug 2011 15:15:45 -0400 Subject: [PATCH 3/3] fixed bug #817674 'Export Song - Song list appears to be random order ' Fixes: https://launchpad.net/bugs/817674 --- openlp/plugins/songs/forms/songexportform.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/openlp/plugins/songs/forms/songexportform.py b/openlp/plugins/songs/forms/songexportform.py index a654db486..90c3b0275 100644 --- a/openlp/plugins/songs/forms/songexportform.py +++ b/openlp/plugins/songs/forms/songexportform.py @@ -28,6 +28,7 @@ The :mod:`songexportform` module provides the wizard for exporting songs to the OpenLyrics format. """ +import locale import logging from PyQt4 import QtCore, QtGui @@ -249,7 +250,7 @@ class SongExportForm(OpenLPWizard): # Load the list of songs. Receiver.send_message(u'cursor_busy') songs = self.plugin.manager.get_all_objects(Song) - songs.sort(key=lambda song: song.title.lower()) + songs.sort(cmp=locale.strcoll, key=lambda song: song.title.lower()) for song in songs: authors = u', '.join([author.display_name for author in song.authors])