forked from openlp/openlp
reverted changes in slidecontroller.py to avoid interference with merge request 44744 of googol-hush
This commit is contained in:
parent
7c68265f4b
commit
1a31bf2047
@ -33,11 +33,11 @@ processing version 1 themes in OpenLP version 2.
|
||||
from xml.etree.ElementTree import ElementTree, XML
|
||||
from PyQt4 import QtGui
|
||||
|
||||
DELPHI_COLORS = {"clRed":0xFF0000,
|
||||
"clBlue":0x0000FF,
|
||||
"clYellow":0xFFFF00,
|
||||
"clBlack":0x000000,
|
||||
"clWhite":0xFFFFFF}
|
||||
DELPHI_COLORS = {u'clRed': 0xFF0000,
|
||||
u'clBlue': 0x0000FF,
|
||||
u'clYellow': 0xFFFF00,
|
||||
u'clBlack': 0x000000,
|
||||
u'clWhite': 0xFFFFFF}
|
||||
|
||||
BLANK_STYLE_XML = \
|
||||
'''<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
@ -222,4 +222,4 @@ class Theme(object):
|
||||
for key in dir(self):
|
||||
if key[0:1] != u'_':
|
||||
theme_strings.append(u'%30s : %s' % (key, getattr(self, key)))
|
||||
return u'\n'.join(theme_strings)
|
||||
return u'\n'.join(theme_strings)
|
||||
|
@ -184,14 +184,14 @@ class SlideController(QtGui.QWidget):
|
||||
'Blank Screen'), self.HideMenu)
|
||||
self.BlankScreen.setCheckable(True)
|
||||
QtCore.QObject.connect(self.BlankScreen,
|
||||
QtCore.SIGNAL(u'triggered(bool)'), self.onBlankDisplay)
|
||||
QtCore.SIGNAL("triggered(bool)"), self.onBlankDisplay)
|
||||
self.ThemeScreen = QtGui.QAction(QtGui.QIcon(
|
||||
u':/slides/slide_theme.png'),
|
||||
translate('OpenLP.SlideController',
|
||||
'Blank to Theme'), self.HideMenu)
|
||||
self.ThemeScreen.setCheckable(True)
|
||||
QtCore.QObject.connect(self.ThemeScreen,
|
||||
QtCore.SIGNAL(u'triggered(bool)'), self.onThemeDisplay)
|
||||
QtCore.SIGNAL("triggered(bool)"), self.onThemeDisplay)
|
||||
if self.screens.display_count > 1:
|
||||
self.DesktopScreen = QtGui.QAction(QtGui.QIcon(
|
||||
u':/slides/slide_desktop.png'),
|
||||
@ -199,7 +199,7 @@ class SlideController(QtGui.QWidget):
|
||||
'Show Desktop'), self.HideMenu)
|
||||
self.DesktopScreen.setCheckable(True)
|
||||
QtCore.QObject.connect(self.DesktopScreen,
|
||||
QtCore.SIGNAL(u'triggered(bool)'), self.onHideDisplay)
|
||||
QtCore.SIGNAL("triggered(bool)"), self.onHideDisplay)
|
||||
self.HideMenu.setDefaultAction(self.BlankScreen)
|
||||
self.HideMenu.menu().addAction(self.BlankScreen)
|
||||
self.HideMenu.menu().addAction(self.ThemeScreen)
|
||||
@ -1033,4 +1033,4 @@ class SlideController(QtGui.QWidget):
|
||||
self.mediaObject.clearQueue()
|
||||
self.video.hide()
|
||||
self.SlidePreview.clear()
|
||||
self.SlidePreview.show()
|
||||
self.SlidePreview.show()
|
@ -65,7 +65,7 @@ class LanguageManager(object):
|
||||
"""
|
||||
trans_dir = QtCore.QDir(AppLocation.get_directory(
|
||||
AppLocation.LanguageDir))
|
||||
file_names = trans_dir.entryList(QtCore.QStringList("*.qm"),
|
||||
file_names = trans_dir.entryList(QtCore.QStringList(u'*.qm'),
|
||||
QtCore.QDir.Files, QtCore.QDir.Name)
|
||||
for name in file_names:
|
||||
file_names.replaceInStrings(name, trans_dir.filePath(name))
|
||||
@ -143,4 +143,4 @@ class LanguageManager(object):
|
||||
"""
|
||||
if not LanguageManager.__qm_list__:
|
||||
LanguageManager.init_qm_list()
|
||||
return LanguageManager.__qm_list__
|
||||
return LanguageManager.__qm_list__
|
||||
|
@ -86,11 +86,11 @@ class CCLIFileImport(SongImport):
|
||||
infile = codecs.open(filename, u'r', details['encoding'])
|
||||
lines = infile.readlines()
|
||||
ext = os.path.splitext(filename)[1]
|
||||
if ext.lower() == ".usr":
|
||||
if ext.lower() == u'.usr':
|
||||
log.info(u'SongSelect .usr format file found %s: ',
|
||||
filename)
|
||||
self.do_import_usr_file(lines)
|
||||
elif ext.lower() == ".txt":
|
||||
elif ext.lower() == u'.txt':
|
||||
log.info(u'SongSelect .txt format file found %s: ',
|
||||
filename)
|
||||
self.do_import_txt_file(lines)
|
||||
@ -207,7 +207,7 @@ class CCLIFileImport(SongImport):
|
||||
author_list = song_author.split(u'|')
|
||||
for author in author_list:
|
||||
seperated = author.split(u',')
|
||||
self.add_author(seperated[1].strip() + " " + seperated[0].strip())
|
||||
self.add_author(seperated[1].strip() + u' ' + seperated[0].strip())
|
||||
self.title = song_name
|
||||
self.copyright = song_copyright
|
||||
self.ccli_number = song_ccli
|
||||
|
@ -96,7 +96,7 @@ class SongBeamerImport(SongImport):
|
||||
read_verses = False
|
||||
self.file_name = os.path.split(file)[1]
|
||||
self.import_wizard.incrementProgressBar(
|
||||
"Importing %s" % (self.file_name), 0)
|
||||
u'Importing %s' % (self.file_name), 0)
|
||||
if os.path.isfile(file):
|
||||
detect_file = open(file, u'r')
|
||||
details = chardet.detect(detect_file.read(2048))
|
||||
|
@ -119,7 +119,7 @@ class WowImport(SongImport):
|
||||
self.copyright = u''
|
||||
self.file_name = os.path.split(file)[1]
|
||||
self.import_wizard.incrementProgressBar(
|
||||
"Importing %s" % (self.file_name), 0)
|
||||
u'Importing %s' % (self.file_name), 0)
|
||||
# Get the song title
|
||||
self.title = self.file_name.rpartition(u'.')[0]
|
||||
self.songData = open(file, 'rb')
|
||||
@ -167,5 +167,5 @@ class WowImport(SongImport):
|
||||
self.songData.close()
|
||||
self.finish()
|
||||
self.import_wizard.incrementProgressBar(
|
||||
"Importing %s" % (self.file_name))
|
||||
u'Importing %s' % (self.file_name))
|
||||
return True
|
||||
|
Loading…
Reference in New Issue
Block a user