diff --git a/openlp/core/lib/filedialog.py b/openlp/core/lib/filedialog.py index 0c2bd1005..5e0c7539b 100644 --- a/openlp/core/lib/filedialog.py +++ b/openlp/core/lib/filedialog.py @@ -28,9 +28,8 @@ ############################################################################### """ -Provide a work around for a bug in QFileDialog (#1209515) +Provide a work around for a bug in QFileDialog """ -import logging import os import urllib @@ -38,8 +37,6 @@ from PyQt4 import QtCore, QtGui from openlp.core.lib.ui import UiStrings -log = logging.getLogger(__name__) - class FileDialog(QtGui.QFileDialog): @staticmethod def getOpenFileNames(parent, title, path, filters): @@ -50,9 +47,9 @@ class FileDialog(QtGui.QFileDialog): if not os.path.exists(file): file = urllib.unquote(file) if not os.path.exists(file): - QtGui.QMessageBox.information(self, - UiStrings().FNFT, - UiStrings().FNF % file) + QtGui.QMessageBox.information(parent, + UiStrings().FileNotFound, + UiStrings().FileNotFoundMessage % file) continue file_list.append(QtCore.QString(file)) return file_list \ No newline at end of file diff --git a/openlp/core/lib/ui.py b/openlp/core/lib/ui.py index 65b720787..03403816a 100644 --- a/openlp/core/lib/ui.py +++ b/openlp/core/lib/ui.py @@ -77,9 +77,9 @@ class UiStrings(object): self.Error = translate('OpenLP.Ui', 'Error') self.Export = translate('OpenLP.Ui', 'Export') self.File = translate('OpenLP.Ui', 'File') - self.FNFT = unicode(translate('OpenLP.Ui', + self.FileNotFound = unicode(translate('OpenLP.Ui', 'File Not Found')) - self.FNF = unicode(translate('OpenLP.Ui', + self.FileNotFoundMessage = unicode(translate('OpenLP.Ui', 'File %s not found.\nPlease try selecting it individually.')) self.FontSizePtUnit = translate('OpenLP.Ui', 'pt', 'Abbreviated font pointsize unit')