openlp-core team mailing list archive
-
openlp-core team
-
Mailing list archive
-
Message #19113
[Merge] lp:~phill-ridout/openlp/bug1095699_2.0 into lp:openlp
Phill has proposed merging lp:~phill-ridout/openlp/bug1095699_2.0 into lp:openlp.
Requested reviews:
OpenLP Core (openlp-core)
For more details, see:
https://code.launchpad.net/~phill-ridout/openlp/bug1095699_2.0/+merge/146307
Fixes bug1095699 by rasing an error when the user cancels the codepage selection dialog.
Once you guys ok this I'll fix trunk
--
https://code.launchpad.net/~phill-ridout/openlp/bug1095699_2.0/+merge/146307
Your team OpenLP Core is requested to review the proposed merge of lp:~phill-ridout/openlp/bug1095699_2.0 into lp:openlp.
=== modified file 'copyright.txt'
=== modified file 'openlp.py'
=== modified file 'openlp/.version'
--- openlp/.version 2013-01-08 20:44:56 +0000
+++ openlp/.version 2013-02-03 17:22:21 +0000
@@ -1,1 +1,5 @@
+<<<<<<< TREE
2.1.0-bzr2141
+=======
+2.0.1
+>>>>>>> MERGE-SOURCE
=== modified file 'openlp/__init__.py'
=== modified file 'openlp/core/__init__.py'
--- openlp/core/__init__.py 2013-02-03 14:40:48 +0000
+++ openlp/core/__init__.py 2013-02-03 17:22:21 +0000
@@ -283,10 +283,19 @@
app.setApplicationName(u'OpenLPPortable')
Settings.setDefaultFormat(Settings.IniFormat)
# Get location OpenLPPortable.ini
+<<<<<<< TREE
app_path = AppLocation.get_directory(AppLocation.AppDir)
set_up_logging(os.path.abspath(os.path.join(app_path, u'..', u'..', u'Other')))
log.info(u'Running portable')
portable_settings_file = os.path.abspath(os.path.join(app_path, u'..', u'..', u'Data', u'OpenLP.ini'))
+=======
+ app_path = AppLocation.get_directory(AppLocation.AppDir)
+ set_up_logging(os.path.abspath(os.path.join(app_path, u'..',
+ u'..', u'Other')))
+ log.info(u'Running portable')
+ portable_settings_file = os.path.abspath(os.path.join(app_path, u'..',
+ u'..', u'Data', u'OpenLP.ini'))
+>>>>>>> MERGE-SOURCE
# Make this our settings file
log.info(u'INI file: %s', portable_settings_file)
Settings.set_filename(portable_settings_file)
@@ -299,6 +308,7 @@
portable_settings.setValue(u'advanced/is portable', True)
portable_settings.sync()
else:
+ set_up_logging(AppLocation.get_directory(AppLocation.CacheDir))
app.setApplicationName(u'OpenLP')
set_up_logging(AppLocation.get_directory(AppLocation.CacheDir))
Registry.create()
=== modified file 'openlp/core/lib/__init__.py'
--- openlp/core/lib/__init__.py 2013-02-02 20:54:34 +0000
+++ openlp/core/lib/__init__.py 2013-02-03 17:22:21 +0000
@@ -337,18 +337,35 @@
return text
+<<<<<<< TREE
def check_directory_exists(directory, do_not_log=False):
+=======
+def check_directory_exists(dir, do_not_log=False):
+>>>>>>> MERGE-SOURCE
"""
Check a theme directory exists and if not create it
+<<<<<<< TREE
``directory``
The directory to make sure exists
``do_not_log``
To not log anything. This is need for the start up, when the log isn't ready.
+=======
+ ``dir``
+ Theme directory to make sure exists
+
+ ``do_not_log``
+ To not log anything. This is need for the start up, when the log isn't ready.
+>>>>>>> MERGE-SOURCE
"""
+<<<<<<< TREE
if not do_not_log:
log.debug(u'check_directory_exists %s' % directory)
+=======
+ if not do_not_log:
+ log.debug(u'check_directory_exists %s' % dir)
+>>>>>>> MERGE-SOURCE
try:
if not os.path.exists(directory):
os.makedirs(directory)
=== modified file 'openlp/core/lib/db.py'
=== modified file 'openlp/core/lib/dockwidget.py'
=== modified file 'openlp/core/lib/eventreceiver.py'
=== modified file 'openlp/core/lib/formattingtags.py'
=== modified file 'openlp/core/lib/htmlbuilder.py'
=== modified file 'openlp/core/lib/imagemanager.py'
=== modified file 'openlp/core/lib/listwidgetwithdnd.py'
=== modified file 'openlp/core/lib/mediamanageritem.py'
--- openlp/core/lib/mediamanageritem.py 2013-02-02 21:16:42 +0000
+++ openlp/core/lib/mediamanageritem.py 2013-02-03 17:22:21 +0000
@@ -328,9 +328,18 @@
"""
Add a file to the list widget to make it available for showing
"""
+<<<<<<< TREE
files = QtGui.QFileDialog.getOpenFileNames(self, self.onNewPrompt,
Settings().value(self.settingsSection + u'/last directory'), self.onNewFileMasks)
log.info(u'New files(s) %s', files)
+=======
+ files = QtGui.QFileDialog.getOpenFileNames(
+ self, self.onNewPrompt,
+ SettingsManager.get_last_dir(self.settingsSection),
+ self.onNewFileMasks)
+ files = map(unicode, files)
+ log.info(u'New files(s) %s', unicode(files))
+>>>>>>> MERGE-SOURCE
if files:
Receiver.send_message(u'cursor_busy')
self.validateAndLoad(files)
=== modified file 'openlp/core/lib/plugin.py'
=== modified file 'openlp/core/lib/pluginmanager.py'
=== modified file 'openlp/core/lib/renderer.py'
=== modified file 'openlp/core/lib/screen.py'
=== modified file 'openlp/core/lib/searchedit.py'
=== modified file 'openlp/core/lib/serviceitem.py'
--- openlp/core/lib/serviceitem.py 2013-02-02 20:54:34 +0000
+++ openlp/core/lib/serviceitem.py 2013-02-03 17:22:21 +0000
@@ -37,9 +37,17 @@
import os
import uuid
+<<<<<<< TREE
from PyQt4 import QtGui
from openlp.core.lib import build_icon, clean_tags, expand_tags, translate, ImageSource, Settings, Registry
+=======
+from PyQt4 import QtCore, QtGui
+
+from openlp.core.lib import build_icon, clean_tags, expand_tags, translate, \
+ ImageSource
+from openlp.core.lib.settings import Settings
+>>>>>>> MERGE-SOURCE
log = logging.getLogger(__name__)
@@ -419,6 +427,7 @@
for slide in serviceitem[u'serviceitem'][u'data']:
self._raw_frames.append(slide)
elif self.service_item_type == ServiceItemType.Image:
+<<<<<<< TREE
settingsSection = serviceitem[u'serviceitem'][u'header'][u'name']
background = QtGui.QColor(Settings().value(settingsSection + u'/background color'))
if path:
@@ -429,6 +438,14 @@
else:
for text_image in serviceitem[u'serviceitem'][u'data']:
self.add_from_image(text_image[u'path'], text_image[u'title'], background)
+=======
+ settingsSection = serviceitem[u'serviceitem'][u'header'][u'name']
+ background = QtGui.QColor(Settings().value(settingsSection
+ + u'/background color', QtCore.QVariant(u'#000000')))
+ for text_image in serviceitem[u'serviceitem'][u'data']:
+ filename = os.path.join(path, text_image)
+ self.add_from_image(filename, text_image, background)
+>>>>>>> MERGE-SOURCE
elif self.service_item_type == ServiceItemType.Command:
for text_image in serviceitem[u'serviceitem'][u'data']:
if path:
=== added file 'openlp/core/lib/settings.py'
--- openlp/core/lib/settings.py 1970-01-01 00:00:00 +0000
+++ openlp/core/lib/settings.py 2013-02-03 17:22:21 +0000
@@ -0,0 +1,68 @@
+# -*- 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 #
+###############################################################################
+"""
+The :mod:``settings`` module provides a thin wrapper for QSettings, which OpenLP
+uses to manage settings persistence.
+"""
+
+import logging
+
+from PyQt4 import QtCore
+
+log = logging.getLogger()
+
+class Settings(QtCore.QSettings):
+ """
+ Class to wrap QSettings.
+
+ * Exposes all the methods of QSettings.
+ * Adds functionality for OpenLP Portable. If the ``defaultFormat`` is set to
+ ``IniFormat``, and the path to the Ini file is set using ``setFilename``,
+ then the Settings constructor (without any arguments) will create a Settings
+ object for accessing settings stored in that Ini file.
+ """
+
+ __filePath = u''
+
+ @staticmethod
+ def setFilename(iniFile):
+ """
+ Sets the complete path to an Ini file to be used by Settings objects.
+
+ Does not affect existing Settings objects.
+ """
+ Settings.__filePath = iniFile
+
+ def __init__(self, *args):
+ if not args and Settings.__filePath and (Settings.defaultFormat() ==
+ Settings.IniFormat):
+ QtCore.QSettings.__init__(self, Settings.__filePath,
+ Settings.IniFormat)
+ else:
+ QtCore.QSettings.__init__(self, *args)
=== renamed file 'openlp/core/lib/settings.py' => 'openlp/core/lib/settings.py.moved'
=== modified file 'openlp/core/lib/settingsmanager.py'
=== modified file 'openlp/core/lib/settingstab.py'
=== modified file 'openlp/core/lib/spelltextedit.py'
=== modified file 'openlp/core/lib/theme.py'
=== modified file 'openlp/core/lib/toolbar.py'
=== modified file 'openlp/core/lib/ui.py'
=== modified file 'openlp/core/resources.py'
=== modified file 'openlp/core/theme/__init__.py'
=== modified file 'openlp/core/theme/theme.py'
=== modified file 'openlp/core/ui/__init__.py'
=== modified file 'openlp/core/ui/aboutdialog.py'
--- openlp/core/ui/aboutdialog.py 2013-02-01 19:58:18 +0000
+++ openlp/core/ui/aboutdialog.py 2013-02-03 17:22:21 +0000
@@ -270,9 +270,15 @@
u'\n '.join(documentors)))
self.aboutNotebook.setTabText(self.aboutNotebook.indexOf(self.creditsTab),
translate('OpenLP.AboutForm', 'Credits'))
+<<<<<<< TREE
copyright_note = translate('OpenLP.AboutForm',
'Copyright \xa9 2004-2013 %s\n'
'Portions copyright \xa9 2004-2013 %s') % (u'Raoul Snyman',
+=======
+ copyright = unicode(translate('OpenLP.AboutForm',
+ 'Copyright \xa9 2004-2013 %s\n'
+ 'Portions copyright \xa9 2004-2013 %s')) % (u'Raoul Snyman',
+>>>>>>> MERGE-SOURCE
u'Tim Bentley, Gerald Britton, Jonathan Corwin, Samuel Findlay, '
u'Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, '
u'Armin K\xf6hler, Erik Lundin, Edwin Lunando, Joshua Miller, '
=== modified file 'openlp/core/ui/aboutform.py'
=== modified file 'openlp/core/ui/advancedtab.py'
=== modified file 'openlp/core/ui/exceptiondialog.py'
=== modified file 'openlp/core/ui/exceptionform.py'
=== modified file 'openlp/core/ui/filerenamedialog.py'
=== modified file 'openlp/core/ui/filerenameform.py'
=== modified file 'openlp/core/ui/firsttimeform.py'
=== modified file 'openlp/core/ui/firsttimelanguagedialog.py'
=== modified file 'openlp/core/ui/firsttimelanguageform.py'
=== modified file 'openlp/core/ui/firsttimewizard.py'
=== modified file 'openlp/core/ui/formattingtagdialog.py'
=== modified file 'openlp/core/ui/formattingtagform.py'
=== modified file 'openlp/core/ui/generaltab.py'
=== modified file 'openlp/core/ui/maindisplay.py'
=== modified file 'openlp/core/ui/mainwindow.py'
=== modified file 'openlp/core/ui/media/__init__.py'
=== modified file 'openlp/core/ui/media/mediacontroller.py'
=== modified file 'openlp/core/ui/media/mediaplayer.py'
=== modified file 'openlp/core/ui/media/phononplayer.py'
=== modified file 'openlp/core/ui/media/vlcplayer.py'
=== modified file 'openlp/core/ui/media/webkitplayer.py'
=== modified file 'openlp/core/ui/mediadockmanager.py'
=== modified file 'openlp/core/ui/plugindialog.py'
=== modified file 'openlp/core/ui/pluginform.py'
=== modified file 'openlp/core/ui/printservicedialog.py'
=== modified file 'openlp/core/ui/printserviceform.py'
=== modified file 'openlp/core/ui/serviceitemeditdialog.py'
=== modified file 'openlp/core/ui/serviceitemeditform.py'
=== modified file 'openlp/core/ui/servicemanager.py'
=== modified file 'openlp/core/ui/servicenoteform.py'
=== modified file 'openlp/core/ui/settingsdialog.py'
=== modified file 'openlp/core/ui/settingsform.py'
=== modified file 'openlp/core/ui/shortcutlistdialog.py'
=== modified file 'openlp/core/ui/shortcutlistform.py'
=== modified file 'openlp/core/ui/slidecontroller.py'
=== modified file 'openlp/core/ui/splashscreen.py'
=== modified file 'openlp/core/ui/starttimedialog.py'
=== modified file 'openlp/core/ui/starttimeform.py'
=== modified file 'openlp/core/ui/themeform.py'
=== modified file 'openlp/core/ui/themelayoutdialog.py'
=== modified file 'openlp/core/ui/themelayoutform.py'
=== modified file 'openlp/core/ui/thememanager.py'
=== modified file 'openlp/core/ui/themestab.py'
=== modified file 'openlp/core/ui/themewizard.py'
=== modified file 'openlp/core/ui/wizard.py'
=== modified file 'openlp/core/utils/__init__.py'
=== modified file 'openlp/core/utils/actions.py'
=== modified file 'openlp/core/utils/languagemanager.py'
=== modified file 'openlp/plugins/__init__.py'
=== modified file 'openlp/plugins/alerts/__init__.py'
=== modified file 'openlp/plugins/alerts/alertsplugin.py'
=== modified file 'openlp/plugins/alerts/forms/__init__.py'
=== modified file 'openlp/plugins/alerts/forms/alertdialog.py'
=== modified file 'openlp/plugins/alerts/forms/alertform.py'
=== modified file 'openlp/plugins/alerts/lib/__init__.py'
=== modified file 'openlp/plugins/alerts/lib/alertsmanager.py'
=== modified file 'openlp/plugins/alerts/lib/alertstab.py'
=== modified file 'openlp/plugins/alerts/lib/db.py'
=== modified file 'openlp/plugins/bibles/__init__.py'
=== modified file 'openlp/plugins/bibles/bibleplugin.py'
=== modified file 'openlp/plugins/bibles/forms/__init__.py'
=== modified file 'openlp/plugins/bibles/forms/bibleimportform.py'
=== modified file 'openlp/plugins/bibles/forms/bibleupgradeform.py'
=== modified file 'openlp/plugins/bibles/forms/booknamedialog.py'
=== modified file 'openlp/plugins/bibles/forms/booknameform.py'
=== modified file 'openlp/plugins/bibles/forms/editbibledialog.py'
=== modified file 'openlp/plugins/bibles/forms/editbibleform.py'
=== modified file 'openlp/plugins/bibles/forms/languagedialog.py'
=== modified file 'openlp/plugins/bibles/forms/languageform.py'
=== modified file 'openlp/plugins/bibles/lib/__init__.py'
=== modified file 'openlp/plugins/bibles/lib/biblestab.py'
=== modified file 'openlp/plugins/bibles/lib/csvbible.py'
=== modified file 'openlp/plugins/bibles/lib/db.py'
=== modified file 'openlp/plugins/bibles/lib/http.py'
=== modified file 'openlp/plugins/bibles/lib/manager.py'
=== modified file 'openlp/plugins/bibles/lib/mediaitem.py'
=== modified file 'openlp/plugins/bibles/lib/openlp1.py'
=== modified file 'openlp/plugins/bibles/lib/opensong.py'
=== modified file 'openlp/plugins/bibles/lib/osis.py'
=== modified file 'openlp/plugins/bibles/lib/upgrade.py'
=== modified file 'openlp/plugins/bibles/lib/versereferencelist.py'
=== modified file 'openlp/plugins/custom/__init__.py'
=== modified file 'openlp/plugins/custom/customplugin.py'
=== modified file 'openlp/plugins/custom/forms/__init__.py'
=== modified file 'openlp/plugins/custom/forms/editcustomdialog.py'
=== modified file 'openlp/plugins/custom/forms/editcustomform.py'
=== modified file 'openlp/plugins/custom/forms/editcustomslidedialog.py'
=== modified file 'openlp/plugins/custom/forms/editcustomslideform.py'
=== modified file 'openlp/plugins/custom/lib/__init__.py'
=== modified file 'openlp/plugins/custom/lib/customtab.py'
=== modified file 'openlp/plugins/custom/lib/customxmlhandler.py'
=== modified file 'openlp/plugins/custom/lib/db.py'
=== modified file 'openlp/plugins/custom/lib/mediaitem.py'
=== modified file 'openlp/plugins/images/__init__.py'
=== modified file 'openlp/plugins/images/imageplugin.py'
=== modified file 'openlp/plugins/images/lib/__init__.py'
=== modified file 'openlp/plugins/images/lib/imagetab.py'
=== modified file 'openlp/plugins/images/lib/mediaitem.py'
=== modified file 'openlp/plugins/media/__init__.py'
=== modified file 'openlp/plugins/media/lib/__init__.py'
=== modified file 'openlp/plugins/media/lib/mediaitem.py'
=== modified file 'openlp/plugins/media/lib/mediatab.py'
=== modified file 'openlp/plugins/media/mediaplugin.py'
=== modified file 'openlp/plugins/presentations/__init__.py'
=== modified file 'openlp/plugins/presentations/lib/__init__.py'
=== modified file 'openlp/plugins/presentations/lib/impresscontroller.py'
=== modified file 'openlp/plugins/presentations/lib/mediaitem.py'
=== modified file 'openlp/plugins/presentations/lib/messagelistener.py'
=== modified file 'openlp/plugins/presentations/lib/powerpointcontroller.py'
=== modified file 'openlp/plugins/presentations/lib/pptviewcontroller.py'
=== modified file 'openlp/plugins/presentations/lib/pptviewlib/ppttest.py'
=== modified file 'openlp/plugins/presentations/lib/presentationcontroller.py'
=== modified file 'openlp/plugins/presentations/lib/presentationtab.py'
=== modified file 'openlp/plugins/presentations/presentationplugin.py'
=== modified file 'openlp/plugins/remotes/__init__.py'
=== modified file 'openlp/plugins/remotes/html/index.html'
=== modified file 'openlp/plugins/remotes/html/stage.html'
=== modified file 'openlp/plugins/remotes/lib/__init__.py'
=== modified file 'openlp/plugins/remotes/lib/httpserver.py'
=== modified file 'openlp/plugins/remotes/lib/remotetab.py'
=== modified file 'openlp/plugins/remotes/remoteplugin.py'
=== modified file 'openlp/plugins/songs/__init__.py'
=== modified file 'openlp/plugins/songs/forms/__init__.py'
=== modified file 'openlp/plugins/songs/forms/authorsdialog.py'
=== modified file 'openlp/plugins/songs/forms/authorsform.py'
=== modified file 'openlp/plugins/songs/forms/editsongdialog.py'
=== modified file 'openlp/plugins/songs/forms/editsongform.py'
=== modified file 'openlp/plugins/songs/forms/editversedialog.py'
=== modified file 'openlp/plugins/songs/forms/editverseform.py'
=== modified file 'openlp/plugins/songs/forms/mediafilesdialog.py'
=== modified file 'openlp/plugins/songs/forms/mediafilesform.py'
=== modified file 'openlp/plugins/songs/forms/songbookdialog.py'
=== modified file 'openlp/plugins/songs/forms/songbookform.py'
=== modified file 'openlp/plugins/songs/forms/songexportform.py'
=== modified file 'openlp/plugins/songs/forms/songimportform.py'
=== modified file 'openlp/plugins/songs/forms/songmaintenancedialog.py'
=== modified file 'openlp/plugins/songs/forms/songmaintenanceform.py'
=== modified file 'openlp/plugins/songs/forms/topicsdialog.py'
=== modified file 'openlp/plugins/songs/forms/topicsform.py'
=== modified file 'openlp/plugins/songs/lib/__init__.py'
--- openlp/plugins/songs/lib/__init__.py 2013-01-18 23:31:02 +0000
+++ openlp/plugins/songs/lib/__init__.py 2013-02-03 17:22:21 +0000
@@ -570,8 +570,17 @@
failed = False
while True:
try:
+<<<<<<< TREE
encoding, default_encoding = get_encoding(font, font_table, default_encoding, failed=failed)
out.append(chr(charcode).decode(encoding))
+=======
+ encoding, default_encoding = get_encoding(font,
+ font_table, default_encoding, failed=failed)
+ if encoding:
+ out.append(chr(charcode).decode(encoding))
+ else:
+ raise Exception(u'user_canceled')
+>>>>>>> MERGE-SOURCE
except UnicodeDecodeError:
failed = True
else:
=== modified file 'openlp/plugins/songs/lib/cclifileimport.py'
=== modified file 'openlp/plugins/songs/lib/db.py'
=== modified file 'openlp/plugins/songs/lib/dreambeamimport.py'
=== modified file 'openlp/plugins/songs/lib/easyslidesimport.py'
=== modified file 'openlp/plugins/songs/lib/ewimport.py'
--- openlp/plugins/songs/lib/ewimport.py 2013-01-06 17:25:49 +0000
+++ openlp/plugins/songs/lib/ewimport.py 2013-02-03 17:22:21 +0000
@@ -174,7 +174,13 @@
self.addAuthor(author_name.strip())
if words:
# Format the lyrics
- words, self.encoding = strip_rtf(words, self.encoding)
+ try:
+ words, self.encoding = strip_rtf(words, self.encoding)
+ except Exception as info:
+ if unicode(info) == u'user_canceled':
+ return
+ else:
+ raise
verse_type = VerseType.Tags[VerseType.Verse]
for verse in SLIDE_BREAK_REGEX.split(words):
verse = verse.strip()
=== modified file 'openlp/plugins/songs/lib/foilpresenterimport.py'
=== modified file 'openlp/plugins/songs/lib/importer.py'
=== modified file 'openlp/plugins/songs/lib/mediaitem.py'
=== modified file 'openlp/plugins/songs/lib/mediashoutimport.py'
=== modified file 'openlp/plugins/songs/lib/olp1import.py'
=== modified file 'openlp/plugins/songs/lib/olpimport.py'
=== modified file 'openlp/plugins/songs/lib/oooimport.py'
=== modified file 'openlp/plugins/songs/lib/openlyricsexport.py'
=== modified file 'openlp/plugins/songs/lib/openlyricsimport.py'
=== modified file 'openlp/plugins/songs/lib/opensongimport.py'
=== modified file 'openlp/plugins/songs/lib/powersongimport.py'
=== modified file 'openlp/plugins/songs/lib/sofimport.py'
=== modified file 'openlp/plugins/songs/lib/songbeamerimport.py'
=== modified file 'openlp/plugins/songs/lib/songimport.py'
=== modified file 'openlp/plugins/songs/lib/songproimport.py'
--- openlp/plugins/songs/lib/songproimport.py 2013-01-18 23:31:02 +0000
+++ openlp/plugins/songs/lib/songproimport.py 2013-02-03 17:22:21 +0000
@@ -107,8 +107,14 @@
self.finish()
return
if u'rtf1' in text:
- text, self.encoding = strip_rtf(text, self.encoding)
- text = text.rstrip()
+ try:
+ text, self.encoding = strip_rtf(text, self.encoding)
+ text = text.rstrip()
+ except Exception as info:
+ if unicode(info) == u'user_canceled':
+ return
+ else:
+ raise
if not text:
return
if tag == u'A':
=== modified file 'openlp/plugins/songs/lib/songshowplusimport.py'
=== modified file 'openlp/plugins/songs/lib/songstab.py'
=== modified file 'openlp/plugins/songs/lib/sundayplusimport.py'
--- openlp/plugins/songs/lib/sundayplusimport.py 2013-01-06 17:25:49 +0000
+++ openlp/plugins/songs/lib/sundayplusimport.py 2013-02-03 17:22:21 +0000
@@ -148,8 +148,14 @@
verse_type = HOTKEY_TO_VERSE_TYPE[value]
if name == 'rtf':
value = self.unescape(value)
- verse, self.encoding = strip_rtf(value, self.encoding)
- lines = verse.strip().split('\n')
+ try:
+ verse, self.encoding = strip_rtf(value, self.encoding)
+ lines = verse.strip().split('\n')
+ except Exception as info:
+ if unicode(info) == u'user_canceled':
+ return
+ else:
+ raise
# If any line inside any verse contains CCLI or
# only Public Domain, we treat this as special data:
# we remove that line and add data to specific field.
=== modified file 'openlp/plugins/songs/lib/test/test_import_file.py'
=== modified file 'openlp/plugins/songs/lib/test/test_importing_lots.py'
=== modified file 'openlp/plugins/songs/lib/test/test_opensongimport.py'
=== modified file 'openlp/plugins/songs/lib/ui.py'
=== modified file 'openlp/plugins/songs/lib/upgrade.py'
=== modified file 'openlp/plugins/songs/lib/wowimport.py'
=== modified file 'openlp/plugins/songs/lib/xml.py'
=== modified file 'openlp/plugins/songs/lib/zionworximport.py'
=== modified file 'openlp/plugins/songs/songsplugin.py'
=== modified file 'openlp/plugins/songusage/__init__.py'
=== modified file 'openlp/plugins/songusage/forms/__init__.py'
=== modified file 'openlp/plugins/songusage/forms/songusagedeletedialog.py'
=== modified file 'openlp/plugins/songusage/forms/songusagedeleteform.py'
=== modified file 'openlp/plugins/songusage/forms/songusagedetaildialog.py'
=== modified file 'openlp/plugins/songusage/forms/songusagedetailform.py'
=== modified file 'openlp/plugins/songusage/lib/__init__.py'
=== modified file 'openlp/plugins/songusage/lib/db.py'
=== modified file 'openlp/plugins/songusage/lib/upgrade.py'
=== modified file 'openlp/plugins/songusage/songusageplugin.py'
=== modified file 'resources/__init__.py'
=== modified file 'resources/pyinstaller/hook-openlp.core.ui.media.py'
=== modified file 'resources/pyinstaller/hook-openlp.plugins.presentations.presentationplugin.py'
=== modified file 'resources/pyinstaller/hook-openlp.py'
=== modified file 'scripts/check_dependencies.py'
=== modified file 'scripts/generate_resources.sh'
=== modified file 'scripts/openlp-remoteclient.py'
=== modified file 'scripts/resources.patch'
Follow ups