[Openlp-core] [Merge] lp:~phill-ridout/openlp/bug1209515 into lp:openlp
Phill has proposed merging lp:~phill-ridout/openlp/bug1209515 into lp:openlp. Requested reviews: OpenLP Core (openlp-core) Related bugs: Bug #1209515 in OpenLP: getFileNames corrupts file names that use special chars https://bugs.launchpad.net/openlp/+bug/1209515 For more details, see: https://code.launchpad.net/~phill-ridout/openlp/bug1209515/+merge/181475 Fixes Bug 1209515 by reimplementing QFileDialof.getFileNames and attempting to urldecode file paths that do not exisit -- https://code.launchpad.net/~phill-ridout/openlp/bug1209515/+merge/181475 Your team OpenLP Core is requested to review the proposed merge of lp:~phill-ridout/openlp/bug1209515 into lp:openlp. === modified file 'openlp/core/lib/__init__.py' --- openlp/core/lib/__init__.py 2013-06-03 17:19:42 + +++ openlp/core/lib/__init__.py 2013-08-22 06:43:35 + @@ -377,6 +377,7 @@ from registry import Registry from uistrings import UiStrings +from filedialog import FileDialog from screen import ScreenList from settings import Settings from listwidgetwithdnd import ListWidgetWithDnD === added file 'openlp/core/lib/filedialog.py' --- openlp/core/lib/filedialog.py 1970-01-01 00:00:00 + +++ openlp/core/lib/filedialog.py 2013-08-22 06:43:35 + @@ -0,0 +1,67 @@ +# -*- coding: utf-8 -*- +# vim: autoindent shiftwidth=4 expandtab textwidth=80 tabstop=4 softtabstop=4 + +### +# OpenLP - Open Source Lyrics Projection # +# --- # +# Copyright (c) 2008-2013 Raoul Snyman# +# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan # +# Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub, # +# Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer. # +# Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru, # +# Christian Richter, Philip Ridout, Simon Scudder, Jeffrey Smith, # +# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Dave Warnock, # +# Frode Woldsund, Martin Zibricky # +# --- # +# This program is free software; you can redistribute it and/or modify it # +# under the terms of the GNU General Public License as published by the Free # +# Software Foundation; version 2 of the License. # +# # +# This program is distributed in the hope that it will be useful, but WITHOUT # +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or # +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for# +# more details. # +# # +# You should have received a copy of the GNU General Public License along # +# with this program; if not, write to the Free Software Foundation, Inc., 59 # +# Temple Place, Suite 330, Boston, MA 02111-1307 USA # +### + + +Provide a work around for a bug in QFileDialog https://bugs.launchpad.net/openlp/+bug/1209515 + +import logging +import os +import urllib + +from PyQt4 import QtGui + +from openlp.core.lib import UiStrings + +log = logging.getLogger(__name__) + +class FileDialog(QtGui.QFileDialog): + +Subclass QFileDialog to work round a bug + +@staticmethod +def getOpenFileNames(parent, *args, **kwargs): + +Reimplement getOpenFileNames to fix the way it returns some file names that url encoded when selecting multiple +files + +files = QtGui.QFileDialog.getOpenFileNames(parent, *args, **kwargs) +file_list = [] +for file in files: +file = unicode(file) +if not os.path.exists(file): +log.info(u'File %s not found. Attempting to unquote.') +file = urllib.unquote(unicode(file)) +if not os.path.exists(file): +log.error(u'File %s not found.' % file) +QtGui.QMessageBox.information(parent, UiStrings().FileNotFound, +UiStrings().FileNotFoundMessage % file) +continue +log.info(u'File %s found.') +file_list.append(file) +return file_list \ No newline at end of file === modified file 'openlp/core/lib/mediamanageritem.py' --- openlp/core/lib/mediamanageritem.py 2013-06-24 16:54:23 + +++ openlp/core/lib/mediamanageritem.py 2013-08-22 06:43:35 + @@ -35,7 +35,7 @@ from PyQt4 import QtCore, QtGui -from openlp.core.lib import
[Openlp-core] [Bug 1209515] Re: getFileNames corrupts file names that use special chars
** Branch linked: lp:~phill-ridout/openlp/bug1209515 ** Changed in: openlp/trunk Status: New = In Progress ** Changed in: openlp/trunk Importance: Undecided = Medium ** Changed in: openlp/trunk Assignee: (unassigned) = Phill (phill-ridout) -- You received this bug notification because you are a member of OpenLP Core, which is subscribed to OpenLP. https://bugs.launchpad.net/bugs/1209515 Title: getFileNames corrupts file names that use special chars Status in OpenLP - Worship Presentation Software: In Progress Status in OpenLP 2.0 series: Fix Committed Status in OpenLP trunk series: In Progress Bug description: This is a little bit of a strange one. I have written a little script which demonstrates this (I'll include it when I get home). Here's the issue: Use QFileDialog.getFileNames() to select a single file with a special char in its name (a '#' will do it) and it returns the file name path correctly. Ie selecting a file called #123.xml returns a list with one item #123.xml However, use QFileDialog.getFileNames() to select multiple files with at lease one file with special char in its name (a '#' will do it) and it returns the file name path incorrectly. Ie selecting a file called #123.xml and a file called abc.xml returns a list with two items %23123.xml abc.xml (Note the # has been changed in to a %23. Possible url encoding?) When we come to open the file, Python cannot find the file %23123.xml because it does not exist. This seams to be a Qt bug (I've done a few searches, but found nothing) but we could at least make some effort to see if the file actually exists before trying to open it! Reported here: http://support.openlp.org/issues/2056 and here: http://support.openlp.org/issues/1964 To manage notifications about this bug go to: https://bugs.launchpad.net/openlp/+bug/1209515/+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:~arjan-i/openlp/bug1214875 into lp:openlp/2.0
The proposal to merge lp:~arjan-i/openlp/bug1214875 into lp:openlp/2.0 has been updated. Status: Needs review = Approved For more details, see: https://code.launchpad.net/~arjan-i/openlp/bug1214875/+merge/181400 -- https://code.launchpad.net/~arjan-i/openlp/bug1214875/+merge/181400 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:~arjan-i/openlp/bug1214875 into lp:openlp/2.0
The proposal to merge lp:~arjan-i/openlp/bug1214875 into lp:openlp/2.0 has been updated. Status: Approved = Merged For more details, see: https://code.launchpad.net/~arjan-i/openlp/bug1214875/+merge/181400 -- https://code.launchpad.net/~arjan-i/openlp/bug1214875/+merge/181400 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 1214875] Re: Importing an OSIS bible always results in English book names
** Branch linked: lp:openlp/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/1214875 Title: Importing an OSIS bible always results in English book names Status in OpenLP - Worship Presentation Software: New Status in OpenLP 2.0 series: Fix Committed Status in OpenLP trunk series: New Bug description: In version 2.0.1, I found that when importing an OSIS format bible, the book names always end up in English. There is currently no translation done and it always defaults to the English name. Ideally a bible-specific name should be used, but we could at least use the name translated to the language of the bible. To manage notifications about this bug go to: https://bugs.launchpad.net/openlp/+bug/1214875/+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 1214875] Re: Importing an OSIS bible always results in English book names
** Also affects: openlp/trunk Importance: Undecided Status: New ** Changed in: openlp/trunk Importance: Undecided = Low ** Changed in: openlp/2.0 Status: In Progress = Fix Committed -- You received this bug notification because you are a member of OpenLP Core, which is subscribed to OpenLP. https://bugs.launchpad.net/bugs/1214875 Title: Importing an OSIS bible always results in English book names Status in OpenLP - Worship Presentation Software: New Status in OpenLP 2.0 series: Fix Committed Status in OpenLP trunk series: New Bug description: In version 2.0.1, I found that when importing an OSIS format bible, the book names always end up in English. There is currently no translation done and it always defaults to the English name. Ideally a bible-specific name should be used, but we could at least use the name translated to the language of the bible. To manage notifications about this bug go to: https://bugs.launchpad.net/openlp/+bug/1214875/+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 1215302] [NEW] Add .divx to list of video extensions
Public bug reported: See http://forums.openlp.org/discussion/2169/divx-support ** Affects: openlp Importance: Undecided Status: New ** Affects: openlp/2.0 Importance: Undecided Assignee: Raoul Snyman (raoul-snyman) Status: New ** Affects: openlp/trunk Importance: Undecided Status: New ** Also affects: openlp/2.0 Importance: Undecided Status: New ** Also affects: openlp/trunk Importance: Undecided Status: New ** Changed in: openlp/2.0 Assignee: (unassigned) = Raoul Snyman (raoul-snyman) ** Changed in: openlp/2.0 Milestone: None = 2.0.2 -- You received this bug notification because you are a member of OpenLP Core, which is subscribed to OpenLP. https://bugs.launchpad.net/bugs/1215302 Title: Add .divx to list of video extensions Status in OpenLP - Worship Presentation Software: New Status in OpenLP 2.0 series: New Status in OpenLP trunk series: New Bug description: See http://forums.openlp.org/discussion/2169/divx-support To manage notifications about this bug go to: https://bugs.launchpad.net/openlp/+bug/1215302/+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-1215302-2.0 into lp:openlp/2.0
Review: Approve Looks good -- https://code.launchpad.net/~raoul-snyman/openlp/bug-1215302-2.0/+merge/181518 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 1173749] Re: Songs with mismatching formatting tags still throw an exception
I wrote a function which checks the consistency of the tags in the verse. The question is: What is the appropriate reaction of the program if the function returns there is a malplaced tag? Should the whole import be canceled? -- You received this bug notification because you are a member of OpenLP Core, which is subscribed to OpenLP. https://bugs.launchpad.net/bugs/1173749 Title: Songs with mismatching formatting tags still throw an exception Status in OpenLP - Worship Presentation Software: Confirmed Status in OpenLP 2.0 series: Confirmed Status in OpenLP trunk series: Confirmed Bug description: There is another bug similar to this, bug #885874, but it does not seem to have fixed the issue below. Note that there is a mismatched {/g} tag which causes this error. Version: {u'full': u'2.0.1', u'version': u'2.0.1', u'build': None} --- Details of the Exception. --- Hi, I just found one bug. I just changed one Bridge to: Shine Your light and {g}Strahle hell und{/g} Let the whole world see {g}lass die Welt es sehn.{/g} We're singing {g}Wir singen{/g} For the glory Of the risen King{/g} {g}dir zur Ehre, auferstandner Herr.{/g} Jesus And got this error: --- Exception Traceback --- Traceback (most recent call last): File /usr/lib/pymodules/python2.6/openlp/plugins/songs/lib/mediaitem.py, line 393, in onEditClick self.onSongListLoad() File /usr/lib/pymodules/python2.6/openlp/plugins/songs/lib/mediaitem.py, line 254, in onSongListLoad item = self.buildServiceItem(self.editItem) File /usr/lib/pymodules/python2.6/openlp/core/lib/mediamanageritem.py, line 591, in buildServiceItem if self.generateSlideData(serviceItem, item, xmlVersion, remote): File /usr/lib/pymodules/python2.6/openlp/plugins/songs/lib/mediaitem.py, line 529, in generateSlideData service_item.xml_version = self.openLyrics.song_to_xml(song) File /usr/lib/pymodules/python2.6/openlp/plugins/songs/lib/xml.py, line 361, in song_to_xml optional_verse, tags_element) File /usr/lib/pymodules/python2.6/openlp/plugins/songs/lib/xml.py, line 503, in _add_text_with_tags_to_lines element = etree.XML File lxml.etree.pyx, line 2512, in lxml.etree.XML (src/lxml/lxml.etree.c:48057) File parser.pxi, line 1545, in lxml.etree._parseMemoryDocument (src/lxml/lxml.etree.c:71812) File parser.pxi, line 1417, in lxml.etree._parseDoc (src/lxml/lxml.etree.c:70608) File parser.pxi, line 898, in lxml.etree._BaseParser._parseUnicodeDoc (src/lxml/lxml.etree.c:67148) File parser.pxi, line 539, in lxml.etree._ParserContext._handleParseResultDoc (src/lxml/lxml.etree.c:63824) File parser.pxi, line 625, in lxml.etree._handleParseResult (src/lxml/lxml.etree.c:64745) File parser.pxi, line 565, in lxml.etree._raiseParseError (src/lxml/lxml.etree.c:64088) XMLSyntaxError: Opening and ending tag mismatch: lines line 1 and tag, line 1, column 216 --- System information --- Plattform: Linux-2.6.32-45-generic-i686-with-Ubuntu-10.04-lucid Desktop: GNOME --- Library Versions --- Python: 2.6.5 Qt4: 4.6.2 Phonon: 4.3.1 PyQt4: 4.7.2 QtWebkit: 532.4 SQLAlchemy: 0.5.8 SQLAlchemy Migrate: 0.7 BeautifulSoup: 3.1.0.1 lxml: 2.2.4 Chardet: 2.0.1 PyEnchant: 1.5.3 PySQLite: 1.0.1 Mako: 0.2.5 pyUNO bridge: 3.2 To manage notifications about this bug go to: https://bugs.launchpad.net/openlp/+bug/1173749/+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-1215302-2.0 into lp:openlp/2.0
The proposal to merge lp:~raoul-snyman/openlp/bug-1215302-2.0 into lp:openlp/2.0 has been updated. Status: Needs review = Approved For more details, see: https://code.launchpad.net/~raoul-snyman/openlp/bug-1215302-2.0/+merge/181518 -- https://code.launchpad.net/~raoul-snyman/openlp/bug-1215302-2.0/+merge/181518 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
Re: [Openlp-core] [Merge] lp:~raoul-snyman/openlp/bug-1215302-2.0 into lp:openlp/2.0
Review: Approve Approved, but next time please no refactorings! -- https://code.launchpad.net/~raoul-snyman/openlp/bug-1215302-2.0/+merge/181518 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
Re: [Openlp-core] [Merge] lp:~raoul-snyman/openlp/bug-1212801 into lp:openlp
Review: Approve -- https://code.launchpad.net/~raoul-snyman/openlp/bug-1212801/+merge/180408 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] [Merge] lp:~raoul-snyman/openlp/bug-1212801 into lp:openlp
The proposal to merge lp:~raoul-snyman/openlp/bug-1212801 into lp:openlp has been updated. Status: Needs review = Approved For more details, see: https://code.launchpad.net/~raoul-snyman/openlp/bug-1212801/+merge/180408 -- https://code.launchpad.net/~raoul-snyman/openlp/bug-1212801/+merge/180408 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] [Merge] lp:~phill-ridout/openlp/1096450 into lp:openlp
The proposal to merge lp:~phill-ridout/openlp/1096450 into lp:openlp has been updated. Status: Needs review = Approved For more details, see: https://code.launchpad.net/~phill-ridout/openlp/1096450/+merge/178463 -- https://code.launchpad.net/~phill-ridout/openlp/1096450/+merge/178463 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
Re: [Openlp-core] [Merge] lp:~phill-ridout/openlp/1096450 into lp:openlp
Review: Approve -- https://code.launchpad.net/~phill-ridout/openlp/1096450/+merge/178463 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] [Merge] lp:~oliwee/openlp/HideBibleVerses into lp:openlp
Oliver Wieland has proposed merging lp:~oliwee/openlp/HideBibleVerses into lp:openlp. Requested reviews: Tim Bentley (trb143) Andreas Preikschat (googol) 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/181635 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/181635 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-22 18:57:33 + @@ -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-22 18:57:33 + @@ -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'verse_display_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', 'Is verse number visible')) 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:~phill-ridout/openlp/bug1209515 into lp:openlp
Phill has proposed merging lp:~phill-ridout/openlp/bug1209515 into lp:openlp. Requested reviews: OpenLP Core (openlp-core) Related bugs: Bug #1209515 in OpenLP: getFileNames corrupts file names that use special chars https://bugs.launchpad.net/openlp/+bug/1209515 For more details, see: https://code.launchpad.net/~phill-ridout/openlp/bug1209515/+merge/181654 Fixes Bug 1209515 by sub classing QFileDialog and reimplementing getOpenFileNames and attempting to urlunquote and file paths which do not exist -- https://code.launchpad.net/~phill-ridout/openlp/bug1209515/+merge/181654 Your team OpenLP Core is requested to review the proposed merge of lp:~phill-ridout/openlp/bug1209515 into lp:openlp. === modified file 'openlp/core/lib/__init__.py' --- openlp/core/lib/__init__.py 2013-06-03 17:19:42 + +++ openlp/core/lib/__init__.py 2013-08-22 20:27:31 + @@ -377,6 +377,7 @@ from registry import Registry from uistrings import UiStrings +from filedialog import FileDialog from screen import ScreenList from settings import Settings from listwidgetwithdnd import ListWidgetWithDnD === added file 'openlp/core/lib/filedialog.py' --- openlp/core/lib/filedialog.py 1970-01-01 00:00:00 + +++ openlp/core/lib/filedialog.py 2013-08-22 20:27:31 + @@ -0,0 +1,67 @@ +# -*- coding: utf-8 -*- +# vim: autoindent shiftwidth=4 expandtab textwidth=80 tabstop=4 softtabstop=4 + +### +# OpenLP - Open Source Lyrics Projection # +# --- # +# Copyright (c) 2008-2013 Raoul Snyman# +# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan # +# Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub, # +# Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer. # +# Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru, # +# Christian Richter, Philip Ridout, Simon Scudder, Jeffrey Smith, # +# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Dave Warnock, # +# Frode Woldsund, Martin Zibricky # +# --- # +# This program is free software; you can redistribute it and/or modify it # +# under the terms of the GNU General Public License as published by the Free # +# Software Foundation; version 2 of the License. # +# # +# This program is distributed in the hope that it will be useful, but WITHOUT # +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or # +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for# +# more details. # +# # +# You should have received a copy of the GNU General Public License along # +# with this program; if not, write to the Free Software Foundation, Inc., 59 # +# Temple Place, Suite 330, Boston, MA 02111-1307 USA # +### + + +Provide a work around for a bug in QFileDialog https://bugs.launchpad.net/openlp/+bug/1209515 + +import logging +import os +import urllib + +from PyQt4 import QtGui + +from openlp.core.lib import UiStrings + +log = logging.getLogger(__name__) + +class FileDialog(QtGui.QFileDialog): + +Subclass QFileDialog to work round a bug + +@staticmethod +def getOpenFileNames(parent, *args, **kwargs): + +Reimplement getOpenFileNames to fix the way it returns some file names that url encoded when selecting multiple +files + +files = QtGui.QFileDialog.getOpenFileNames(parent, *args, **kwargs) +file_list = [] +for file in files: +file = unicode(file) +if not os.path.exists(file): +log.info(u'File %s not found. Attempting to unquote.') +file = urllib.unquote(unicode(file)) +if not os.path.exists(file): +log.error(u'File %s not found.' % file) +QtGui.QMessageBox.information(parent, UiStrings().FileNotFound, +UiStrings().FileNotFoundMessage % file) +continue +log.info(u'File %s found.') +file_list.append(file) +return file_list \ No newline at end of file === modified file 'openlp/core/lib/mediamanageritem.py' --- openlp/core/lib/mediamanageritem.py 2013-06-24 16:54:23 + +++ openlp/core/lib/mediamanageritem.py 2013-08-22 20:27:31 + @@ -35,7 +35,7 @@ from PyQt4 import QtCore, QtGui
[Openlp-core] [Merge] lp:~raoul-snyman/openlp/bug-1215302-2.0 into lp:openlp/2.0
The proposal to merge lp:~raoul-snyman/openlp/bug-1215302-2.0 into lp:openlp/2.0 has been updated. Status: Approved = Merged For more details, see: https://code.launchpad.net/~raoul-snyman/openlp/bug-1215302-2.0/+merge/181518 -- https://code.launchpad.net/~raoul-snyman/openlp/bug-1215302-2.0/+merge/181518 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 1215302] Re: Add .divx to list of video extensions
** Branch linked: lp:openlp/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/1215302 Title: Add .divx to list of video extensions Status in OpenLP - Worship Presentation Software: New Status in OpenLP 2.0 series: New Status in OpenLP trunk series: New Bug description: See http://forums.openlp.org/discussion/2169/divx-support To manage notifications about this bug go to: https://bugs.launchpad.net/openlp/+bug/1215302/+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:~oliwee/openlp/HideBibleVerses into lp:openlp
Line 21 the object name should be the same as the variable name. So it should be like: + self.is_verse_number_visible_check_box.setObjectName(u'is_verse_number_visible_check_box') Line 38 the label for the checkBox doesn't sound right to me. Show Verse Number sounds better. But Raoul is the English Expert, so better ask him! Line 114 - 126 could be switched around to save a level of indentation and imo makes it easier to read: +if not self.settings.is_verse_number_visible: +return u'' +if not self.settings.show_new_chapters or old_chapter != chapter: + ... Tests look good! -- https://code.launchpad.net/~oliwee/openlp/HideBibleVerses/+merge/181635 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 1215302] Re: Add .divx to list of video extensions
** Changed in: openlp/2.0 Importance: Undecided = Low ** Changed in: openlp/trunk Importance: Undecided = Low ** Changed in: openlp/trunk Status: New = Confirmed ** Changed in: openlp/2.0 Status: New = Fix Committed -- You received this bug notification because you are a member of OpenLP Core, which is subscribed to OpenLP. https://bugs.launchpad.net/bugs/1215302 Title: Add .divx to list of video extensions Status in OpenLP - Worship Presentation Software: Confirmed Status in OpenLP 2.0 series: Fix Committed Status in OpenLP trunk series: Confirmed Bug description: See http://forums.openlp.org/discussion/2169/divx-support To manage notifications about this bug go to: https://bugs.launchpad.net/openlp/+bug/1215302/+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