Re: [Openlp-core] [Merge] lp:~tomasgroth/openlp/mupdf into lp:openlp
Review: Needs Fixing Looks good but these need to be fixed. * settings screen the grouping has moved from the left side to the middle. * settings screen binary has the y half chopped off. * showing an image live / preview does not work when loaded from the service manager. Fine from the media manager. Have not tried to save / reload but guess that is broken. * blank lines in functions please remove (general) * questions in comments please removed. * check_binary why is this outside the class as a standalone function? * if os.name != u'nt': swap logic round so is positive and less chance of a miss read. * 320 would this be better to have in the code a file instead of writing to a file each run? * if self.pdf_program_path.text() != u'': should be if not self.pdf_program_path.text(): - General point. * setting do not need given in the string. * img should be image (old bad code copied! * no tests. * line 53 far too long. * lines 52-64 do we need all this. if the images are generated then it would be a case of just loading them not processing them again? -- https://code.launchpad.net/~tomasgroth/openlp/mupdf/+merge/182009 Your team OpenLP Core is subscribed to branch lp:openlp. ___ Mailing list: https://launchpad.net/~openlp-core Post to : openlp-core@lists.launchpad.net Unsubscribe : https://launchpad.net/~openlp-core More help : https://help.launchpad.net/ListHelp
[Openlp-core] [Bug 1216785] [NEW] Adding notes to service causes error on save
Public bug reported: http://support.openlp.org/issues/2066 With 2.0.2 add a note to an item in the service manager. Click File-Save: Follow traceback pops up: --- Exception Traceback --- Traceback (most recent call last): File /usr/share/openlp/openlp/core/ui/servicemanager.py, line 546, in saveFile service_content = json.dumps(service) File /usr/lib/python2.7/json/__init__.py, line 233, in dumps return _default_encoder.encode(obj) File /usr/lib/python2.7/json/encoder.py, line 203, in encode chunks = self.iterencode(o, _one_shot=True) File /usr/lib/python2.7/json/encoder.py, line 266, in iterencode return _iterencode(o, 0) File /usr/lib/python2.7/json/encoder.py, line 180, in default raise TypeError(repr(o)is not JSON serializable) TypeError: PyQt4.QtCore.QString(u'After the sermon.') is not JSON serializable ** Affects: openlp Importance: Undecided Status: New ** Affects: openlp/2.0 Importance: High Status: Confirmed ** Affects: openlp/trunk Importance: Undecided Status: New ** Tags: notes service support-system ** Also affects: openlp/2.0 Importance: Undecided Status: New ** Also affects: openlp/trunk Importance: Undecided Status: New ** Changed in: openlp/2.0 Status: New = Confirmed ** Changed in: openlp/2.0 Importance: Undecided = High ** Changed in: openlp/2.0 Milestone: None = 2.0.3 ** Changed in: openlp/trunk Milestone: None = 2.1.1 ** Tags added: notes service support-system -- You received this bug notification because you are a member of OpenLP Core, which is subscribed to OpenLP. https://bugs.launchpad.net/bugs/1216785 Title: Adding notes to service causes error on save Status in OpenLP - Worship Presentation Software: New Status in OpenLP 2.0 series: Confirmed Status in OpenLP trunk series: New Bug description: http://support.openlp.org/issues/2066 With 2.0.2 add a note to an item in the service manager. Click File-Save: Follow traceback pops up: --- Exception Traceback --- Traceback (most recent call last): File /usr/share/openlp/openlp/core/ui/servicemanager.py, line 546, in saveFile service_content = json.dumps(service) File /usr/lib/python2.7/json/__init__.py, line 233, in dumps return _default_encoder.encode(obj) File /usr/lib/python2.7/json/encoder.py, line 203, in encode chunks = self.iterencode(o, _one_shot=True) File /usr/lib/python2.7/json/encoder.py, line 266, in iterencode return _iterencode(o, 0) File /usr/lib/python2.7/json/encoder.py, line 180, in default raise TypeError(repr(o)is not JSON serializable) TypeError: PyQt4.QtCore.QString(u'After the sermon.') is not JSON serializable To manage notifications about this bug go to: https://bugs.launchpad.net/openlp/+bug/1216785/+subscriptions ___ Mailing list: https://launchpad.net/~openlp-core Post to : openlp-core@lists.launchpad.net Unsubscribe : https://launchpad.net/~openlp-core More help : https://help.launchpad.net/ListHelp
[Openlp-core] [Merge] lp:~oliwee/openlp/HideBibleVerses into lp:openlp
Oliver Wieland has proposed merging lp:~oliwee/openlp/HideBibleVerses into lp:openlp. Requested reviews: Andreas Preikschat (googol) Tim Bentley (trb143) Raoul Snyman (raoul-snyman) Related bugs: Bug #1051699 in OpenLP: Bibles add option to not display chapter and verse numbers https://bugs.launchpad.net/openlp/+bug/1051699 For more details, see: https://code.launchpad.net/~oliwee/openlp/HideBibleVerses/+merge/182165 The changes add a Checkbox at the Bibles settings tab to show or hide the verse numbers. Therefor a new element Display verse numbers in the settings is implemented. On default, this element is set to True. If the value is set to False, the values Show new chapters and Display Style are not relevant and the input fields at the Bibles settings tab will be greyed out. -- https://code.launchpad.net/~oliwee/openlp/HideBibleVerses/+merge/182165 Your team OpenLP Core is subscribed to branch lp:openlp. === modified file 'openlp/plugins/bibles/bibleplugin.py' --- openlp/plugins/bibles/bibleplugin.py 2013-04-18 17:45:14 + +++ openlp/plugins/bibles/bibleplugin.py 2013-08-26 17:19:37 + @@ -48,6 +48,7 @@ u'bibles/verse layout style': LayoutStyle.VersePerSlide, u'bibles/book name language': LanguageSelection.Bible, u'bibles/display brackets': DisplayStyle.NoBrackets, +u'bibles/is verse number visible': True, u'bibles/display new chapter': False, u'bibles/second bibles': True, u'bibles/advanced bible': u'', === modified file 'openlp/plugins/bibles/lib/biblestab.py' --- openlp/plugins/bibles/lib/biblestab.py 2013-03-25 07:27:54 + +++ openlp/plugins/bibles/lib/biblestab.py 2013-08-26 17:19:37 + @@ -58,6 +58,9 @@ self.verse_display_group_box.setObjectName(u'verse_display_group_box') self.verse_display_layout = QtGui.QFormLayout(self.verse_display_group_box) self.verse_display_layout.setObjectName(u'verse_display_layout') +self.is_verse_number_visible_check_box = QtGui.QCheckBox(self.verse_display_group_box) +self.is_verse_number_visible_check_box.setObjectName(u'is_verse_number_visible_check_box') +self.verse_display_layout.addRow(self.is_verse_number_visible_check_box) self.new_chapters_check_box = QtGui.QCheckBox(self.verse_display_group_box) self.new_chapters_check_box.setObjectName(u'new_chapters_check_box') self.verse_display_layout.addRow(self.new_chapters_check_box) @@ -134,6 +137,7 @@ self.left_layout.addStretch() self.right_layout.addStretch() # Signals and slots +self.is_verse_number_visible_check_box.stateChanged.connect(self.on_is_verse_number_visible_check_box_changed) self.new_chapters_check_box.stateChanged.connect(self.on_new_chapters_check_box_changed) self.display_style_combo_box.activated.connect(self.on_display_style_combo_box_changed) self.bible_theme_combo_box.activated.connect(self.on_bible_theme_combo_box_changed) @@ -156,6 +160,7 @@ def retranslateUi(self): self.verse_display_group_box.setTitle(translate('BiblesPlugin.BiblesTab', 'Verse Display')) +self.is_verse_number_visible_check_box.setText(translate('BiblesPlugin.BiblesTab', 'Show verse numbers')) self.new_chapters_check_box.setText(translate('BiblesPlugin.BiblesTab', 'Only show new chapter numbers')) self.layout_style_label.setText(UiStrings().LayoutStyle) self.display_style_label.setText(UiStrings().DisplayStyle) @@ -208,6 +213,16 @@ def on_language_selection_combo_box_changed(self): self.language_selection = self.language_selection_combo_box.currentIndex() +def on_is_verse_number_visible_check_box_changed(self, check_state): + +Event handler for the 'verse number visible' check box + +self.is_verse_number_visible = False +# We have a set value convert to True/False. +if check_state == QtCore.Qt.Checked: +self.is_verse_number_visible = True +self.check_is_verse_number_visible() + def on_new_chapters_check_box_changed(self, check_state): self.show_new_chapters = False # We have a set value convert to True/False. @@ -299,11 +314,14 @@ def load(self): settings = Settings() settings.beginGroup(self.settings_section) +self.is_verse_number_visible = settings.value(u'is verse number visible') self.show_new_chapters = settings.value(u'display new chapter') self.display_style = settings.value(u'display brackets') self.layout_style = settings.value(u'verse layout style') self.bible_theme = settings.value(u'bible theme') self.second_bibles = settings.value(u'second bibles') +self.is_verse_number_visible_check_box.setChecked(self.is_verse_number_visible) +self.check_is_verse_number_visible() self.new_chapters_check_box.setChecked(self.show_new_chapters)
[Openlp-core] [Merge] lp:~oliwee/openlp/1173749-2.0 into lp:openlp/2.0
Oliver Wieland has proposed merging lp:~oliwee/openlp/1173749-2.0 into lp:openlp/2.0. Requested reviews: OpenLP Core (openlp-core) Related bugs: Bug #1173749 in OpenLP: Songs with mismatching formatting tags still throw an exception https://bugs.launchpad.net/openlp/+bug/1173749 For more details, see: https://code.launchpad.net/~oliwee/openlp/1173749-2.0/+merge/182178 Partially fix of Bug 1173749. Validates the tags in the lyrics on editing a song. If there are misplaced tags, a message box will appear. -- https://code.launchpad.net/~oliwee/openlp/1173749-2.0/+merge/182178 Your team OpenLP Core is requested to review the proposed merge of lp:~oliwee/openlp/1173749-2.0 into lp:openlp/2.0. === modified file 'openlp/plugins/songs/forms/editsongform.py' --- openlp/plugins/songs/forms/editsongform.py 2013-08-21 20:26:53 + +++ openlp/plugins/songs/forms/editsongform.py 2013-08-26 18:01:40 + @@ -132,6 +132,7 @@ self.audioListWidget.setAlternatingRowColors(True) self.findVerseSplit = re.compile(u'---\[\]---\n', re.UNICODE) self.whitespace = re.compile(r'\W+', re.UNICODE) +self.find_tags = re.compile(u'\{/?\w+\}', re.UNICODE) def keyPressEvent(self, event): @@ -720,8 +721,43 @@ self.manager.save_object(book) else: return False +for i in range(self.verseListWidget.rowCount()): +item = self.verseListWidget.item(i, 0) +tags = self.find_tags.findall(item.text()) +if self._validate_tags(tags) == False: +field = unicode(item.data(QtCore.Qt.UserRole).toString()) +verse_tag = VerseType.translated_name(field[0]) +verse_num = field[1:] +critical_error_message_box( +message=translate('SongsPlugin.EditSongForm', +'There are misplaced tags in %s %s. ' +'You need to fix this problem first.' % (verse_tag, verse_num))) +return False return True +def _validate_tags(self, _tags): + +Validates a list of tags +Deletes the first affiliated tag pair which is located side by side in the list +and call itself recursively with the shortened tag list. +If there is any misplaced tag in the list, either the lenght of the tag list is not even, +or the function won't find any tag pairs side by side. +If there is no misplaced tag, the length of the list will be zero on any recursive run. + +Return: +True if the function can't find any mismatched tags +False if there are mismatched tags. + +if len(_tags) == 0: +return True +if len(_tags) % 2 != 0: +return False +for i in range(len(_tags)-1): +if _tags[i+1] == {/ + _tags[i][1:]: +del _tags[i:i+2] +return self._validate_tags(_tags) +return False + def onCopyrightInsertButtonTriggered(self): text = self.copyrightEdit.text() pos = self.copyrightEdit.cursorPosition() ___ Mailing list: https://launchpad.net/~openlp-core Post to : openlp-core@lists.launchpad.net Unsubscribe : https://launchpad.net/~openlp-core More help : https://help.launchpad.net/ListHelp
[Openlp-core] [Bug 1216785] Re: Adding notes to service causes error on save
** Changed in: openlp/2.0 Assignee: (unassigned) = Raoul Snyman (raoul-snyman) ** Changed in: openlp/2.0 Status: Confirmed = In Progress -- You received this bug notification because you are a member of OpenLP Core, which is subscribed to OpenLP. https://bugs.launchpad.net/bugs/1216785 Title: Adding notes to service causes error on save Status in OpenLP - Worship Presentation Software: New Status in OpenLP 2.0 series: In Progress Status in OpenLP trunk series: New Bug description: http://support.openlp.org/issues/2066 With 2.0.2 add a note to an item in the service manager. Click File-Save: Follow traceback pops up: --- Exception Traceback --- Traceback (most recent call last): File /usr/share/openlp/openlp/core/ui/servicemanager.py, line 546, in saveFile service_content = json.dumps(service) File /usr/lib/python2.7/json/__init__.py, line 233, in dumps return _default_encoder.encode(obj) File /usr/lib/python2.7/json/encoder.py, line 203, in encode chunks = self.iterencode(o, _one_shot=True) File /usr/lib/python2.7/json/encoder.py, line 266, in iterencode return _iterencode(o, 0) File /usr/lib/python2.7/json/encoder.py, line 180, in default raise TypeError(repr(o)is not JSON serializable) TypeError: PyQt4.QtCore.QString(u'After the sermon.') is not JSON serializable To manage notifications about this bug go to: https://bugs.launchpad.net/openlp/+bug/1216785/+subscriptions ___ Mailing list: https://launchpad.net/~openlp-core Post to : openlp-core@lists.launchpad.net Unsubscribe : https://launchpad.net/~openlp-core More help : https://help.launchpad.net/ListHelp
[Openlp-core] [Merge] lp:~raoul-snyman/openlp/bug-1216785-2.0 into lp:openlp/2.0
Raoul Snyman has proposed merging lp:~raoul-snyman/openlp/bug-1216785-2.0 into lp:openlp/2.0. Requested reviews: OpenLP Core (openlp-core) Related bugs: Bug #1216785 in OpenLP: Adding notes to service causes error on save https://bugs.launchpad.net/openlp/+bug/1216785 For more details, see: https://code.launchpad.net/~raoul-snyman/openlp/bug-1216785-2.0/+merge/182193 Fix bug #1216785 by casting to unicode before adding to the service. -- https://code.launchpad.net/~raoul-snyman/openlp/bug-1216785-2.0/+merge/182193 Your team OpenLP Core is requested to review the proposed merge of lp:~raoul-snyman/openlp/bug-1216785-2.0 into lp:openlp/2.0. === modified file 'openlp/core/ui/servicemanager.py' --- openlp/core/ui/servicemanager.py 2013-06-30 12:14:30 + +++ openlp/core/ui/servicemanager.py 2013-08-26 19:28:22 + @@ -796,7 +796,7 @@ self.serviceItems[item][u'service_item'].notes) if self.serviceNoteForm.exec_(): self.serviceItems[item][u'service_item'].notes = \ -self.serviceNoteForm.textEdit.toPlainText() +unicode(self.serviceNoteForm.textEdit.toPlainText()) self.repaintServiceList(item, -1) self.setModified() === modified file 'openlp/core/ui/servicenoteform.py' --- openlp/core/ui/servicenoteform.py 2012-12-30 19:41:24 + +++ openlp/core/ui/servicenoteform.py 2013-08-26 19:28:22 + @@ -32,6 +32,7 @@ from openlp.core.lib import translate, SpellTextEdit from openlp.core.lib.ui import create_button_box + class ServiceNoteForm(QtGui.QDialog): This is the form that is used to edit the verses of the song. ___ Mailing list: https://launchpad.net/~openlp-core Post to : openlp-core@lists.launchpad.net Unsubscribe : https://launchpad.net/~openlp-core More help : https://help.launchpad.net/ListHelp
[Openlp-core] [Bug 1216785] Re: Adding notes to service causes error on save
** Branch linked: lp:~raoul-snyman/openlp/bug-1216785-2.0 -- You received this bug notification because you are a member of OpenLP Core, which is subscribed to OpenLP. https://bugs.launchpad.net/bugs/1216785 Title: Adding notes to service causes error on save Status in OpenLP - Worship Presentation Software: New Status in OpenLP 2.0 series: In Progress Status in OpenLP trunk series: New Bug description: http://support.openlp.org/issues/2066 With 2.0.2 add a note to an item in the service manager. Click File-Save: Follow traceback pops up: --- Exception Traceback --- Traceback (most recent call last): File /usr/share/openlp/openlp/core/ui/servicemanager.py, line 546, in saveFile service_content = json.dumps(service) File /usr/lib/python2.7/json/__init__.py, line 233, in dumps return _default_encoder.encode(obj) File /usr/lib/python2.7/json/encoder.py, line 203, in encode chunks = self.iterencode(o, _one_shot=True) File /usr/lib/python2.7/json/encoder.py, line 266, in iterencode return _iterencode(o, 0) File /usr/lib/python2.7/json/encoder.py, line 180, in default raise TypeError(repr(o)is not JSON serializable) TypeError: PyQt4.QtCore.QString(u'After the sermon.') is not JSON serializable To manage notifications about this bug go to: https://bugs.launchpad.net/openlp/+bug/1216785/+subscriptions ___ Mailing list: https://launchpad.net/~openlp-core Post to : openlp-core@lists.launchpad.net Unsubscribe : https://launchpad.net/~openlp-core More help : https://help.launchpad.net/ListHelp
[Openlp-core] [Bug 1216785] Re: Adding notes to service causes error on save
** Changed in: openlp/trunk Importance: Undecided = High -- You received this bug notification because you are a member of OpenLP Core, which is subscribed to OpenLP. https://bugs.launchpad.net/bugs/1216785 Title: Adding notes to service causes error on save Status in OpenLP - Worship Presentation Software: New Status in OpenLP 2.0 series: In Progress Status in OpenLP trunk series: New Bug description: http://support.openlp.org/issues/2066 With 2.0.2 add a note to an item in the service manager. Click File-Save: Follow traceback pops up: --- Exception Traceback --- Traceback (most recent call last): File /usr/share/openlp/openlp/core/ui/servicemanager.py, line 546, in saveFile service_content = json.dumps(service) File /usr/lib/python2.7/json/__init__.py, line 233, in dumps return _default_encoder.encode(obj) File /usr/lib/python2.7/json/encoder.py, line 203, in encode chunks = self.iterencode(o, _one_shot=True) File /usr/lib/python2.7/json/encoder.py, line 266, in iterencode return _iterencode(o, 0) File /usr/lib/python2.7/json/encoder.py, line 180, in default raise TypeError(repr(o)is not JSON serializable) TypeError: PyQt4.QtCore.QString(u'After the sermon.') is not JSON serializable To manage notifications about this bug go to: https://bugs.launchpad.net/openlp/+bug/1216785/+subscriptions ___ Mailing list: https://launchpad.net/~openlp-core Post to : openlp-core@lists.launchpad.net Unsubscribe : https://launchpad.net/~openlp-core More help : https://help.launchpad.net/ListHelp
Re: [Openlp-core] [Merge] lp:~raoul-snyman/openlp/bug-1216785-2.0 into lp:openlp/2.0
Review: Approve -- https://code.launchpad.net/~raoul-snyman/openlp/bug-1216785-2.0/+merge/182193 Your team OpenLP Core is subscribed to branch lp:openlp/2.0. ___ Mailing list: https://launchpad.net/~openlp-core Post to : openlp-core@lists.launchpad.net Unsubscribe : https://launchpad.net/~openlp-core More help : https://help.launchpad.net/ListHelp
[Openlp-core] [Merge] lp:~raoul-snyman/openlp/bug-1216785-2.0 into lp:openlp/2.0
The proposal to merge lp:~raoul-snyman/openlp/bug-1216785-2.0 into lp:openlp/2.0 has been updated. Status: Needs review = Merged For more details, see: https://code.launchpad.net/~raoul-snyman/openlp/bug-1216785-2.0/+merge/182193 -- https://code.launchpad.net/~raoul-snyman/openlp/bug-1216785-2.0/+merge/182193 Your team OpenLP Core is subscribed to branch lp:openlp/2.0. ___ Mailing list: https://launchpad.net/~openlp-core Post to : openlp-core@lists.launchpad.net Unsubscribe : https://launchpad.net/~openlp-core More help : https://help.launchpad.net/ListHelp
[Openlp-core] [Bug 1216785] Re: Adding notes to service causes error on save
Trunk has been converted to SIP so not an issue. ** Changed in: openlp/2.0 Status: In Progress = Fix Committed ** Changed in: openlp/trunk Status: New = Invalid ** Changed in: openlp/trunk Milestone: 2.1.1 = None -- You received this bug notification because you are a member of OpenLP Core, which is subscribed to OpenLP. https://bugs.launchpad.net/bugs/1216785 Title: Adding notes to service causes error on save Status in OpenLP - Worship Presentation Software: Invalid Status in OpenLP 2.0 series: Fix Committed Status in OpenLP trunk series: Invalid Bug description: http://support.openlp.org/issues/2066 With 2.0.2 add a note to an item in the service manager. Click File-Save: Follow traceback pops up: --- Exception Traceback --- Traceback (most recent call last): File /usr/share/openlp/openlp/core/ui/servicemanager.py, line 546, in saveFile service_content = json.dumps(service) File /usr/lib/python2.7/json/__init__.py, line 233, in dumps return _default_encoder.encode(obj) File /usr/lib/python2.7/json/encoder.py, line 203, in encode chunks = self.iterencode(o, _one_shot=True) File /usr/lib/python2.7/json/encoder.py, line 266, in iterencode return _iterencode(o, 0) File /usr/lib/python2.7/json/encoder.py, line 180, in default raise TypeError(repr(o)is not JSON serializable) TypeError: PyQt4.QtCore.QString(u'After the sermon.') is not JSON serializable To manage notifications about this bug go to: https://bugs.launchpad.net/openlp/+bug/1216785/+subscriptions ___ Mailing list: https://launchpad.net/~openlp-core Post to : openlp-core@lists.launchpad.net Unsubscribe : https://launchpad.net/~openlp-core More help : https://help.launchpad.net/ListHelp