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