renamed strings, remove unused logger import

This commit is contained in:
Philip Ridout 2013-08-16 06:20:21 +01:00
parent 12fb5ebd46
commit 6a0771392d
2 changed files with 6 additions and 9 deletions

View File

@ -28,9 +28,8 @@
###############################################################################
"""
Provide a work around for a bug in QFileDialog (#1209515)
Provide a work around for a bug in QFileDialog <https://bugs.launchpad.net/openlp/+bug/1209515>
"""
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

View File

@ -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')