forked from openlp/openlp
Py3 Fixes
This commit is contained in:
parent
a06469fea0
commit
9f5bd87a50
@ -374,22 +374,22 @@ def create_separated_list(stringlist):
|
||||
return translate('OpenLP.core.lib', '%s, %s', u'Locale list separator: start') % (stringlist[0], merged)
|
||||
|
||||
|
||||
from registry import Registry
|
||||
from uistrings import UiStrings
|
||||
from filedialog import FileDialog
|
||||
from screen import ScreenList
|
||||
from settings import Settings
|
||||
from listwidgetwithdnd import ListWidgetWithDnD
|
||||
from treewidgetwithdnd import TreeWidgetWithDnD
|
||||
from formattingtags import FormattingTags
|
||||
from spelltextedit import SpellTextEdit
|
||||
from plugin import PluginStatus, StringContent, Plugin
|
||||
from pluginmanager import PluginManager
|
||||
from settingstab import SettingsTab
|
||||
from serviceitem import ServiceItem, ServiceItemType, ItemCapabilities
|
||||
from htmlbuilder import build_html, build_lyrics_format_css, build_lyrics_outline_css
|
||||
from toolbar import OpenLPToolbar
|
||||
from dockwidget import OpenLPDockWidget
|
||||
from imagemanager import ImageManager
|
||||
from renderer import Renderer
|
||||
from mediamanageritem import MediaManagerItem
|
||||
from .registry import Registry
|
||||
from .uistrings import UiStrings
|
||||
from .filedialog import FileDialog
|
||||
from .screen import ScreenList
|
||||
from .settings import Settings
|
||||
from .listwidgetwithdnd import ListWidgetWithDnD
|
||||
from .treewidgetwithdnd import TreeWidgetWithDnD
|
||||
from .formattingtags import FormattingTags
|
||||
from .spelltextedit import SpellTextEdit
|
||||
from .plugin import PluginStatus, StringContent, Plugin
|
||||
from .pluginmanager import PluginManager
|
||||
from .settingstab import SettingsTab
|
||||
from .serviceitem import ServiceItem, ServiceItemType, ItemCapabilities
|
||||
from .htmlbuilder import build_html, build_lyrics_format_css, build_lyrics_outline_css
|
||||
from .toolbar import OpenLPToolbar
|
||||
from .dockwidget import OpenLPDockWidget
|
||||
from .imagemanager import ImageManager
|
||||
from .renderer import Renderer
|
||||
from .mediamanageritem import MediaManagerItem
|
@ -32,7 +32,7 @@ Provide a work around for a bug in QFileDialog <https://bugs.launchpad.net/openl
|
||||
"""
|
||||
import logging
|
||||
import os
|
||||
import urllib
|
||||
from urllib import parse
|
||||
|
||||
from PyQt4 import QtGui
|
||||
|
||||
@ -53,15 +53,14 @@ class FileDialog(QtGui.QFileDialog):
|
||||
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))
|
||||
log.info('File %s not found. Attempting to unquote.')
|
||||
file = parse.unquote(file)
|
||||
if not os.path.exists(file):
|
||||
log.error(u'File %s not found.' % file)
|
||||
log.error('File %s not found.' % file)
|
||||
QtGui.QMessageBox.information(parent, UiStrings().FileNotFound,
|
||||
UiStrings().FileNotFoundMessage % file)
|
||||
continue
|
||||
log.info(u'File %s found.')
|
||||
log.info('File %s found.')
|
||||
file_list.append(file)
|
||||
return file_list
|
@ -83,8 +83,8 @@ class UiStrings(object):
|
||||
self.Error = translate('OpenLP.Ui', 'Error')
|
||||
self.Export = translate('OpenLP.Ui', 'Export')
|
||||
self.File = translate('OpenLP.Ui', 'File')
|
||||
self.FileNotFound = unicode(translate('OpenLP.Ui', 'File Not Found'))
|
||||
self.FileNotFoundMessage = unicode(translate('OpenLP.Ui', 'File %s not found.\nPlease try selecting it individually.'))
|
||||
self.FileNotFound = translate('OpenLP.Ui', 'File Not Found')
|
||||
self.FileNotFoundMessage = translate('OpenLP.Ui', 'File %s not found.\nPlease try selecting it individually.')
|
||||
self.FontSizePtUnit = translate('OpenLP.Ui', 'pt', 'Abbreviated font pointsize unit')
|
||||
self.Help = translate('OpenLP.Ui', 'Help')
|
||||
self.Hours = translate('OpenLP.Ui', 'h', 'The abbreviated unit for hours')
|
||||
|
Loading…
Reference in New Issue
Block a user