Merge lp:~raoul-snyman/openlp/bug-802146 into lp:openlp

Proposed by Raoul Snyman
Status: Merged
Approved by: Tim Bentley
Approved revision: 1711
Merged at revision: 1711
Proposed branch: lp:~raoul-snyman/openlp/bug-802146
Merge into: lp:openlp
Diff against target: 57 lines (+7/-7)
2 files modified
openlp/core/ui/mainwindow.py (+4/-4)
openlp/plugins/songs/lib/songshowplusimport.py (+3/-3)
To merge this branch: bzr merge lp:~raoul-snyman/openlp/bug-802146
Reviewer Review Type Date Requested Status
Tim Bentley Approve
Andreas Preikschat (community) Approve
Review via email: mp+71780@code.launchpad.net

Commit message

Fixed bug #802146: Couldn't import some SongShowPlus files. Rearranged the file menu as well to be in a more logical order, and to look a little nicer.

Description of the change

Fixed bug #802146: Couldn't import some SongShowPlus files.
Rearranged the file menu as well to be in a more logical order, and to look a little nicer.

To post a comment you must log in.
Revision history for this message
Andreas Preikschat (googol-deactivatedaccount) :
review: Approve
Revision history for this message
Tim Bentley (trb143) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'openlp/core/ui/mainwindow.py'
2--- openlp/core/ui/mainwindow.py 2011-08-11 09:01:25 +0000
3+++ openlp/core/ui/mainwindow.py 2011-08-16 21:24:24 +0000
4@@ -305,10 +305,10 @@
5 add_actions(self.fileExportMenu,
6 (self.exportThemeItem, self.exportLanguageItem))
7 add_actions(self.fileMenu, (self.fileNewItem, self.fileOpenItem,
8- self.fileSaveItem, self.fileSaveAsItem, None,
9- self.recentFilesMenu.menuAction(), None, self.printServiceOrderItem,
10- None, self.fileImportMenu.menuAction(),
11- self.fileExportMenu.menuAction(), self.fileExitItem))
12+ self.fileSaveItem, self.fileSaveAsItem,
13+ self.recentFilesMenu.menuAction(), None,
14+ self.fileImportMenu.menuAction(), self.fileExportMenu.menuAction(),
15+ None, self.printServiceOrderItem, self.fileExitItem))
16 add_actions(self.viewModeMenu, (self.modeDefaultItem,
17 self.modeSetupItem, self.modeLiveItem))
18 add_actions(self.viewMenu, (self.viewModeMenu.menuAction(),
19
20=== modified file 'openlp/plugins/songs/lib/songshowplusimport.py'
21--- openlp/plugins/songs/lib/songshowplusimport.py 2011-06-14 05:45:23 +0000
22+++ openlp/plugins/songs/lib/songshowplusimport.py 2011-08-16 21:24:24 +0000
23@@ -102,7 +102,6 @@
24 if not isinstance(self.import_source, list):
25 return
26 self.import_wizard.progressBar.setMaximum(len(self.import_source))
27-
28 for file in self.import_source:
29 self.sspVerseOrderList = []
30 otherCount = 0
31@@ -111,7 +110,6 @@
32 self.import_wizard.incrementProgressBar(
33 WizardStrings.ImportingType % file_name, 0)
34 songData = open(file, 'rb')
35-
36 while True:
37 blockKey, = struct.unpack("I", songData.read(4))
38 # The file ends with 4 NUL's
39@@ -126,8 +124,9 @@
40 songData.read(2))
41 verseName = songData.read(verseNameLength)
42 lengthDescriptorSize, = struct.unpack("B", songData.read(1))
43+ log.debug(lengthDescriptorSize)
44 # Detect if/how long the length descriptor is
45- if lengthDescriptorSize == 12:
46+ if lengthDescriptorSize == 12 or lengthDescriptorSize == 20:
47 lengthDescriptor, = struct.unpack("I", songData.read(4))
48 elif lengthDescriptorSize == 2:
49 lengthDescriptor = 1
50@@ -135,6 +134,7 @@
51 lengthDescriptor = 0
52 else:
53 lengthDescriptor, = struct.unpack("B", songData.read(1))
54+ log.debug(lengthDescriptorSize)
55 data = songData.read(lengthDescriptor)
56 if blockKey == TITLE:
57 self.title = unicode(data, u'cp1252')