Status: | Merged | ||||||||
---|---|---|---|---|---|---|---|---|---|
Merged at revision: | not available | ||||||||
Proposed branch: | lp:~trb143/openlp/bugfixes | ||||||||
Merge into: | lp:openlp | ||||||||
Diff against target: | None lines | ||||||||
To merge this branch: | bzr merge lp:~trb143/openlp/bugfixes | ||||||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Raoul Snyman | Approve | ||
Review via email: mp+8710@code.launchpad.net |
This proposal supersedes a proposal from 2009-07-13.
Commit message
Description of the change
To post a comment you must log in.
Revision history for this message
Tim Bentley (trb143) wrote : Posted in a previous version of this proposal | # |
Revision history for this message
Raoul Snyman (raoul-snyman) wrote : | # |
Can't see any glaring problems.
review:
Approve
lp:~trb143/openlp/bugfixes
updated
- 492. By Tim Bentley
-
Bug fixes from the wiki
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file 'openlp/plugins/bibles/lib/bibleHTTPimpl.py' | |||
2 | --- openlp/plugins/bibles/lib/bibleHTTPimpl.py 2009-06-20 19:11:17 +0000 | |||
3 | +++ openlp/plugins/bibles/lib/bibleHTTPimpl.py 2009-07-12 15:11:57 +0000 | |||
4 | @@ -116,6 +116,7 @@ | |||
5 | 116 | ## Strip Verse Data from Page and build an array | 116 | ## Strip Verse Data from Page and build an array |
6 | 117 | ## | 117 | ## |
7 | 118 | #log.debug(u'bible data %s', xml_string) | 118 | #log.debug(u'bible data %s', xml_string) |
8 | 119 | #print xml_string | ||
9 | 119 | i= xml_string.find(u'NavCurrentChapter') | 120 | i= xml_string.find(u'NavCurrentChapter') |
10 | 120 | xml_string = xml_string[i:len(xml_string)] | 121 | xml_string = xml_string[i:len(xml_string)] |
11 | 121 | i= xml_string.find(u'<TABLE') | 122 | i= xml_string.find(u'<TABLE') |
12 | @@ -136,11 +137,10 @@ | |||
13 | 136 | i = xml_string.find(u'</I></B>', versePos) | 137 | i = xml_string.find(u'</I></B>', versePos) |
14 | 137 | #log.debug( versePos, i) | 138 | #log.debug( versePos, i) |
15 | 138 | verse= xml_string[versePos:i] # Got the Chapter | 139 | verse= xml_string[versePos:i] # Got the Chapter |
16 | 139 | #verse = int(temp) | ||
17 | 140 | #log.debug( 'Chapter = %s', verse) | 140 | #log.debug( 'Chapter = %s', verse) |
18 | 141 | # move the starting position to begining of the text | 141 | # move the starting position to begining of the text |
19 | 142 | versePos = i + 8 | 142 | versePos = i + 8 |
21 | 143 | # fined the start of the next verse | 143 | # find the start of the next verse |
22 | 144 | i = xml_string.find(u'<B><I>', versePos) | 144 | i = xml_string.find(u'<B><I>', versePos) |
23 | 145 | if i == -1: | 145 | if i == -1: |
24 | 146 | i = xml_string.find(u'</BLOCKQUOTE>',versePos) | 146 | i = xml_string.find(u'</BLOCKQUOTE>',versePos) |
25 | @@ -150,6 +150,7 @@ | |||
26 | 150 | #log.debug( i, versePos) | 150 | #log.debug( i, versePos) |
27 | 151 | verseText = xml_string[versePos: i] | 151 | verseText = xml_string[versePos: i] |
28 | 152 | versePos = i | 152 | versePos = i |
29 | 153 | #print verseText | ||
30 | 153 | bible[verse] = self._clean_text(verseText) | 154 | bible[verse] = self._clean_text(verseText) |
31 | 154 | #bible[verse] = verseText | 155 | #bible[verse] = verseText |
32 | 155 | 156 | ||
33 | 156 | 157 | ||
34 | === modified file 'openlp/plugins/bibles/lib/common.py' | |||
35 | --- openlp/plugins/bibles/lib/common.py 2009-07-07 20:18:36 +0000 | |||
36 | +++ openlp/plugins/bibles/lib/common.py 2009-07-12 15:11:57 +0000 | |||
37 | @@ -132,6 +132,11 @@ | |||
38 | 132 | end_tag = text.find(u'</sup>') | 132 | end_tag = text.find(u'</sup>') |
39 | 133 | text = text[:start_tag] + text[end_tag + 6:len(text)] | 133 | text = text[:start_tag] + text[end_tag + 6:len(text)] |
40 | 134 | start_tag = text.find(u'<sup>') | 134 | start_tag = text.find(u'<sup>') |
41 | 135 | start_tag = text.find(u'<SUP>') | ||
42 | 136 | while start_tag > -1: | ||
43 | 137 | end_tag = text.find(u'</SUP>') | ||
44 | 138 | text = text[:start_tag] + text[end_tag + 6:len(text)] | ||
45 | 139 | start_tag = text.find(u'<SUP>') | ||
46 | 135 | # Static Clean ups | 140 | # Static Clean ups |
47 | 136 | text = text.replace(u'\n', u'') | 141 | text = text.replace(u'\n', u'') |
48 | 137 | text = text.replace(u'\r', u'') | 142 | text = text.replace(u'\r', u'') |
49 | 138 | 143 | ||
50 | === modified file 'openlp/plugins/bibles/lib/mediaitem.py' | |||
51 | --- openlp/plugins/bibles/lib/mediaitem.py 2009-07-07 16:35:01 +0000 | |||
52 | +++ openlp/plugins/bibles/lib/mediaitem.py 2009-07-13 17:02:38 +0000 | |||
53 | @@ -350,7 +350,8 @@ | |||
54 | 350 | chapter = unicode(self.search_results[0][1]) | 350 | chapter = unicode(self.search_results[0][1]) |
55 | 351 | verse = unicode(self.search_results[0][2]) | 351 | verse = unicode(self.search_results[0][2]) |
56 | 352 | text = self.search_results[0][3] | 352 | text = self.search_results[0][3] |
58 | 353 | if self.parent.bibles_tab.paragraph_style: #Paragraph | 353 | #Paragraph style force new line per verse |
59 | 354 | if self.parent.bibles_tab.paragraph_style: | ||
60 | 354 | text = text + u'\n\n' | 355 | text = text + u'\n\n' |
61 | 355 | if self.parent.bibles_tab.display_style == 1: | 356 | if self.parent.bibles_tab.display_style == 1: |
62 | 356 | loc = self.formatVerse(old_chapter, chapter, verse, u'(u', u')') | 357 | loc = self.formatVerse(old_chapter, chapter, verse, u'(u', u')') |
63 | @@ -363,8 +364,11 @@ | |||
64 | 363 | old_chapter = chapter | 364 | old_chapter = chapter |
65 | 364 | bible_text = bible_text + u' '+ loc + u' '+ text | 365 | bible_text = bible_text + u' '+ loc + u' '+ text |
66 | 365 | service_item.title = book + u' ' + loc | 366 | service_item.title = book + u' ' + loc |
69 | 366 | if len(raw_footer) <= 1: | 367 | footer = book + u' (' + self.version + u' ' + self.copyright +u')' |
70 | 367 | raw_footer.append(book) | 368 | try: |
71 | 369 | raw_footer.index(footer) | ||
72 | 370 | except: | ||
73 | 371 | raw_footer.append(footer) | ||
74 | 368 | if len(self.parent.bibles_tab.bible_theme) == 0: | 372 | if len(self.parent.bibles_tab.bible_theme) == 0: |
75 | 369 | service_item.theme = None | 373 | service_item.theme = None |
76 | 370 | else: | 374 | else: |
77 | @@ -503,6 +507,9 @@ | |||
78 | 503 | self.search_results = self.parent.biblemanager.get_verse_text(bible, book, | 507 | self.search_results = self.parent.biblemanager.get_verse_text(bible, book, |
79 | 504 | int(start_chapter), int(end_chapter), int(start_verse), | 508 | int(start_chapter), int(end_chapter), int(start_verse), |
80 | 505 | int(end_verse)) | 509 | int(end_verse)) |
81 | 510 | self.copyright = unicode(self.parent.biblemanager.get_meta_data(bible, u'Copyright').value) | ||
82 | 511 | self.permissions = unicode(self.parent.biblemanager.get_meta_data(bible, u'Permissions').value) | ||
83 | 512 | self.version = unicode(self.parent.biblemanager.get_meta_data(bible, u'Version').value) | ||
84 | 506 | else: | 513 | else: |
85 | 507 | reply = QtGui.QMessageBox.information(self, | 514 | reply = QtGui.QMessageBox.information(self, |
86 | 508 | translate(u'BibleMediaItem', u'Information'), | 515 | translate(u'BibleMediaItem', u'Information'), |
87 | 509 | 516 | ||
88 | === modified file 'openlp/plugins/songs/forms/editsongform.py' | |||
89 | --- openlp/plugins/songs/forms/editsongform.py 2009-06-27 19:55:55 +0000 | |||
90 | +++ openlp/plugins/songs/forms/editsongform.py 2009-07-13 17:02:38 +0000 | |||
91 | @@ -139,6 +139,7 @@ | |||
92 | 139 | self.AuthorsListView.clear() | 139 | self.AuthorsListView.clear() |
93 | 140 | self.TopicsListView.clear() | 140 | self.TopicsListView.clear() |
94 | 141 | self.title_change = False | 141 | self.title_change = False |
95 | 142 | self.TitleEditItem.setFocus(QtCore.Qt.OtherFocusReason) | ||
96 | 142 | 143 | ||
97 | 143 | def loadSong(self, id): | 144 | def loadSong(self, id): |
98 | 144 | log.debug(u'Load Song') | 145 | log.debug(u'Load Song') |
99 | @@ -161,16 +162,19 @@ | |||
100 | 161 | self.SongbookCombo.setCurrentIndex(id) | 162 | self.SongbookCombo.setCurrentIndex(id) |
101 | 162 | if len(title) > 1: | 163 | if len(title) > 1: |
102 | 163 | self.AlternativeEdit.setText(title[1]) | 164 | self.AlternativeEdit.setText(title[1]) |
104 | 164 | self.CopyrightEditItem.setText(self.song.copyright) | 165 | if self.song.copyright is not None: |
105 | 166 | self.CopyrightEditItem.setText(self.song.copyright) | ||
106 | 167 | else: | ||
107 | 168 | self.CopyrightEditItem.setText(u'') | ||
108 | 165 | self.VerseListWidget.clear() | 169 | self.VerseListWidget.clear() |
109 | 166 | if self.song.verse_order is not None: | 170 | if self.song.verse_order is not None: |
110 | 167 | self.VerseOrderEdit.setText(self.song.verse_order) | 171 | self.VerseOrderEdit.setText(self.song.verse_order) |
111 | 168 | else: | 172 | else: |
112 | 169 | self.VerseOrderEdit.setText(u'') | 173 | self.VerseOrderEdit.setText(u'') |
113 | 170 | if self.song.comments is not None: | 174 | if self.song.comments is not None: |
115 | 171 | self.CommentsEdit.setText(self.song.comments) | 175 | self.CommentsEdit.setPlainText(self.song.comments) |
116 | 172 | else: | 176 | else: |
118 | 173 | self.CommentsEdit.setText(u'') | 177 | self.CommentsEdit.setPlainText(u'') |
119 | 174 | if self.song.ccli_number is not None: | 178 | if self.song.ccli_number is not None: |
120 | 175 | self.CCLNumberEdit.setText(self.song.ccli_number) | 179 | self.CCLNumberEdit.setText(self.song.ccli_number) |
121 | 176 | else: | 180 | else: |
122 | @@ -199,6 +203,7 @@ | |||
123 | 199 | self.TopicsListView.addItem(topic_name) | 203 | self.TopicsListView.addItem(topic_name) |
124 | 200 | self._validate_song() | 204 | self._validate_song() |
125 | 201 | self.title_change = False | 205 | self.title_change = False |
126 | 206 | self.TitleEditItem.setFocus(QtCore.Qt.OtherFocusReason) | ||
127 | 202 | 207 | ||
128 | 203 | def onAuthorAddtoSongItemClicked(self): | 208 | def onAuthorAddtoSongItemClicked(self): |
129 | 204 | item = int(self.AuthorsSelectionComboItem.currentIndex()) | 209 | item = int(self.AuthorsSelectionComboItem.currentIndex()) |
130 | @@ -296,6 +301,7 @@ | |||
131 | 296 | self.verse_form.setVerse(item.text()) | 301 | self.verse_form.setVerse(item.text()) |
132 | 297 | self.verse_form.exec_() | 302 | self.verse_form.exec_() |
133 | 298 | item.setText(self.verse_form.getVerse()) | 303 | item.setText(self.verse_form.getVerse()) |
134 | 304 | self.VerseListWidget.update() | ||
135 | 299 | self.EditButton.setEnabled(False) | 305 | self.EditButton.setEnabled(False) |
136 | 300 | self.DeleteButton.setEnabled(False) | 306 | self.DeleteButton.setEnabled(False) |
137 | 301 | 307 | ||
138 | @@ -356,7 +362,9 @@ | |||
139 | 356 | return | 362 | return |
140 | 357 | self.song.title = unicode(self.TitleEditItem.displayText()) | 363 | self.song.title = unicode(self.TitleEditItem.displayText()) |
141 | 358 | self.song.copyright = unicode(self.CopyrightEditItem.displayText()) | 364 | self.song.copyright = unicode(self.CopyrightEditItem.displayText()) |
143 | 359 | self.song.search_title = self.TitleEditItem.displayText() + u'@'+ self.AlternativeEdit.displayText() | 365 | self.song.search_title = unicode(self.TitleEditItem.displayText()) + u'@'+ unicode(self.AlternativeEdit.displayText()) |
144 | 366 | self.song.comments = unicode(self.CommentsEdit.toPlainText()) | ||
145 | 367 | self.song.ccli_number = unicode(self.CCLNumberEdit.displayText()) | ||
146 | 360 | self.processLyrics() | 368 | self.processLyrics() |
147 | 361 | self.processTitle() | 369 | self.processTitle() |
148 | 362 | self.song.song_book_id = 0 | 370 | self.song.song_book_id = 0 |
149 | @@ -380,7 +388,7 @@ | |||
150 | 380 | count += 1 | 388 | count += 1 |
151 | 381 | if self.song.verse_order is None: | 389 | if self.song.verse_order is None: |
152 | 382 | self.song.verse_order = verse_order | 390 | self.song.verse_order = verse_order |
154 | 383 | text = text.replace("'", u'') | 391 | text = text.replace(u'\'', u'') |
155 | 384 | text = text.replace(u',', u'') | 392 | text = text.replace(u',', u'') |
156 | 385 | text = text.replace(u';', u'') | 393 | text = text.replace(u';', u'') |
157 | 386 | text = text.replace(u':', u'') | 394 | text = text.replace(u':', u'') |
158 | @@ -394,7 +402,7 @@ | |||
159 | 394 | 402 | ||
160 | 395 | def processTitle(self): | 403 | def processTitle(self): |
161 | 396 | log.debug(u'processTitle') | 404 | log.debug(u'processTitle') |
163 | 397 | self.song.search_title = self.song.search_title.replace("'", u'') | 405 | self.song.search_title = self.song.search_title.replace(u'\'', u'') |
164 | 398 | self.song.search_title = self.song.search_title.replace(u',', u'') | 406 | self.song.search_title = self.song.search_title.replace(u',', u'') |
165 | 399 | self.song.search_title = self.song.search_title.replace(u';', u'') | 407 | self.song.search_title = self.song.search_title.replace(u';', u'') |
166 | 400 | self.song.search_title = self.song.search_title.replace(u':', u'') | 408 | self.song.search_title = self.song.search_title.replace(u':', u'') |
167 | 401 | 409 | ||
168 | === modified file 'openlp/plugins/songs/forms/editversedialog.py' | |||
169 | --- openlp/plugins/songs/forms/editversedialog.py 2009-06-10 17:12:03 +0000 | |||
170 | +++ openlp/plugins/songs/forms/editversedialog.py 2009-07-12 14:56:06 +0000 | |||
171 | @@ -1,12 +1,22 @@ | |||
172 | 1 | # -*- coding: utf-8 -*- | 1 | # -*- coding: utf-8 -*- |
181 | 2 | 2 | # vim: autoindent shiftwidth=4 expandtab textwidth=80 tabstop=4 softtabstop=4 | |
182 | 3 | # Form implementation generated from reading ui file '/home/raoul/Projects/openlp-2/resources/forms/editversedialog.ui' | 3 | """ |
183 | 4 | # | 4 | OpenLP - Open Source Lyrics Projection |
184 | 5 | # Created: Sat Mar 7 11:11:49 2009 | 5 | Copyright (c) 2008 Raoul Snyman |
185 | 6 | # by: PyQt4 UI code generator 4.4.4 | 6 | Portions copyright (c) 2008-2009 Martin Thompson, Tim Bentley, |
186 | 7 | # | 7 | |
187 | 8 | # WARNING! All changes made in this file will be lost! | 8 | This program is free software; you can redistribute it and/or modify it under |
188 | 9 | 9 | the terms of the GNU General Public License as published by the Free Software | |
189 | 10 | Foundation; version 2 of the License. | ||
190 | 11 | |||
191 | 12 | This program is distributed in the hope that it will be useful, but WITHOUT ANY | ||
192 | 13 | WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A | ||
193 | 14 | PARTICULAR PURPOSE. See the GNU General Public License for more details. | ||
194 | 15 | |||
195 | 16 | You should have received a copy of the GNU General Public License along with | ||
196 | 17 | this program; if not, write to the Free Software Foundation, Inc., 59 Temple | ||
197 | 18 | Place, Suite 330, Boston, MA 02111-1307 USA | ||
198 | 19 | """ | ||
199 | 10 | from PyQt4 import QtCore, QtGui | 20 | from PyQt4 import QtCore, QtGui |
200 | 11 | from openlp.core.lib import translate | 21 | from openlp.core.lib import translate |
201 | 12 | 22 | ||
202 | @@ -28,11 +38,11 @@ | |||
203 | 28 | self.ButtonBox.setStandardButtons(QtGui.QDialogButtonBox.Cancel|QtGui.QDialogButtonBox.Save) | 38 | self.ButtonBox.setStandardButtons(QtGui.QDialogButtonBox.Cancel|QtGui.QDialogButtonBox.Save) |
204 | 29 | self.ButtonBox.setObjectName(u'ButtonBox') | 39 | self.ButtonBox.setObjectName(u'ButtonBox') |
205 | 30 | self.DialogLayout.addWidget(self.ButtonBox) | 40 | self.DialogLayout.addWidget(self.ButtonBox) |
206 | 31 | |||
207 | 32 | self.retranslateUi(EditVerseDialog) | 41 | self.retranslateUi(EditVerseDialog) |
208 | 33 | QtCore.QObject.connect(self.ButtonBox, QtCore.SIGNAL(u'accepted()'), EditVerseDialog.accept) | 42 | QtCore.QObject.connect(self.ButtonBox, QtCore.SIGNAL(u'accepted()'), EditVerseDialog.accept) |
209 | 34 | QtCore.QObject.connect(self.ButtonBox, QtCore.SIGNAL(u'rejected()'), EditVerseDialog.reject) | 43 | QtCore.QObject.connect(self.ButtonBox, QtCore.SIGNAL(u'rejected()'), EditVerseDialog.reject) |
210 | 35 | QtCore.QMetaObject.connectSlotsByName(EditVerseDialog) | 44 | QtCore.QMetaObject.connectSlotsByName(EditVerseDialog) |
211 | 45 | self.VerseTextEdit.setFocus(QtCore.Qt.OtherFocusReason) | ||
212 | 36 | 46 | ||
213 | 37 | def retranslateUi(self, EditVerseDialog): | 47 | def retranslateUi(self, EditVerseDialog): |
215 | 38 | EditVerseDialog.setWindowTitle(translate(u'EditVerseDialog', u'Dialog')) | 48 | EditVerseDialog.setWindowTitle(translate(u'EditVerseDialog', u'Song Verse Edit Dialog')) |
216 | 39 | 49 | ||
217 | === modified file 'openlp/plugins/songs/forms/editverseform.py' | |||
218 | --- openlp/plugins/songs/forms/editverseform.py 2009-03-07 21:38:59 +0000 | |||
219 | +++ openlp/plugins/songs/forms/editverseform.py 2009-07-12 14:56:06 +0000 | |||
220 | @@ -3,7 +3,7 @@ | |||
221 | 3 | """ | 3 | """ |
222 | 4 | OpenLP - Open Source Lyrics Projection | 4 | OpenLP - Open Source Lyrics Projection |
223 | 5 | Copyright (c) 2008 Raoul Snyman | 5 | Copyright (c) 2008 Raoul Snyman |
225 | 6 | Portions copyright (c) 2008 Martin Thompson, Tim Bentley, | 6 | Portions copyright (c) 2008-2009 Martin Thompson, Tim Bentley, |
226 | 7 | 7 | ||
227 | 8 | This program is free software; you can redistribute it and/or modify it under | 8 | This program is free software; you can redistribute it and/or modify it under |
228 | 9 | the terms of the GNU General Public License as published by the Free Software | 9 | the terms of the GNU General Public License as published by the Free Software |
229 | @@ -35,6 +35,7 @@ | |||
230 | 35 | 35 | ||
231 | 36 | def setVerse(self, verse): | 36 | def setVerse(self, verse): |
232 | 37 | self.VerseTextEdit.setPlainText(verse) | 37 | self.VerseTextEdit.setPlainText(verse) |
233 | 38 | self.VerseTextEdit.setFocus(QtCore.Qt.OtherFocusReason) | ||
234 | 38 | 39 | ||
235 | 39 | def getVerse(self): | 40 | def getVerse(self): |
236 | 40 | return self.VerseTextEdit.toPlainText() | 41 | return self.VerseTextEdit.toPlainText() |
Bible and Song bug fixes