openlp-core team mailing list archive
-
openlp-core team
-
Mailing list archive
-
Message #01664
[Merge] lp:~meths/openlp/trivialfixes into lp:openlp
Jon Tibble has proposed merging lp:~meths/openlp/trivialfixes into lp:openlp.
Requested reviews:
OpenLP Core (openlp-core)
DIFF CHECK ONLY
--
https://code.launchpad.net/~meths/openlp/trivialfixes/+merge/26521
Your team OpenLP Core is requested to review the proposed merge of lp:~meths/openlp/trivialfixes into lp:openlp.
=== modified file 'openlp.pyw'
--- openlp.pyw 2010-05-10 20:44:38 +0000
+++ openlp.pyw 2010-06-01 17:23:23 +0000
@@ -100,7 +100,7 @@
)
else:
log.info(u'Openlp version %s' % app_version[u'version'])
- except:
+ except IOError:
log.exception('Error in version file.')
app_version = {
u'full': u'1.9.0-bzr000',
=== modified file 'openlp/core/lib/__init__.py'
--- openlp/core/lib/__init__.py 2010-05-28 00:26:49 +0000
+++ openlp/core/lib/__init__.py 2010-06-01 17:23:23 +0000
@@ -173,7 +173,6 @@
from plugin import PluginStatus, Plugin
from pluginmanager import PluginManager
from settingstab import SettingsTab
-from mediamanageritem import MediaManagerItem
from xmlrootclass import XmlRootClass
from serviceitem import ServiceItem
from serviceitem import ServiceItemType
@@ -184,5 +183,6 @@
from themexmlhandler import ThemeXML
from renderer import Renderer
from rendermanager import RenderManager
+from mediamanageritem import MediaManagerItem
from basemodel import BaseModel
from baselistwithdnd import BaseListWithDnD
=== modified file 'openlp/core/lib/mediamanageritem.py'
--- openlp/core/lib/mediamanageritem.py 2010-05-25 16:16:43 +0000
+++ openlp/core/lib/mediamanageritem.py 2010-06-01 17:23:23 +0000
@@ -23,15 +23,14 @@
# Temple Place, Suite 330, Boston, MA 02111-1307 USA #
###############################################################################
+import logging
import types
import os
from PyQt4 import QtCore, QtGui
-from openlp.core.lib.toolbar import *
from openlp.core.lib import contextMenuAction, contextMenuSeparator, \
- SettingsManager
-from serviceitem import ServiceItem
+ SettingsManager, OpenLPToolbar, ServiceItem, build_icon
log = logging.getLogger(__name__)
@@ -336,8 +335,8 @@
log.info(u'New files(s) %s', unicode(files))
if files:
self.loadList(files)
- dir = os.path.split(unicode(files[0]))[0]
- SettingsManager.set_last_dir(self.settingsSection, dir)
+ lastDir = os.path.split(unicode(files[0]))[0]
+ SettingsManager.set_last_dir(self.settingsSection, lastDir)
SettingsManager.set_list(self.settingsSection,
self.settingsSection, self.getFileList())
=== modified file 'openlp/core/lib/pluginmanager.py'
--- openlp/core/lib/pluginmanager.py 2010-03-21 23:58:01 +0000
+++ openlp/core/lib/pluginmanager.py 2010-06-01 17:23:23 +0000
@@ -38,30 +38,32 @@
"""
log.info(u'Plugin manager loaded')
- def __init__(self, dir):
+ def __init__(self, plugin_dir):
"""
The constructor for the plugin manager. Passes the controllers on to
the plugins for them to interact with via their ServiceItems.
- ``dir``
+ ``plugin_dir``
The directory to search for plugins.
"""
log.info(u'Plugin manager initing')
- if not dir in sys.path:
- log.debug(u'Inserting %s into sys.path', dir)
- sys.path.insert(0, dir)
- self.basepath = os.path.abspath(dir)
+ if not plugin_dir in sys.path:
+ log.debug(u'Inserting %s into sys.path', plugin_dir)
+ sys.path.insert(0, plugin_dir)
+ self.basepath = os.path.abspath(plugin_dir)
log.debug(u'Base path %s ', self.basepath)
+ self.plugin_helpers = []
self.plugins = []
- # this has to happen after the UI is sorted self.find_plugins(dir)
+ # this has to happen after the UI is sorted
+ # self.find_plugins(plugin_dir)
log.info(u'Plugin manager Initialised')
- def find_plugins(self, dir, plugin_helpers):
+ def find_plugins(self, plugin_dir, plugin_helpers):
"""
- Scan the directory ``dir`` for objects inheriting from the ``Plugin``
- class.
+ Scan the directory ``plugin_dir`` for objects inheriting from the
+ ``Plugin`` class.
- ``dir``
+ ``plugin_dir``
The directory to scan.
``plugin_helpers``
@@ -69,10 +71,11 @@
"""
self.plugin_helpers = plugin_helpers
- startdepth = len(os.path.abspath(dir).split(os.sep))
- log.debug(u'find plugins %s at depth %d', unicode(dir), startdepth)
+ startdepth = len(os.path.abspath(plugin_dir).split(os.sep))
+ log.debug(u'finding plugins in %s at depth %d',
+ unicode(plugin_dir), startdepth)
- for root, dirs, files in os.walk(dir):
+ for root, dirs, files in os.walk(plugin_dir):
for name in files:
if name.endswith(u'.py') and not name.startswith(u'__'):
path = os.path.abspath(os.path.join(root, name))
@@ -80,7 +83,7 @@
if thisdepth - startdepth > 2:
# skip anything lower down
continue
- modulename, pyext = os.path.splitext(path)
+ modulename = os.path.splitext(path)[0]
prefix = os.path.commonprefix([self.basepath, path])
# hack off the plugin base path
modulename = modulename[len(prefix) + 1:]
@@ -91,8 +94,8 @@
try:
__import__(modulename, globals(), locals(), [])
except ImportError, e:
- log.exception(u'Failed to import module %s on path %s for reason %s',
- modulename, path, e.args[0])
+ log.exception(u'Failed to import module %s on path %s '
+ 'for reason %s', modulename, path, e.args[0])
plugin_classes = Plugin.__subclasses__()
plugin_objects = []
for p in plugin_classes:
@@ -214,3 +217,4 @@
if plugin.is_active():
plugin.finalise()
log.info(u'Finalisation Complete for %s ' % plugin.name)
+
=== modified file 'openlp/core/lib/renderer.py'
--- openlp/core/lib/renderer.py 2010-05-25 16:16:43 +0000
+++ openlp/core/lib/renderer.py 2010-06-01 17:23:23 +0000
@@ -189,7 +189,8 @@
pos = split_text.rfind(u' ')
#no more spaces and we are still too long
if pos == -1:
- while metrics.width(split_text, -1) > line_width:
+ while \
+ metrics.width(split_text, -1) > line_width:
split_text = split_text[:-1]
pos = len(split_text)
else:
@@ -199,12 +200,14 @@
#if we have more text add up to 10 spaces on the front.
if line and self._theme.font_main_indentation > 0:
line = u'%s%s' % \
- (u' '[:int(self._theme.font_main_indentation)], line)
+ (u' '[:int(self._theme.font_main_indentation)],
+ line)
#Text fits in a line now
for count, line in enumerate(split_lines):
page.append(line)
#last but one line and only 2 lines to go or end of page
- if (len(page) == page_length - 1 and len(split_lines) - 3 == count) or \
+ if (len(page) == page_length - 1 and
+ len(split_lines) - 3 == count) or \
len(page) == page_length:
split_pages.append(page)
page = []
@@ -559,7 +562,8 @@
self.painter.drawText(x, rowpos, line)
if self._theme.display_slideTransition:
# Print 2nd image with 70% weight
- if self._theme.display_outline and outline_size != 0 and not footer:
+ if self._theme.display_outline and outline_size != 0 and \
+ not footer:
path = QtGui.QPainterPath()
path.addText(QtCore.QPointF(x, rowpos), font, line)
self.painter2.setBrush(self.painter2.pen().brush())
=== modified file 'openlp/core/lib/rendermanager.py'
--- openlp/core/lib/rendermanager.py 2010-04-21 16:59:48 +0000
+++ openlp/core/lib/rendermanager.py 2010-06-01 17:23:23 +0000
@@ -181,7 +181,8 @@
footer.append(u'CCLI 123456')
formatted = self.renderer.format_slide(verse, False)
#Only Render the first slide page returned
- return self.renderer.generate_frame_from_lines(formatted[0], footer)[u'main']
+ return self.renderer.generate_frame_from_lines(formatted[0],
+ footer)[u'main']
def format_slide(self, words):
"""
=== modified file 'openlp/core/lib/settingsmanager.py'
--- openlp/core/lib/settingsmanager.py 2010-05-05 19:57:20 +0000
+++ openlp/core/lib/settingsmanager.py 2010-06-01 17:23:23 +0000
@@ -172,11 +172,12 @@
path = os.path.join(path, section)
try:
files = os.listdir(path)
- except:
+ except OSError:
return []
if extension:
- return [file for file in files
- if extension == os.path.splitext(file)[1]]
+ return [filename for filename in files
+ if extension == os.path.splitext(filename)[1]]
else:
# no filtering required
return files
+
=== modified file 'openlp/core/lib/songxmlhandler.py'
--- openlp/core/lib/songxmlhandler.py 2010-03-21 23:58:01 +0000
+++ openlp/core/lib/songxmlhandler.py 2010-06-01 17:23:23 +0000
@@ -24,8 +24,10 @@
###############################################################################
import logging
+
from xml.dom.minidom import Document
from xml.etree.ElementTree import ElementTree, XML, dump
+from xml.parsers.expat import ExpatError
log = logging.getLogger(__name__)
@@ -136,7 +138,7 @@
try:
self.song_xml = ElementTree(
element=XML(unicode(xml).encode('unicode-escape')))
- except:
+ except ExpatError:
log.exception(u'Invalid xml %s', xml)
def get_verses(self):
@@ -144,9 +146,9 @@
Iterates through the verses in the XML and returns a list of verses
and their attributes.
"""
- iter = self.song_xml.getiterator()
+ xml_iter = self.song_xml.getiterator()
verse_list = []
- for element in iter:
+ for element in xml_iter:
if element.tag == u'verse':
if element.text is None:
element.text = u''
=== modified file 'openlp/core/lib/themexmlhandler.py'
--- openlp/core/lib/themexmlhandler.py 2010-05-25 16:16:43 +0000
+++ openlp/core/lib/themexmlhandler.py 2010-06-01 17:23:23 +0000
@@ -30,7 +30,7 @@
from openlp.core.lib import str_to_bool
-blankthemexml = \
+BLANK_THEME_XML = \
'''<?xml version="1.0" encoding="utf-8"?>
<theme version="1.0">
<name>BlankStyle</name>
@@ -97,7 +97,8 @@
"""
if self.background_filename and path:
self.theme_name = self.theme_name.rstrip().lstrip()
- self.background_filename = self.background_filename.rstrip().lstrip()
+ self.background_filename = \
+ self.background_filename.rstrip().lstrip()
self.background_filename = os.path.join(path, self.theme_name,
self.background_filename)
@@ -244,7 +245,8 @@
background.appendChild(element)
def add_display(self, shadow, shadow_color, outline, outline_color,
- horizontal, vertical, wrap, transition, shadow_pixel=5, outline_pixel=2):
+ horizontal, vertical, wrap, transition, shadow_pixel=5,
+ outline_pixel=2):
"""
Add a Display options.
@@ -349,13 +351,12 @@
"""
self.base_parse_xml()
self.parse_xml(xml)
- self.theme_filename_extended = False
def base_parse_xml(self):
"""
Pull in the blank theme XML as a starting point.
"""
- self.parse_xml(blankthemexml)
+ self.parse_xml(BLANK_THEME_XML)
def parse_xml(self, xml):
"""
@@ -365,9 +366,9 @@
The XML string to parse.
"""
theme_xml = ElementTree(element=XML(xml))
- iter = theme_xml.getiterator()
+ xml_iter = theme_xml.getiterator()
master = u''
- for element in iter:
+ for element in xml_iter:
element.text = unicode(element.text).decode('unicode-escape')
if element.getchildren():
master = element.tag + u'_'
@@ -409,3 +410,4 @@
if key[0:1] != u'_':
theme_strings.append(u'%30s: %s' % (key, getattr(self, key)))
return u'\n'.join(theme_strings)
+
=== modified file 'openlp/core/lib/toolbar.py'
--- openlp/core/lib/toolbar.py 2010-05-05 17:17:00 +0000
+++ openlp/core/lib/toolbar.py 2010-06-01 17:23:23 +0000
@@ -120,7 +120,7 @@
try:
if self.icons[title]:
return self.icons[title]
- except:
+ except NameError:
log.exception(u'getIconFromTitle - no icon for %s' % title)
return QtGui.QIcon()
=== modified file 'openlp/core/lib/xmlrootclass.py'
--- openlp/core/lib/xmlrootclass.py 2010-05-25 12:39:12 +0000
+++ openlp/core/lib/xmlrootclass.py 2010-06-01 17:23:23 +0000
@@ -52,8 +52,8 @@
The root tag of the xml.
"""
root = ElementTree(element=XML(xml))
- iter = root.getiterator()
- for element in iter:
+ xml_iter = root.getiterator()
+ for element in xml_iter:
if element.tag != root_tag:
text = element.text
if type(text) is NoneType:
@@ -76,7 +76,8 @@
# Ok, it seems to be a string.
val = text
if hasattr(self, u'post_tag_hook'):
- (element.tag, val) = self.post_tag_hook(element.tag, val)
+ (element.tag, val) = \
+ self.post_tag_hook(element.tag, val)
setattr(self, element.tag, val)
def __str__(self):
@@ -90,7 +91,8 @@
attributes = []
for attrib in dir(self):
if not attrib.startswith(u'_'):
- attributes.append(u'%30s : %s' % (attrib, getattr(self, attrib)))
+ attributes.append(
+ u'%30s : %s' % (attrib, getattr(self, attrib)))
return u'\n'.join(attributes)
def _get_as_string(self):
=== modified file 'openlp/core/theme/theme.py'
--- openlp/core/theme/theme.py 2010-05-25 12:39:12 +0000
+++ openlp/core/theme/theme.py 2010-06-01 17:23:23 +0000
@@ -28,13 +28,13 @@
from xml.etree.ElementTree import ElementTree, XML
from PyQt4 import QtGui
-DelphiColors = {"clRed":0xFF0000,
- "clBlue":0x0000FF,
- "clYellow":0xFFFF00,
- "clBlack":0x000000,
- "clWhite":0xFFFFFF}
+DELPHI_COLORS = {"clRed":0xFF0000,
+ "clBlue":0x0000FF,
+ "clYellow":0xFFFF00,
+ "clBlack":0x000000,
+ "clWhite":0xFFFFFF}
-blankstylexml = \
+BLANK_STYLE_XML = \
'''<?xml version="1.0" encoding="iso-8859-1"?>
<Theme>
<Name>BlankStyle</Name>
@@ -97,7 +97,7 @@
1 - lyrics
"""
# init to defaults
- self._set_from_XML(blankstylexml)
+ self._set_from_XML(BLANK_STYLE_XML)
self._set_from_XML(xml)
def _get_as_string(self):
@@ -115,26 +115,27 @@
for element in iter:
delphiColorChange = False
if element.tag != u'Theme':
- t = element.text
+ element_text = element.text
val = 0
# easy!
- if type(t) == type(None):
- val = t
+ if element_text is None:
+ val = element_text
# strings need special handling to sort the colours out
- if type(t) is types.StringType or type(t) is types.UnicodeType:
- if t[0] == u'$': # might be a hex number
+ if type(element_text) is types.StringType or \
+ type(element_text) is types.UnicodeType:
+ if element_text[0] == u'$': # might be a hex number
try:
- val = int(t[1:], 16)
+ val = int(element_text[1:], 16)
except ValueError: # nope
pass
- elif DelphiColors.has_key(t):
- val = DelphiColors[t]
+ elif DELPHI_COLORS.has_key(element_text):
+ val = DELPHI_COLORS[element_text]
delphiColorChange = True
else:
try:
- val = int(t)
+ val = int(element_text)
except ValueError:
- val = t
+ val = element_text
if (element.tag.find(u'Color') > 0 or
(element.tag.find(u'BackgroundParameter') == 0 and
type(val) == type(0))):
=== modified file 'openlp/core/ui/aboutdialog.py'
--- openlp/core/ui/aboutdialog.py 2010-05-01 19:45:06 +0000
+++ openlp/core/ui/aboutdialog.py 2010-06-01 17:23:23 +0000
@@ -132,7 +132,8 @@
'consider contributing by using the button below.'
))
self.AboutNotebook.setTabText(
- self.AboutNotebook.indexOf(self.AboutTab), translate('AboutForm', 'About'))
+ self.AboutNotebook.indexOf(self.AboutTab),
+ translate('AboutForm', 'About'))
self.CreditsTextEdit.setPlainText(translate('AboutForm',
'Project Lead\n'
' Raoul "superfly" Snyman\n'
=== modified file 'openlp/core/ui/aboutform.py'
--- openlp/core/ui/aboutform.py 2010-05-11 21:05:08 +0000
+++ openlp/core/ui/aboutform.py 2010-06-01 17:23:23 +0000
@@ -57,5 +57,6 @@
Launch a web browser and go to the contribute page on the site.
"""
import webbrowser
- url = u'http://www.openlp.org/en/documentation/introduction/contributing.html'
+ url = u'http://www.openlp.org/en/documentation/introduction/' \
+ + u'contributing.html'
webbrowser.open_new(url)
=== modified file 'openlp/core/ui/amendthemedialog.py'
--- openlp/core/ui/amendthemedialog.py 2010-05-16 15:33:31 +0000
+++ openlp/core/ui/amendthemedialog.py 2010-06-01 17:23:23 +0000
@@ -24,8 +24,8 @@
###############################################################################
from PyQt4 import QtCore, QtGui
-from openlp.core.lib import build_icon
-from openlp.core.lib import translate
+
+from openlp.core.lib import build_icon, translate
class Ui_AmendThemeDialog(object):
def setupUi(self, AmendThemeDialog):
@@ -68,45 +68,56 @@
self.BackgroundLayout.setObjectName(u'BackgroundLayout')
self.BackgroundLabel = QtGui.QLabel(self.BackgroundTab)
self.BackgroundLabel.setObjectName(u'BackgroundLabel')
- self.BackgroundLayout.setWidget(0, QtGui.QFormLayout.LabelRole, self.BackgroundLabel)
+ self.BackgroundLayout.setWidget(0, QtGui.QFormLayout.LabelRole,
+ self.BackgroundLabel)
self.BackgroundComboBox = QtGui.QComboBox(self.BackgroundTab)
self.BackgroundComboBox.setObjectName(u'BackgroundComboBox')
self.BackgroundComboBox.addItem(QtCore.QString())
self.BackgroundComboBox.addItem(QtCore.QString())
- self.BackgroundLayout.setWidget(0, QtGui.QFormLayout.FieldRole, self.BackgroundComboBox)
+ self.BackgroundLayout.setWidget(0, QtGui.QFormLayout.FieldRole,
+ self.BackgroundComboBox)
self.BackgroundTypeLabel = QtGui.QLabel(self.BackgroundTab)
self.BackgroundTypeLabel.setObjectName(u'BackgroundTypeLabel')
- self.BackgroundLayout.setWidget(1, QtGui.QFormLayout.LabelRole, self.BackgroundTypeLabel)
+ self.BackgroundLayout.setWidget(1, QtGui.QFormLayout.LabelRole,
+ self.BackgroundTypeLabel)
self.BackgroundTypeComboBox = QtGui.QComboBox(self.BackgroundTab)
self.BackgroundTypeComboBox.setObjectName(u'BackgroundTypeComboBox')
self.BackgroundTypeComboBox.addItem(QtCore.QString())
self.BackgroundTypeComboBox.addItem(QtCore.QString())
self.BackgroundTypeComboBox.addItem(QtCore.QString())
- self.BackgroundLayout.setWidget(1, QtGui.QFormLayout.FieldRole, self.BackgroundTypeComboBox)
+ self.BackgroundLayout.setWidget(1, QtGui.QFormLayout.FieldRole,
+ self.BackgroundTypeComboBox)
self.Color1Label = QtGui.QLabel(self.BackgroundTab)
self.Color1Label.setObjectName(u'Color1Label')
- self.BackgroundLayout.setWidget(2, QtGui.QFormLayout.LabelRole, self.Color1Label)
+ self.BackgroundLayout.setWidget(2, QtGui.QFormLayout.LabelRole,
+ self.Color1Label)
self.Color1PushButton = QtGui.QPushButton(self.BackgroundTab)
self.Color1PushButton.setObjectName(u'Color1PushButton')
- self.BackgroundLayout.setWidget(2, QtGui.QFormLayout.FieldRole, self.Color1PushButton)
+ self.BackgroundLayout.setWidget(2, QtGui.QFormLayout.FieldRole,
+ self.Color1PushButton)
self.Color2Label = QtGui.QLabel(self.BackgroundTab)
self.Color2Label.setObjectName(u'Color2Label')
- self.BackgroundLayout.setWidget(3, QtGui.QFormLayout.LabelRole, self.Color2Label)
+ self.BackgroundLayout.setWidget(3, QtGui.QFormLayout.LabelRole,
+ self.Color2Label)
self.Color2PushButton = QtGui.QPushButton(self.BackgroundTab)
self.Color2PushButton.setObjectName(u'Color2PushButton')
- self.BackgroundLayout.setWidget(3, QtGui.QFormLayout.FieldRole, self.Color2PushButton)
+ self.BackgroundLayout.setWidget(3, QtGui.QFormLayout.FieldRole,
+ self.Color2PushButton)
self.ImageLabel = QtGui.QLabel(self.BackgroundTab)
self.ImageLabel.setObjectName(u'ImageLabel')
- self.BackgroundLayout.setWidget(4, QtGui.QFormLayout.LabelRole, self.ImageLabel)
+ self.BackgroundLayout.setWidget(4, QtGui.QFormLayout.LabelRole,
+ self.ImageLabel)
self.GradientLabel = QtGui.QLabel(self.BackgroundTab)
self.GradientLabel.setObjectName(u'GradientLabel')
- self.BackgroundLayout.setWidget(6, QtGui.QFormLayout.LabelRole, self.GradientLabel)
+ self.BackgroundLayout.setWidget(6, QtGui.QFormLayout.LabelRole,
+ self.GradientLabel)
self.GradientComboBox = QtGui.QComboBox(self.BackgroundTab)
self.GradientComboBox.setObjectName(u'GradientComboBox')
self.GradientComboBox.addItem(QtCore.QString())
self.GradientComboBox.addItem(QtCore.QString())
self.GradientComboBox.addItem(QtCore.QString())
- self.BackgroundLayout.setWidget(6, QtGui.QFormLayout.FieldRole, self.GradientComboBox)
+ self.BackgroundLayout.setWidget(6, QtGui.QFormLayout.FieldRole,
+ self.GradientComboBox)
self.ImageFilenameWidget = QtGui.QWidget(self.BackgroundTab)
self.ImageFilenameWidget.setObjectName(u'ImageFilenameWidget')
self.horizontalLayout_2 = QtGui.QHBoxLayout(self.ImageFilenameWidget)
@@ -121,7 +132,8 @@
self.ImageToolButton.setIcon(icon1)
self.ImageToolButton.setObjectName(u'ImageToolButton')
self.horizontalLayout_2.addWidget(self.ImageToolButton)
- self.BackgroundLayout.setWidget(4, QtGui.QFormLayout.FieldRole, self.ImageFilenameWidget)
+ self.BackgroundLayout.setWidget(4, QtGui.QFormLayout.FieldRole,
+ self.ImageFilenameWidget)
self.ThemeTabWidget.addTab(self.BackgroundTab, u'')
self.FontMainTab = QtGui.QWidget()
self.FontMainTab.setObjectName(u'FontMainTab')
@@ -138,65 +150,88 @@
self.FontMainGroupBox = QtGui.QGroupBox(self.MainLeftWidget)
self.FontMainGroupBox.setObjectName(u'FontMainGroupBox')
self.MainFontLayout = QtGui.QFormLayout(self.FontMainGroupBox)
- self.MainFontLayout.setFormAlignment(QtCore.Qt.AlignLeading|QtCore.Qt.AlignLeft|QtCore.Qt.AlignVCenter)
+ self.MainFontLayout.setFormAlignment(QtCore.Qt.AlignLeading |
+ QtCore.Qt.AlignLeft | QtCore.Qt.AlignVCenter)
self.MainFontLayout.setMargin(8)
self.MainFontLayout.setSpacing(8)
self.MainFontLayout.setObjectName(u'MainFontLayout')
self.FontMainlabel = QtGui.QLabel(self.FontMainGroupBox)
self.FontMainlabel.setObjectName(u'FontMainlabel')
- self.MainFontLayout.setWidget(0, QtGui.QFormLayout.LabelRole, self.FontMainlabel)
+ self.MainFontLayout.setWidget(0, QtGui.QFormLayout.LabelRole,
+ self.FontMainlabel)
self.FontMainComboBox = QtGui.QFontComboBox(self.FontMainGroupBox)
self.FontMainComboBox.setObjectName(u'FontMainComboBox')
- self.MainFontLayout.setWidget(0, QtGui.QFormLayout.FieldRole, self.FontMainComboBox)
+ self.MainFontLayout.setWidget(0, QtGui.QFormLayout.FieldRole,
+ self.FontMainComboBox)
self.FontMainColorLabel = QtGui.QLabel(self.FontMainGroupBox)
self.FontMainColorLabel.setObjectName(u'FontMainColorLabel')
- self.MainFontLayout.setWidget(1, QtGui.QFormLayout.LabelRole, self.FontMainColorLabel)
+ self.MainFontLayout.setWidget(1, QtGui.QFormLayout.LabelRole,
+ self.FontMainColorLabel)
self.FontMainColorPushButton = QtGui.QPushButton(self.FontMainGroupBox)
self.FontMainColorPushButton.setObjectName(u'FontMainColorPushButton')
- self.MainFontLayout.setWidget(1, QtGui.QFormLayout.FieldRole, self.FontMainColorPushButton)
+ self.MainFontLayout.setWidget(1, QtGui.QFormLayout.FieldRole,
+ self.FontMainColorPushButton)
self.FontMainSize = QtGui.QLabel(self.FontMainGroupBox)
self.FontMainSize.setObjectName(u'FontMainSize')
- self.MainFontLayout.setWidget(2, QtGui.QFormLayout.LabelRole, self.FontMainSize)
+ self.MainFontLayout.setWidget(2, QtGui.QFormLayout.LabelRole,
+ self.FontMainSize)
self.FontMainSizeSpinBox = QtGui.QSpinBox(self.FontMainGroupBox)
- sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Fixed)
+ sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Minimum,
+ QtGui.QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
- sizePolicy.setHeightForWidth(self.FontMainSizeSpinBox.sizePolicy().hasHeightForWidth())
+ sizePolicy.setHeightForWidth(
+ self.FontMainSizeSpinBox.sizePolicy().hasHeightForWidth())
self.FontMainSizeSpinBox.setSizePolicy(sizePolicy)
self.FontMainSizeSpinBox.setMinimumSize(QtCore.QSize(70, 0))
self.FontMainSizeSpinBox.setProperty(u'value', QtCore.QVariant(16))
self.FontMainSizeSpinBox.setMaximum(999)
self.FontMainSizeSpinBox.setObjectName(u'FontMainSizeSpinBox')
- self.MainFontLayout.setWidget(2, QtGui.QFormLayout.FieldRole, self.FontMainSizeSpinBox)
+ self.MainFontLayout.setWidget(2, QtGui.QFormLayout.FieldRole,
+ self.FontMainSizeSpinBox)
self.FontMainWeightComboBox = QtGui.QComboBox(self.FontMainGroupBox)
- self.FontMainWeightComboBox.setObjectName("FontMainWeightComboBox")
- self.FontMainWeightComboBox.addItem(QtCore.QString())
- self.FontMainWeightComboBox.addItem(QtCore.QString())
- self.FontMainWeightComboBox.addItem(QtCore.QString())
- self.FontMainWeightComboBox.addItem(QtCore.QString())
- self.MainFontLayout.setWidget(3, QtGui.QFormLayout.FieldRole, self.FontMainWeightComboBox)
+ self.FontMainWeightComboBox.setObjectName(u'FontMainWeightComboBox')
+ self.FontMainWeightComboBox.addItem(QtCore.QString())
+ self.FontMainWeightComboBox.addItem(QtCore.QString())
+ self.FontMainWeightComboBox.addItem(QtCore.QString())
+ self.FontMainWeightComboBox.addItem(QtCore.QString())
+ self.MainFontLayout.setWidget(3, QtGui.QFormLayout.FieldRole,
+ self.FontMainWeightComboBox)
self.FontMainWeightLabel = QtGui.QLabel(self.FontMainGroupBox)
- self.FontMainWeightLabel.setObjectName("FontMainWeightLabel")
- self.MainFontLayout.setWidget(3, QtGui.QFormLayout.LabelRole, self.FontMainWeightLabel)
+ self.FontMainWeightLabel.setObjectName(u'FontMainWeightLabel')
+ self.MainFontLayout.setWidget(3, QtGui.QFormLayout.LabelRole,
+ self.FontMainWeightLabel)
self.MainLeftLayout.addWidget(self.FontMainGroupBox)
- self.FontMainWrapLineAdjustmentLabel = QtGui.QLabel(self.FontMainGroupBox)
- self.FontMainWrapLineAdjustmentLabel.setObjectName("FontMainWrapLineAdjustmentLabel")
- self.MainFontLayout.setWidget(4, QtGui.QFormLayout.LabelRole, self.FontMainWrapLineAdjustmentLabel)
- self.FontMainLineAdjustmentSpinBox = QtGui.QSpinBox(self.FontMainGroupBox)
- self.FontMainLineAdjustmentSpinBox.setObjectName("FontMainLineAdjustmentSpinBox")
+ self.FontMainWrapLineAdjustmentLabel = QtGui.QLabel(
+ self.FontMainGroupBox)
+ self.FontMainWrapLineAdjustmentLabel.setObjectName(
+ u'FontMainWrapLineAdjustmentLabel')
+ self.MainFontLayout.setWidget(4, QtGui.QFormLayout.LabelRole,
+ self.FontMainWrapLineAdjustmentLabel)
+ self.FontMainLineAdjustmentSpinBox = QtGui.QSpinBox(
+ self.FontMainGroupBox)
+ self.FontMainLineAdjustmentSpinBox.setObjectName(
+ u'FontMainLineAdjustmentSpinBox')
self.FontMainLineAdjustmentSpinBox.setMinimum(-99)
- self.MainFontLayout.setWidget(4, QtGui.QFormLayout.FieldRole, self.FontMainLineAdjustmentSpinBox)
+ self.MainFontLayout.setWidget(4, QtGui.QFormLayout.FieldRole,
+ self.FontMainLineAdjustmentSpinBox)
self.FontMainWrapIndentationLabel = QtGui.QLabel(self.FontMainGroupBox)
- self.FontMainWrapIndentationLabel.setObjectName("FontMainWrapIndentationLabel")
- self.MainFontLayout.setWidget(5, QtGui.QFormLayout.LabelRole, self.FontMainWrapIndentationLabel)
+ self.FontMainWrapIndentationLabel.setObjectName(
+ u'FontMainWrapIndentationLabel')
+ self.MainFontLayout.setWidget(5, QtGui.QFormLayout.LabelRole,
+ self.FontMainWrapIndentationLabel)
self.FontMainLineSpacingSpinBox = QtGui.QSpinBox(self.FontMainGroupBox)
- self.FontMainLineSpacingSpinBox.setObjectName("FontMainLineSpacingSpinBox")
+ self.FontMainLineSpacingSpinBox.setObjectName(
+ u'FontMainLineSpacingSpinBox')
self.FontMainLineSpacingSpinBox.setMaximum(10)
- self.MainFontLayout.setWidget(5, QtGui.QFormLayout.FieldRole, self.FontMainLineSpacingSpinBox)
+ self.MainFontLayout.setWidget(5, QtGui.QFormLayout.FieldRole,
+ self.FontMainLineSpacingSpinBox)
self.FontMainLinesPageLabel = QtGui.QLabel(self.FontMainGroupBox)
- self.FontMainLinesPageLabel.setObjectName("FontMainLinesPageLabel")
- self.MainFontLayout.setWidget(6, QtGui.QFormLayout.LabelRole, self.FontMainLinesPageLabel)
- spacerItem1 = QtGui.QSpacerItem(20, 40, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding)
+ self.FontMainLinesPageLabel.setObjectName(u'FontMainLinesPageLabel')
+ self.MainFontLayout.setWidget(6, QtGui.QFormLayout.LabelRole,
+ self.FontMainLinesPageLabel)
+ spacerItem1 = QtGui.QSpacerItem(20, 40, QtGui.QSizePolicy.Minimum,
+ QtGui.QSizePolicy.Expanding)
self.MainLeftLayout.addItem(spacerItem1)
self.FontMainLayout.addWidget(self.MainLeftWidget)
self.MainRightWidget = QtGui.QWidget(self.FontMainTab)
@@ -213,66 +248,86 @@
self.MainLocationLayout.setObjectName(u'MainLocationLayout')
self.DefaultLocationLabel = QtGui.QLabel(self.MainLocationGroupBox)
self.DefaultLocationLabel.setObjectName(u'DefaultLocationLabel')
- self.MainLocationLayout.setWidget(0, QtGui.QFormLayout.LabelRole, self.DefaultLocationLabel)
- self.FontMainDefaultCheckBox = QtGui.QCheckBox(self.MainLocationGroupBox)
+ self.MainLocationLayout.setWidget(0, QtGui.QFormLayout.LabelRole,
+ self.DefaultLocationLabel)
+ self.FontMainDefaultCheckBox = QtGui.QCheckBox(
+ self.MainLocationGroupBox)
self.FontMainDefaultCheckBox.setTristate(False)
self.FontMainDefaultCheckBox.setObjectName(u'FontMainDefaultCheckBox')
- self.MainLocationLayout.setWidget(0, QtGui.QFormLayout.FieldRole, self.FontMainDefaultCheckBox)
+ self.MainLocationLayout.setWidget(0, QtGui.QFormLayout.FieldRole,
+ self.FontMainDefaultCheckBox)
self.FontMainXLabel = QtGui.QLabel(self.MainLocationGroupBox)
self.FontMainXLabel.setObjectName(u'FontMainXLabel')
- self.MainLocationLayout.setWidget(1, QtGui.QFormLayout.LabelRole, self.FontMainXLabel)
+ self.MainLocationLayout.setWidget(1, QtGui.QFormLayout.LabelRole,
+ self.FontMainXLabel)
self.FontMainYLabel = QtGui.QLabel(self.MainLocationGroupBox)
self.FontMainYLabel.setObjectName(u'FontMainYLabel')
- self.MainLocationLayout.setWidget(2, QtGui.QFormLayout.LabelRole, self.FontMainYLabel)
+ self.MainLocationLayout.setWidget(2, QtGui.QFormLayout.LabelRole,
+ self.FontMainYLabel)
self.FontMainWidthLabel = QtGui.QLabel(self.MainLocationGroupBox)
self.FontMainWidthLabel.setObjectName(u'FontMainWidthLabel')
- self.MainLocationLayout.setWidget(3, QtGui.QFormLayout.LabelRole, self.FontMainWidthLabel)
+ self.MainLocationLayout.setWidget(3, QtGui.QFormLayout.LabelRole,
+ self.FontMainWidthLabel)
self.FontMainHeightLabel = QtGui.QLabel(self.MainLocationGroupBox)
self.FontMainHeightLabel.setObjectName(u'FontMainHeightLabel')
- self.MainLocationLayout.setWidget(4, QtGui.QFormLayout.LabelRole, self.FontMainHeightLabel)
+ self.MainLocationLayout.setWidget(4, QtGui.QFormLayout.LabelRole,
+ self.FontMainHeightLabel)
self.FontMainXSpinBox = QtGui.QSpinBox(self.MainLocationGroupBox)
- sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Fixed)
+ sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Minimum,
+ QtGui.QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
- sizePolicy.setHeightForWidth(self.FontMainXSpinBox.sizePolicy().hasHeightForWidth())
+ sizePolicy.setHeightForWidth(
+ self.FontMainXSpinBox.sizePolicy().hasHeightForWidth())
self.FontMainXSpinBox.setSizePolicy(sizePolicy)
self.FontMainXSpinBox.setMinimumSize(QtCore.QSize(78, 0))
self.FontMainXSpinBox.setProperty(u'value', QtCore.QVariant(0))
self.FontMainXSpinBox.setMaximum(9999)
self.FontMainXSpinBox.setObjectName(u'FontMainXSpinBox')
- self.MainLocationLayout.setWidget(1, QtGui.QFormLayout.FieldRole, self.FontMainXSpinBox)
+ self.MainLocationLayout.setWidget(1, QtGui.QFormLayout.FieldRole,
+ self.FontMainXSpinBox)
self.FontMainYSpinBox = QtGui.QSpinBox(self.MainLocationGroupBox)
- sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Fixed)
+ sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Minimum,
+ QtGui.QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
- sizePolicy.setHeightForWidth(self.FontMainYSpinBox.sizePolicy().hasHeightForWidth())
+ sizePolicy.setHeightForWidth(
+ self.FontMainYSpinBox.sizePolicy().hasHeightForWidth())
self.FontMainYSpinBox.setSizePolicy(sizePolicy)
self.FontMainYSpinBox.setMinimumSize(QtCore.QSize(78, 0))
self.FontMainYSpinBox.setMaximum(9999)
self.FontMainYSpinBox.setObjectName(u'FontMainYSpinBox')
- self.MainLocationLayout.setWidget(2, QtGui.QFormLayout.FieldRole, self.FontMainYSpinBox)
+ self.MainLocationLayout.setWidget(2, QtGui.QFormLayout.FieldRole,
+ self.FontMainYSpinBox)
self.FontMainWidthSpinBox = QtGui.QSpinBox(self.MainLocationGroupBox)
- sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Fixed)
+ sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Minimum,
+ QtGui.QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
- sizePolicy.setHeightForWidth(self.FontMainWidthSpinBox.sizePolicy().hasHeightForWidth())
+ sizePolicy.setHeightForWidth(
+ self.FontMainWidthSpinBox.sizePolicy().hasHeightForWidth())
self.FontMainWidthSpinBox.setSizePolicy(sizePolicy)
self.FontMainWidthSpinBox.setMinimumSize(QtCore.QSize(78, 0))
self.FontMainWidthSpinBox.setMaximum(9999)
self.FontMainWidthSpinBox.setObjectName(u'FontMainWidthSpinBox')
- self.MainLocationLayout.setWidget(3, QtGui.QFormLayout.FieldRole, self.FontMainWidthSpinBox)
+ self.MainLocationLayout.setWidget(3, QtGui.QFormLayout.FieldRole,
+ self.FontMainWidthSpinBox)
self.FontMainHeightSpinBox = QtGui.QSpinBox(self.MainLocationGroupBox)
- sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Fixed)
+ sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Minimum,
+ QtGui.QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
- sizePolicy.setHeightForWidth(self.FontMainHeightSpinBox.sizePolicy().hasHeightForWidth())
+ sizePolicy.setHeightForWidth(
+ self.FontMainHeightSpinBox.sizePolicy().hasHeightForWidth())
self.FontMainHeightSpinBox.setSizePolicy(sizePolicy)
self.FontMainHeightSpinBox.setMinimumSize(QtCore.QSize(78, 0))
self.FontMainHeightSpinBox.setMaximum(9999)
self.FontMainHeightSpinBox.setObjectName(u'FontMainHeightSpinBox')
- self.MainLocationLayout.setWidget(4, QtGui.QFormLayout.FieldRole, self.FontMainHeightSpinBox)
+ self.MainLocationLayout.setWidget(4, QtGui.QFormLayout.FieldRole,
+ self.FontMainHeightSpinBox)
self.MainRightLayout.addWidget(self.MainLocationGroupBox)
- spacerItem2 = QtGui.QSpacerItem(20, 40, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding)
+ spacerItem2 = QtGui.QSpacerItem(20, 40, QtGui.QSizePolicy.Minimum,
+ QtGui.QSizePolicy.Expanding)
self.MainRightLayout.addItem(spacerItem2)
self.FontMainLayout.addWidget(self.MainRightWidget)
self.ThemeTabWidget.addTab(self.FontMainTab, u'')
@@ -291,49 +346,64 @@
self.FooterFontGroupBox = QtGui.QGroupBox(self.FooterLeftWidget)
self.FooterFontGroupBox.setObjectName(u'FooterFontGroupBox')
self.FooterFontLayout = QtGui.QFormLayout(self.FooterFontGroupBox)
- self.FooterFontLayout.setFieldGrowthPolicy(QtGui.QFormLayout.ExpandingFieldsGrow)
- self.FooterFontLayout.setFormAlignment(QtCore.Qt.AlignLeading|QtCore.Qt.AlignLeft|QtCore.Qt.AlignVCenter)
+ self.FooterFontLayout.setFieldGrowthPolicy(
+ QtGui.QFormLayout.ExpandingFieldsGrow)
+ self.FooterFontLayout.setFormAlignment(QtCore.Qt.AlignLeading |
+ QtCore.Qt.AlignLeft | QtCore.Qt.AlignVCenter)
self.FooterFontLayout.setMargin(8)
self.FooterFontLayout.setSpacing(8)
self.FooterFontLayout.setObjectName(u'FooterFontLayout')
self.FontFooterLabel = QtGui.QLabel(self.FooterFontGroupBox)
self.FontFooterLabel.setObjectName(u'FontFooterLabel')
- self.FooterFontLayout.setWidget(0, QtGui.QFormLayout.LabelRole, self.FontFooterLabel)
+ self.FooterFontLayout.setWidget(0, QtGui.QFormLayout.LabelRole,
+ self.FontFooterLabel)
self.FontFooterComboBox = QtGui.QFontComboBox(self.FooterFontGroupBox)
self.FontFooterComboBox.setObjectName(u'FontFooterComboBox')
- self.FooterFontLayout.setWidget(0, QtGui.QFormLayout.FieldRole, self.FontFooterComboBox)
+ self.FooterFontLayout.setWidget(0, QtGui.QFormLayout.FieldRole,
+ self.FontFooterComboBox)
self.FontFooterColorLabel = QtGui.QLabel(self.FooterFontGroupBox)
self.FontFooterColorLabel.setObjectName(u'FontFooterColorLabel')
- self.FooterFontLayout.setWidget(1, QtGui.QFormLayout.LabelRole, self.FontFooterColorLabel)
- self.FontFooterColorPushButton = QtGui.QPushButton(self.FooterFontGroupBox)
- self.FontFooterColorPushButton.setObjectName(u'FontFooterColorPushButton')
- self.FooterFontLayout.setWidget(1, QtGui.QFormLayout.FieldRole, self.FontFooterColorPushButton)
+ self.FooterFontLayout.setWidget(1, QtGui.QFormLayout.LabelRole,
+ self.FontFooterColorLabel)
+ self.FontFooterColorPushButton = QtGui.QPushButton(
+ self.FooterFontGroupBox)
+ self.FontFooterColorPushButton.setObjectName(
+ u'FontFooterColorPushButton')
+ self.FooterFontLayout.setWidget(1, QtGui.QFormLayout.FieldRole,
+ self.FontFooterColorPushButton)
self.FontFooterSizeLabel = QtGui.QLabel(self.FooterFontGroupBox)
self.FontFooterSizeLabel.setObjectName(u'FontFooterSizeLabel')
- self.FooterFontLayout.setWidget(2, QtGui.QFormLayout.LabelRole, self.FontFooterSizeLabel)
+ self.FooterFontLayout.setWidget(2, QtGui.QFormLayout.LabelRole,
+ self.FontFooterSizeLabel)
self.FontFooterSizeSpinBox = QtGui.QSpinBox(self.FooterFontGroupBox)
- sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Fixed)
+ sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Minimum,
+ QtGui.QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
- sizePolicy.setHeightForWidth(self.FontFooterSizeSpinBox.sizePolicy().hasHeightForWidth())
+ sizePolicy.setHeightForWidth(
+ self.FontFooterSizeSpinBox.sizePolicy().hasHeightForWidth())
self.FontFooterSizeSpinBox.setSizePolicy(sizePolicy)
self.FontFooterSizeSpinBox.setMinimumSize(QtCore.QSize(70, 0))
self.FontFooterSizeSpinBox.setProperty(u'value', QtCore.QVariant(10))
self.FontFooterSizeSpinBox.setMaximum(999)
self.FontFooterSizeSpinBox.setObjectName(u'FontFooterSizeSpinBox')
- self.FooterFontLayout.setWidget(2, QtGui.QFormLayout.FieldRole, self.FontFooterSizeSpinBox)
+ self.FooterFontLayout.setWidget(2, QtGui.QFormLayout.FieldRole,
+ self.FontFooterSizeSpinBox)
self.FontFooterWeightComboBox = QtGui.QComboBox(self.FooterFontGroupBox)
- self.FontFooterWeightComboBox.setObjectName("FontFooterWeightComboBox")
- self.FontFooterWeightComboBox.addItem(QtCore.QString())
- self.FontFooterWeightComboBox.addItem(QtCore.QString())
- self.FontFooterWeightComboBox.addItem(QtCore.QString())
- self.FontFooterWeightComboBox.addItem(QtCore.QString())
- self.FooterFontLayout.setWidget(3, QtGui.QFormLayout.FieldRole, self.FontFooterWeightComboBox)
+ self.FontFooterWeightComboBox.setObjectName(u'FontFooterWeightComboBox')
+ self.FontFooterWeightComboBox.addItem(QtCore.QString())
+ self.FontFooterWeightComboBox.addItem(QtCore.QString())
+ self.FontFooterWeightComboBox.addItem(QtCore.QString())
+ self.FontFooterWeightComboBox.addItem(QtCore.QString())
+ self.FooterFontLayout.setWidget(3, QtGui.QFormLayout.FieldRole,
+ self.FontFooterWeightComboBox)
self.FontFooterWeightLabel = QtGui.QLabel(self.FooterFontGroupBox)
- self.FontFooterWeightLabel.setObjectName("FontFooterWeightLabel")
- self.FooterFontLayout.setWidget(3, QtGui.QFormLayout.LabelRole, self.FontFooterWeightLabel)
+ self.FontFooterWeightLabel.setObjectName(u'FontFooterWeightLabel')
+ self.FooterFontLayout.setWidget(3, QtGui.QFormLayout.LabelRole,
+ self.FontFooterWeightLabel)
self.FooterLeftLayout.addWidget(self.FooterFontGroupBox)
- spacerItem3 = QtGui.QSpacerItem(20, 40, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding)
+ spacerItem3 = QtGui.QSpacerItem(20, 40, QtGui.QSizePolicy.Minimum,
+ QtGui.QSizePolicy.Expanding)
self.FooterLeftLayout.addItem(spacerItem3)
self.FontFooterLayout.addWidget(self.FooterLeftWidget)
self.FooterRightWidget = QtGui.QWidget(self.FontFooterTab)
@@ -344,65 +414,87 @@
self.FooterRightLayout.setObjectName(u'FooterRightLayout')
self.LocationFooterGroupBox = QtGui.QGroupBox(self.FooterRightWidget)
self.LocationFooterGroupBox.setObjectName(u'LocationFooterGroupBox')
- self.LocationFooterLayout = QtGui.QFormLayout(self.LocationFooterGroupBox)
- self.LocationFooterLayout.setFieldGrowthPolicy(QtGui.QFormLayout.ExpandingFieldsGrow)
- self.LocationFooterLayout.setFormAlignment(QtCore.Qt.AlignLeading|QtCore.Qt.AlignLeft|QtCore.Qt.AlignVCenter)
+ self.LocationFooterLayout = QtGui.QFormLayout(
+ self.LocationFooterGroupBox)
+ self.LocationFooterLayout.setFieldGrowthPolicy(
+ QtGui.QFormLayout.ExpandingFieldsGrow)
+ self.LocationFooterLayout.setFormAlignment(QtCore.Qt.AlignLeading |
+ QtCore.Qt.AlignLeft | QtCore.Qt.AlignVCenter)
self.LocationFooterLayout.setMargin(8)
self.LocationFooterLayout.setSpacing(8)
self.LocationFooterLayout.setObjectName(u'LocationFooterLayout')
self.FontFooterDefaultLabel = QtGui.QLabel(self.LocationFooterGroupBox)
self.FontFooterDefaultLabel.setObjectName(u'FontFooterDefaultLabel')
- self.LocationFooterLayout.setWidget(0, QtGui.QFormLayout.LabelRole, self.FontFooterDefaultLabel)
- self.FontFooterDefaultCheckBox = QtGui.QCheckBox(self.LocationFooterGroupBox)
+ self.LocationFooterLayout.setWidget(0, QtGui.QFormLayout.LabelRole,
+ self.FontFooterDefaultLabel)
+ self.FontFooterDefaultCheckBox = QtGui.QCheckBox(
+ self.LocationFooterGroupBox)
self.FontFooterDefaultCheckBox.setTristate(False)
- self.FontFooterDefaultCheckBox.setObjectName(u'FontFooterDefaultCheckBox')
- self.LocationFooterLayout.setWidget(0, QtGui.QFormLayout.FieldRole, self.FontFooterDefaultCheckBox)
+ self.FontFooterDefaultCheckBox.setObjectName(
+ u'FontFooterDefaultCheckBox')
+ self.LocationFooterLayout.setWidget(0, QtGui.QFormLayout.FieldRole,
+ self.FontFooterDefaultCheckBox)
self.FontFooterXLabel = QtGui.QLabel(self.LocationFooterGroupBox)
self.FontFooterXLabel.setObjectName(u'FontFooterXLabel')
- self.LocationFooterLayout.setWidget(1, QtGui.QFormLayout.LabelRole, self.FontFooterXLabel)
+ self.LocationFooterLayout.setWidget(1, QtGui.QFormLayout.LabelRole,
+ self.FontFooterXLabel)
self.FontFooterYLabel = QtGui.QLabel(self.LocationFooterGroupBox)
self.FontFooterYLabel.setObjectName(u'FontFooterYLabel')
- self.LocationFooterLayout.setWidget(2, QtGui.QFormLayout.LabelRole, self.FontFooterYLabel)
+ self.LocationFooterLayout.setWidget(2, QtGui.QFormLayout.LabelRole,
+ self.FontFooterYLabel)
self.FontFooterWidthLabel = QtGui.QLabel(self.LocationFooterGroupBox)
self.FontFooterWidthLabel.setObjectName(u'FontFooterWidthLabel')
- self.LocationFooterLayout.setWidget(3, QtGui.QFormLayout.LabelRole, self.FontFooterWidthLabel)
+ self.LocationFooterLayout.setWidget(3, QtGui.QFormLayout.LabelRole,
+ self.FontFooterWidthLabel)
self.FontFooterHeightLabel = QtGui.QLabel(self.LocationFooterGroupBox)
self.FontFooterHeightLabel.setObjectName(u'FontFooterHeightLabel')
- self.LocationFooterLayout.setWidget(4, QtGui.QFormLayout.LabelRole, self.FontFooterHeightLabel)
+ self.LocationFooterLayout.setWidget(4, QtGui.QFormLayout.LabelRole,
+ self.FontFooterHeightLabel)
self.FontFooterXSpinBox = QtGui.QSpinBox(self.LocationFooterGroupBox)
- sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Fixed)
+ sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Minimum,
+ QtGui.QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
- sizePolicy.setHeightForWidth(self.FontFooterXSpinBox.sizePolicy().hasHeightForWidth())
+ sizePolicy.setHeightForWidth(
+ self.FontFooterXSpinBox.sizePolicy().hasHeightForWidth())
self.FontFooterXSpinBox.setSizePolicy(sizePolicy)
self.FontFooterXSpinBox.setMinimumSize(QtCore.QSize(78, 0))
self.FontFooterXSpinBox.setProperty(u'value', QtCore.QVariant(0))
self.FontFooterXSpinBox.setMaximum(9999)
self.FontFooterXSpinBox.setObjectName(u'FontFooterXSpinBox')
- self.LocationFooterLayout.setWidget(1, QtGui.QFormLayout.FieldRole, self.FontFooterXSpinBox)
+ self.LocationFooterLayout.setWidget(1, QtGui.QFormLayout.FieldRole,
+ self.FontFooterXSpinBox)
self.FontFooterYSpinBox = QtGui.QSpinBox(self.LocationFooterGroupBox)
- sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Fixed)
+ sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Minimum,
+ QtGui.QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
- sizePolicy.setHeightForWidth(self.FontFooterYSpinBox.sizePolicy().hasHeightForWidth())
+ sizePolicy.setHeightForWidth(
+ self.FontFooterYSpinBox.sizePolicy().hasHeightForWidth())
self.FontFooterYSpinBox.setSizePolicy(sizePolicy)
self.FontFooterYSpinBox.setMinimumSize(QtCore.QSize(78, 0))
self.FontFooterYSpinBox.setProperty(u'value', QtCore.QVariant(0))
self.FontFooterYSpinBox.setMaximum(9999)
self.FontFooterYSpinBox.setObjectName(u'FontFooterYSpinBox')
- self.LocationFooterLayout.setWidget(2, QtGui.QFormLayout.FieldRole, self.FontFooterYSpinBox)
- self.FontFooterWidthSpinBox = QtGui.QSpinBox(self.LocationFooterGroupBox)
+ self.LocationFooterLayout.setWidget(2, QtGui.QFormLayout.FieldRole,
+ self.FontFooterYSpinBox)
+ self.FontFooterWidthSpinBox = QtGui.QSpinBox(
+ self.LocationFooterGroupBox)
self.FontFooterWidthSpinBox.setMinimumSize(QtCore.QSize(78, 0))
self.FontFooterWidthSpinBox.setMaximum(9999)
self.FontFooterWidthSpinBox.setObjectName(u'FontFooterWidthSpinBox')
- self.LocationFooterLayout.setWidget(3, QtGui.QFormLayout.FieldRole, self.FontFooterWidthSpinBox)
- self.FontFooterHeightSpinBox = QtGui.QSpinBox(self.LocationFooterGroupBox)
+ self.LocationFooterLayout.setWidget(3, QtGui.QFormLayout.FieldRole,
+ self.FontFooterWidthSpinBox)
+ self.FontFooterHeightSpinBox = QtGui.QSpinBox(
+ self.LocationFooterGroupBox)
self.FontFooterHeightSpinBox.setMinimumSize(QtCore.QSize(78, 0))
self.FontFooterHeightSpinBox.setMaximum(9999)
self.FontFooterHeightSpinBox.setObjectName(u'FontFooterHeightSpinBox')
- self.LocationFooterLayout.setWidget(4, QtGui.QFormLayout.FieldRole, self.FontFooterHeightSpinBox)
+ self.LocationFooterLayout.setWidget(4, QtGui.QFormLayout.FieldRole,
+ self.FontFooterHeightSpinBox)
self.FooterRightLayout.addWidget(self.LocationFooterGroupBox)
- spacerItem4 = QtGui.QSpacerItem(20, 40, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding)
+ spacerItem4 = QtGui.QSpacerItem(20, 40, QtGui.QSizePolicy.Minimum,
+ QtGui.QSizePolicy.Expanding)
self.FooterRightLayout.addItem(spacerItem4)
self.FontFooterLayout.addWidget(self.FooterRightWidget)
self.ThemeTabWidget.addTab(self.FontFooterTab, u'')
@@ -432,23 +524,29 @@
self.OutlineLayout.setObjectName(u'OutlineLayout')
self.OutlineCheckBox = QtGui.QCheckBox(self.OutlineWidget)
self.OutlineCheckBox.setObjectName(u'OutlineCheckBox')
- self.OutlineLayout.setWidget(0, QtGui.QFormLayout.FieldRole, self.OutlineCheckBox)
+ self.OutlineLayout.setWidget(0, QtGui.QFormLayout.FieldRole,
+ self.OutlineCheckBox)
self.OutlineSpinBox = QtGui.QSpinBox(self.OutlineWidget)
- self.OutlineSpinBox.setObjectName("OutlineSpinBox")
+ self.OutlineSpinBox.setObjectName(u'OutlineSpinBox')
self.OutlineSpinBox.setMaximum(10)
- self.OutlineLayout.setWidget(1, QtGui.QFormLayout.FieldRole, self.OutlineSpinBox)
+ self.OutlineLayout.setWidget(1, QtGui.QFormLayout.FieldRole,
+ self.OutlineSpinBox)
self.OutlineSpinBoxLabel = QtGui.QLabel(self.OutlineWidget)
self.OutlineSpinBoxLabel.setObjectName(u'OutlineSpinBoxLabel')
- self.OutlineLayout.setWidget(1, QtGui.QFormLayout.LabelRole, self.OutlineSpinBoxLabel)
+ self.OutlineLayout.setWidget(1, QtGui.QFormLayout.LabelRole,
+ self.OutlineSpinBoxLabel)
self.OutlineColorLabel = QtGui.QLabel(self.OutlineWidget)
self.OutlineColorLabel.setObjectName(u'OutlineColorLabel')
- self.OutlineLayout.setWidget(2, QtGui.QFormLayout.LabelRole, self.OutlineColorLabel)
+ self.OutlineLayout.setWidget(2, QtGui.QFormLayout.LabelRole,
+ self.OutlineColorLabel)
self.OutlineColorPushButton = QtGui.QPushButton(self.OutlineWidget)
self.OutlineColorPushButton.setObjectName(u'OutlineColorPushButton')
- self.OutlineLayout.setWidget(2, QtGui.QFormLayout.FieldRole, self.OutlineColorPushButton)
+ self.OutlineLayout.setWidget(2, QtGui.QFormLayout.FieldRole,
+ self.OutlineColorPushButton)
self.OutlineEnabledLabel = QtGui.QLabel(self.OutlineWidget)
self.OutlineEnabledLabel.setObjectName(u'OutlineEnabledLabel')
- self.OutlineLayout.setWidget(0, QtGui.QFormLayout.LabelRole, self.OutlineEnabledLabel)
+ self.OutlineLayout.setWidget(0, QtGui.QFormLayout.LabelRole,
+ self.OutlineEnabledLabel)
self.verticalLayout.addWidget(self.OutlineWidget)
self.OptionsLeftLayout.addWidget(self.OutlineGroupBox)
self.ShadowGroupBox = QtGui.QGroupBox(self.OptionsLeftWidget)
@@ -465,26 +563,33 @@
self.ShadowLayout.setObjectName(u'ShadowLayout')
self.ShadowCheckBox = QtGui.QCheckBox(self.ShadowWidget)
self.ShadowCheckBox.setObjectName(u'ShadowCheckBox')
- self.ShadowLayout.setWidget(0, QtGui.QFormLayout.FieldRole, self.ShadowCheckBox)
+ self.ShadowLayout.setWidget(0, QtGui.QFormLayout.FieldRole,
+ self.ShadowCheckBox)
self.ShadowSpinBox = QtGui.QSpinBox(self.OutlineWidget)
- self.ShadowSpinBox.setObjectName("ShadowSpinBox")
+ self.ShadowSpinBox.setObjectName(u'ShadowSpinBox')
self.ShadowSpinBox.setMaximum(10)
- self.ShadowLayout.setWidget(1, QtGui.QFormLayout.FieldRole, self.ShadowSpinBox)
+ self.ShadowLayout.setWidget(1, QtGui.QFormLayout.FieldRole,
+ self.ShadowSpinBox)
self.ShadowSpinBoxLabel = QtGui.QLabel(self.OutlineWidget)
self.ShadowSpinBoxLabel.setObjectName(u'ShadowSpinBoxLabel')
- self.ShadowLayout.setWidget(1, QtGui.QFormLayout.LabelRole, self.ShadowSpinBoxLabel)
+ self.ShadowLayout.setWidget(1, QtGui.QFormLayout.LabelRole,
+ self.ShadowSpinBoxLabel)
self.ShadowColorLabel = QtGui.QLabel(self.ShadowWidget)
self.ShadowColorLabel.setObjectName(u'ShadowColorLabel')
- self.ShadowLayout.setWidget(2, QtGui.QFormLayout.LabelRole, self.ShadowColorLabel)
+ self.ShadowLayout.setWidget(2, QtGui.QFormLayout.LabelRole,
+ self.ShadowColorLabel)
self.ShadowColorPushButton = QtGui.QPushButton(self.ShadowWidget)
self.ShadowColorPushButton.setObjectName(u'ShadowColorPushButton')
- self.ShadowLayout.setWidget(2, QtGui.QFormLayout.FieldRole, self.ShadowColorPushButton)
+ self.ShadowLayout.setWidget(2, QtGui.QFormLayout.FieldRole,
+ self.ShadowColorPushButton)
self.ShadowEnabledLabel = QtGui.QLabel(self.ShadowWidget)
self.ShadowEnabledLabel.setObjectName(u'ShadowEnabledLabel')
- self.ShadowLayout.setWidget(0, QtGui.QFormLayout.LabelRole, self.ShadowEnabledLabel)
+ self.ShadowLayout.setWidget(0, QtGui.QFormLayout.LabelRole,
+ self.ShadowEnabledLabel)
self.verticalLayout.addWidget(self.ShadowWidget)
self.OptionsLeftLayout.addWidget(self.ShadowGroupBox)
- spacerItem5 = QtGui.QSpacerItem(20, 40, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding)
+ spacerItem5 = QtGui.QSpacerItem(20, 40, QtGui.QSizePolicy.Minimum,
+ QtGui.QSizePolicy.Expanding)
self.OptionsLeftLayout.addItem(spacerItem5)
self.OtherOptionsLayout.addWidget(self.OptionsLeftWidget)
self.OptionsRightWidget = QtGui.QWidget(self.OtherOptionsTab)
@@ -520,14 +625,18 @@
self.TransitionGroupBox.setObjectName(u'TransitionGroupBox')
self.gridLayout_5 = QtGui.QGridLayout(self.TransitionGroupBox)
self.gridLayout_5.setObjectName(u'gridLayout_5')
- self.SlideTransitionCheckedBoxLabel = QtGui.QLabel(self.TransitionGroupBox)
- self.SlideTransitionCheckedBoxLabel.setObjectName(u'SlideTransitionCheckedBoxLabel')
- self.gridLayout_5.addWidget(self.SlideTransitionCheckedBoxLabel, 0, 0, 1, 1)
+ self.SlideTransitionCheckedBoxLabel = QtGui.QLabel(
+ self.TransitionGroupBox)
+ self.SlideTransitionCheckedBoxLabel.setObjectName(
+ u'SlideTransitionCheckedBoxLabel')
+ self.gridLayout_5.addWidget(
+ self.SlideTransitionCheckedBoxLabel, 0, 0, 1, 1)
self.SlideTransitionCheckedBox = QtGui.QCheckBox(self.AlignmentGroupBox)
self.SlideTransitionCheckedBox.setTristate(False)
self.gridLayout_5.addWidget(self.SlideTransitionCheckedBox, 0, 1, 1, 1)
self.OptionsRightLayout.addWidget(self.TransitionGroupBox)
- spacerItem6 = QtGui.QSpacerItem(20, 40, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding)
+ spacerItem6 = QtGui.QSpacerItem(20, 40, QtGui.QSizePolicy.Minimum,
+ QtGui.QSizePolicy.Expanding)
self.OptionsRightLayout.addItem(spacerItem6)
self.OtherOptionsLayout.addWidget(self.OptionsRightWidget)
self.ThemeTabWidget.addTab(self.OtherOptionsTab, u'')
@@ -539,13 +648,16 @@
self.ThemePreviewLayout.setSpacing(8)
self.ThemePreviewLayout.setMargin(8)
self.ThemePreviewLayout.setObjectName(u'ThemePreviewLayout')
- spacerItem7 = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Expanding)
+ spacerItem7 = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding,
+ QtGui.QSizePolicy.Expanding)
self.ThemePreviewLayout.addItem(spacerItem7)
self.ThemePreview = QtGui.QLabel(self.PreviewGroupBox)
- sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed)
+ sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed,
+ QtGui.QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
- sizePolicy.setHeightForWidth(self.ThemePreview.sizePolicy().hasHeightForWidth())
+ sizePolicy.setHeightForWidth(
+ self.ThemePreview.sizePolicy().hasHeightForWidth())
self.ThemePreview.setSizePolicy(sizePolicy)
self.ThemePreview.setMaximumSize(QtCore.QSize(300, 225))
self.ThemePreview.setFrameShape(QtGui.QFrame.WinPanel)
@@ -554,88 +666,142 @@
self.ThemePreview.setScaledContents(True)
self.ThemePreview.setObjectName(u'ThemePreview')
self.ThemePreviewLayout.addWidget(self.ThemePreview)
- spacerItem8 = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Expanding)
+ spacerItem8 = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding,
+ QtGui.QSizePolicy.Expanding)
self.ThemePreviewLayout.addItem(spacerItem8)
self.AmendThemeLayout.addWidget(self.PreviewGroupBox)
self.ThemeButtonBox = QtGui.QDialogButtonBox(AmendThemeDialog)
- self.ThemeButtonBox.setStandardButtons(QtGui.QDialogButtonBox.Cancel|QtGui.QDialogButtonBox.Ok)
+ self.ThemeButtonBox.setStandardButtons(
+ QtGui.QDialogButtonBox.Cancel | QtGui.QDialogButtonBox.Ok)
self.ThemeButtonBox.setObjectName(u'ThemeButtonBox')
self.AmendThemeLayout.addWidget(self.ThemeButtonBox)
self.retranslateUi(AmendThemeDialog)
self.ThemeTabWidget.setCurrentIndex(0)
- QtCore.QObject.connect(self.ThemeButtonBox, QtCore.SIGNAL(u'accepted()'), AmendThemeDialog.accept)
- QtCore.QObject.connect(self.ThemeButtonBox, QtCore.SIGNAL(u'rejected()'), AmendThemeDialog.reject)
+ QtCore.QObject.connect(self.ThemeButtonBox,
+ QtCore.SIGNAL(u'accepted()'), AmendThemeDialog.accept)
+ QtCore.QObject.connect(self.ThemeButtonBox,
+ QtCore.SIGNAL(u'rejected()'), AmendThemeDialog.reject)
QtCore.QMetaObject.connectSlotsByName(AmendThemeDialog)
AmendThemeDialog.setTabOrder(self.ThemeButtonBox, self.ThemeNameEdit)
AmendThemeDialog.setTabOrder(self.ThemeNameEdit, self.ThemeTabWidget)
- AmendThemeDialog.setTabOrder(self.ThemeTabWidget, self.BackgroundComboBox)
- AmendThemeDialog.setTabOrder(self.BackgroundComboBox, self.BackgroundTypeComboBox)
- AmendThemeDialog.setTabOrder(self.BackgroundTypeComboBox, self.Color1PushButton)
- AmendThemeDialog.setTabOrder(self.Color1PushButton, self.Color2PushButton)
+ AmendThemeDialog.setTabOrder(self.ThemeTabWidget,
+ self.BackgroundComboBox)
+ AmendThemeDialog.setTabOrder(self.BackgroundComboBox,
+ self.BackgroundTypeComboBox)
+ AmendThemeDialog.setTabOrder(self.BackgroundTypeComboBox,
+ self.Color1PushButton)
+ AmendThemeDialog.setTabOrder(self.Color1PushButton,
+ self.Color2PushButton)
AmendThemeDialog.setTabOrder(self.Color2PushButton, self.ImageLineEdit)
AmendThemeDialog.setTabOrder(self.ImageLineEdit, self.ImageToolButton)
- AmendThemeDialog.setTabOrder(self.ImageToolButton, self.GradientComboBox)
- AmendThemeDialog.setTabOrder(self.GradientComboBox, self.FontMainComboBox)
- AmendThemeDialog.setTabOrder(self.FontMainComboBox, self.FontMainColorPushButton)
- AmendThemeDialog.setTabOrder(self.FontMainColorPushButton, self.FontMainSizeSpinBox)
- AmendThemeDialog.setTabOrder(self.FontMainSizeSpinBox, self.FontMainWeightComboBox)
- AmendThemeDialog.setTabOrder(self.FontMainWeightComboBox, self.FontMainLineSpacingSpinBox)
- AmendThemeDialog.setTabOrder(self.FontMainLineSpacingSpinBox, self.FontMainDefaultCheckBox)
- AmendThemeDialog.setTabOrder(self.FontMainDefaultCheckBox, self.FontMainXSpinBox)
- AmendThemeDialog.setTabOrder(self.FontMainXSpinBox, self.FontMainYSpinBox)
- AmendThemeDialog.setTabOrder(self.FontMainYSpinBox, self.FontMainWidthSpinBox)
- AmendThemeDialog.setTabOrder(self.FontMainWidthSpinBox, self.FontMainHeightSpinBox)
- AmendThemeDialog.setTabOrder(self.FontMainHeightSpinBox, self.FontFooterComboBox)
- AmendThemeDialog.setTabOrder(self.FontFooterComboBox, self.FontFooterColorPushButton)
- AmendThemeDialog.setTabOrder(self.FontFooterColorPushButton, self.FontFooterSizeSpinBox)
- AmendThemeDialog.setTabOrder(self.FontFooterSizeSpinBox, self.FontFooterWeightComboBox)
- AmendThemeDialog.setTabOrder(self.FontFooterWeightComboBox, self.FontFooterDefaultCheckBox)
- AmendThemeDialog.setTabOrder(self.FontFooterDefaultCheckBox, self.FontFooterXSpinBox)
- AmendThemeDialog.setTabOrder(self.FontFooterXSpinBox, self.FontFooterYSpinBox)
- AmendThemeDialog.setTabOrder(self.FontFooterYSpinBox, self.FontFooterWidthSpinBox)
- AmendThemeDialog.setTabOrder(self.FontFooterWidthSpinBox, self.FontFooterHeightSpinBox)
- AmendThemeDialog.setTabOrder(self.FontFooterHeightSpinBox, self.OutlineCheckBox)
- AmendThemeDialog.setTabOrder(self.OutlineCheckBox, self.OutlineColorPushButton)
- AmendThemeDialog.setTabOrder(self.OutlineColorPushButton, self.ShadowCheckBox)
- AmendThemeDialog.setTabOrder(self.ShadowCheckBox, self.ShadowColorPushButton)
- AmendThemeDialog.setTabOrder(self.ShadowColorPushButton, self.HorizontalComboBox)
- AmendThemeDialog.setTabOrder(self.HorizontalComboBox, self.VerticalComboBox)
+ AmendThemeDialog.setTabOrder(self.ImageToolButton,
+ self.GradientComboBox)
+ AmendThemeDialog.setTabOrder(self.GradientComboBox,
+ self.FontMainComboBox)
+ AmendThemeDialog.setTabOrder(self.FontMainComboBox,
+ self.FontMainColorPushButton)
+ AmendThemeDialog.setTabOrder(self.FontMainColorPushButton,
+ self.FontMainSizeSpinBox)
+ AmendThemeDialog.setTabOrder(self.FontMainSizeSpinBox,
+ self.FontMainWeightComboBox)
+ AmendThemeDialog.setTabOrder(self.FontMainWeightComboBox,
+ self.FontMainLineSpacingSpinBox)
+ AmendThemeDialog.setTabOrder(self.FontMainLineSpacingSpinBox,
+ self.FontMainDefaultCheckBox)
+ AmendThemeDialog.setTabOrder(self.FontMainDefaultCheckBox,
+ self.FontMainXSpinBox)
+ AmendThemeDialog.setTabOrder(self.FontMainXSpinBox,
+ self.FontMainYSpinBox)
+ AmendThemeDialog.setTabOrder(self.FontMainYSpinBox,
+ self.FontMainWidthSpinBox)
+ AmendThemeDialog.setTabOrder(self.FontMainWidthSpinBox,
+ self.FontMainHeightSpinBox)
+ AmendThemeDialog.setTabOrder(self.FontMainHeightSpinBox,
+ self.FontFooterComboBox)
+ AmendThemeDialog.setTabOrder(self.FontFooterComboBox,
+ self.FontFooterColorPushButton)
+ AmendThemeDialog.setTabOrder(self.FontFooterColorPushButton,
+ self.FontFooterSizeSpinBox)
+ AmendThemeDialog.setTabOrder(self.FontFooterSizeSpinBox,
+ self.FontFooterWeightComboBox)
+ AmendThemeDialog.setTabOrder(self.FontFooterWeightComboBox,
+ self.FontFooterDefaultCheckBox)
+ AmendThemeDialog.setTabOrder(self.FontFooterDefaultCheckBox,
+ self.FontFooterXSpinBox)
+ AmendThemeDialog.setTabOrder(self.FontFooterXSpinBox,
+ self.FontFooterYSpinBox)
+ AmendThemeDialog.setTabOrder(self.FontFooterYSpinBox,
+ self.FontFooterWidthSpinBox)
+ AmendThemeDialog.setTabOrder(self.FontFooterWidthSpinBox,
+ self.FontFooterHeightSpinBox)
+ AmendThemeDialog.setTabOrder(self.FontFooterHeightSpinBox,
+ self.OutlineCheckBox)
+ AmendThemeDialog.setTabOrder(self.OutlineCheckBox,
+ self.OutlineColorPushButton)
+ AmendThemeDialog.setTabOrder(self.OutlineColorPushButton,
+ self.ShadowCheckBox)
+ AmendThemeDialog.setTabOrder(self.ShadowCheckBox,
+ self.ShadowColorPushButton)
+ AmendThemeDialog.setTabOrder(self.ShadowColorPushButton,
+ self.HorizontalComboBox)
+ AmendThemeDialog.setTabOrder(self.HorizontalComboBox,
+ self.VerticalComboBox)
def retranslateUi(self, AmendThemeDialog):
- AmendThemeDialog.setWindowTitle(translate('AmendThemeForm', 'Theme Maintenance'))
+ AmendThemeDialog.setWindowTitle(
+ translate('AmendThemeForm', 'Theme Maintenance'))
self.ThemeNameLabel.setText(translate('AmendThemeForm', 'Theme Name:'))
self.BackgroundLabel.setText(translate('AmendThemeForm', 'Background:'))
- self.BackgroundComboBox.setItemText(0, translate('AmendThemeForm', 'Opaque'))
- self.BackgroundComboBox.setItemText(1, translate('AmendThemeForm', 'Transparent'))
- self.BackgroundTypeLabel.setText(translate('AmendThemeForm', 'Background Type:'))
- self.BackgroundTypeComboBox.setItemText(0, translate('AmendThemeForm', 'Solid Color'))
- self.BackgroundTypeComboBox.setItemText(1, translate('AmendThemeForm', 'Gradient'))
- self.BackgroundTypeComboBox.setItemText(2, translate('AmendThemeForm', 'Image'))
+ self.BackgroundComboBox.setItemText(0,
+ translate('AmendThemeForm', 'Opaque'))
+ self.BackgroundComboBox.setItemText(1,
+ translate('AmendThemeForm', 'Transparent'))
+ self.BackgroundTypeLabel.setText(
+ translate('AmendThemeForm', 'Background Type:'))
+ self.BackgroundTypeComboBox.setItemText(0,
+ translate('AmendThemeForm', 'Solid Color'))
+ self.BackgroundTypeComboBox.setItemText(1,
+ translate('AmendThemeForm', 'Gradient'))
+ self.BackgroundTypeComboBox.setItemText(2,
+ translate('AmendThemeForm', 'Image'))
self.Color1Label.setText(translate('AmendThemeForm', '<Color1>'))
self.Color2Label.setText(translate('AmendThemeForm', '<Color2>'))
self.ImageLabel.setText(translate('AmendThemeForm', 'Image:'))
self.GradientLabel.setText(translate('AmendThemeForm', 'Gradient :'))
- self.GradientComboBox.setItemText(0, translate('AmendThemeForm', 'Horizontal'))
- self.GradientComboBox.setItemText(1, translate('AmendThemeForm', 'Vertical'))
- self.GradientComboBox.setItemText(2, translate('AmendThemeForm', 'Circular'))
+ self.GradientComboBox.setItemText(0,
+ translate('AmendThemeForm', 'Horizontal'))
+ self.GradientComboBox.setItemText(1,
+ translate('AmendThemeForm', 'Vertical'))
+ self.GradientComboBox.setItemText(2,
+ translate('AmendThemeForm', 'Circular'))
self.ThemeTabWidget.setTabText(
self.ThemeTabWidget.indexOf(self.BackgroundTab),
translate('AmendThemeForm', 'Background'))
self.FontMainGroupBox.setTitle(translate('AmendThemeForm', 'Main Font'))
self.FontMainlabel.setText(translate('AmendThemeForm', 'Font:'))
- self.FontMainColorLabel.setText(translate('AmendThemeForm', 'Font Color:'))
+ self.FontMainColorLabel.setText(
+ translate('AmendThemeForm', 'Font Color:'))
self.FontMainSize.setText(translate('AmendThemeForm', 'Size:'))
self.FontMainSizeSpinBox.setSuffix(translate('AmendThemeForm', 'pt'))
- self.FontMainWrapIndentationLabel.setText(translate('AmendThemeForm', 'Wrap Indentation'))
- self.FontMainWrapLineAdjustmentLabel.setText(translate('AmendThemeForm', 'Adjust Line Spacing'))
- self.FontMainWeightComboBox.setItemText(0, translate('AmendThemeForm', 'Normal'))
- self.FontMainWeightComboBox.setItemText(1, translate('AmendThemeForm', 'Bold'))
- self.FontMainWeightComboBox.setItemText(2, translate('AmendThemeForm', 'Italics'))
- self.FontMainWeightComboBox.setItemText(3, translate('AmendThemeForm', 'Bold/Italics'))
- self.FontMainWeightLabel.setText(translate('AmendThemeForm', 'Font Weight:'))
- self.MainLocationGroupBox.setTitle(translate('AmendThemeForm', 'Display Location'))
- self.DefaultLocationLabel.setText(translate('AmendThemeForm', 'Use Default Location:'))
+ self.FontMainWrapIndentationLabel.setText(
+ translate('AmendThemeForm', 'Wrap Indentation'))
+ self.FontMainWrapLineAdjustmentLabel.setText(
+ translate('AmendThemeForm', 'Adjust Line Spacing'))
+ self.FontMainWeightComboBox.setItemText(0,
+ translate('AmendThemeForm', 'Normal'))
+ self.FontMainWeightComboBox.setItemText(1,
+ translate('AmendThemeForm', 'Bold'))
+ self.FontMainWeightComboBox.setItemText(2,
+ translate('AmendThemeForm', 'Italics'))
+ self.FontMainWeightComboBox.setItemText(3,
+ translate('AmendThemeForm', 'Bold/Italics'))
+ self.FontMainWeightLabel.setText(
+ translate('AmendThemeForm', 'Font Weight:'))
+ self.MainLocationGroupBox.setTitle(
+ translate('AmendThemeForm', 'Display Location'))
+ self.DefaultLocationLabel.setText(
+ translate('AmendThemeForm', 'Use Default Location:'))
self.FontMainXLabel.setText(translate('AmendThemeForm', 'X Position:'))
self.FontMainYLabel.setText(translate('AmendThemeForm', 'Y Position:'))
self.FontMainWidthLabel.setText(translate('AmendThemeForm', 'Width:'))
@@ -647,51 +813,81 @@
self.ThemeTabWidget.setTabText(
self.ThemeTabWidget.indexOf(self.FontMainTab),
translate('AmendThemeForm', 'Font Main'))
- self.FooterFontGroupBox.setTitle(translate('AmendThemeForm', 'Footer Font'))
+ self.FooterFontGroupBox.setTitle(
+ translate('AmendThemeForm', 'Footer Font'))
self.FontFooterLabel.setText(translate('AmendThemeForm', 'Font:'))
- self.FontFooterColorLabel.setText(translate('AmendThemeForm', 'Font Color:'))
+ self.FontFooterColorLabel.setText(
+ translate('AmendThemeForm', 'Font Color:'))
self.FontFooterSizeLabel.setText(translate('AmendThemeForm', 'Size:'))
self.FontFooterSizeSpinBox.setSuffix(translate('AmendThemeForm', 'pt'))
- self.FontFooterWeightComboBox.setItemText(0, translate('AmendThemeForm', 'Normal'))
- self.FontFooterWeightComboBox.setItemText(1, translate('AmendThemeForm', 'Bold'))
- self.FontFooterWeightComboBox.setItemText(2, translate('AmendThemeForm', 'Italics'))
- self.FontFooterWeightComboBox.setItemText(3, translate('AmendThemeForm', 'Bold/Italics'))
- self.FontFooterWeightLabel.setText(translate('AmendThemeForm', 'Font Weight:'))
- self.LocationFooterGroupBox.setTitle(translate('AmendThemeForm', 'Display Location'))
- self.FontFooterDefaultLabel.setText(translate('AmendThemeForm', 'Use Default Location:'))
- self.FontFooterXLabel.setText(translate('AmendThemeForm', 'X Position:'))
- self.FontFooterYLabel.setText(translate('AmendThemeForm', 'Y Position:'))
+ self.FontFooterWeightComboBox.setItemText(0,
+ translate('AmendThemeForm', 'Normal'))
+ self.FontFooterWeightComboBox.setItemText(1,
+ translate('AmendThemeForm', 'Bold'))
+ self.FontFooterWeightComboBox.setItemText(2,
+ translate('AmendThemeForm', 'Italics'))
+ self.FontFooterWeightComboBox.setItemText(3,
+ translate('AmendThemeForm', 'Bold/Italics'))
+ self.FontFooterWeightLabel.setText(
+ translate('AmendThemeForm', 'Font Weight:'))
+ self.LocationFooterGroupBox.setTitle(
+ translate('AmendThemeForm', 'Display Location'))
+ self.FontFooterDefaultLabel.setText(
+ translate('AmendThemeForm', 'Use Default Location:'))
+ self.FontFooterXLabel.setText(
+ translate('AmendThemeForm', 'X Position:'))
+ self.FontFooterYLabel.setText(
+ translate('AmendThemeForm', 'Y Position:'))
self.FontFooterWidthLabel.setText(translate('AmendThemeForm', 'Width:'))
- self.FontFooterHeightLabel.setText(translate('AmendThemeForm', 'Height:'))
+ self.FontFooterHeightLabel.setText(
+ translate('AmendThemeForm', 'Height:'))
self.FontFooterXSpinBox.setSuffix(translate('AmendThemeForm', 'px'))
self.FontFooterYSpinBox.setSuffix(translate('AmendThemeForm', 'px'))
self.FontFooterWidthSpinBox.setSuffix(translate('AmendThemeForm', 'px'))
- self.FontFooterHeightSpinBox.setSuffix(translate('AmendThemeForm', 'px'))
+ self.FontFooterHeightSpinBox.setSuffix(
+ translate('AmendThemeForm', 'px'))
self.ThemeTabWidget.setTabText(
self.ThemeTabWidget.indexOf(self.FontFooterTab),
translate('AmendThemeForm', 'Font Footer'))
self.OutlineGroupBox.setTitle(translate('AmendThemeForm', 'Outline'))
- self.OutlineSpinBoxLabel.setText(translate('AmendThemeForm', 'Outline Size:'))
+ self.OutlineSpinBoxLabel.setText(
+ translate('AmendThemeForm', 'Outline Size:'))
self.OutlineSpinBox.setSuffix(translate('AmendThemeForm', 'px'))
- self.OutlineColorLabel.setText(translate('AmendThemeForm', 'Outline Color:'))
- self.OutlineEnabledLabel.setText(translate('AmendThemeForm', 'Show Outline:'))
+ self.OutlineColorLabel.setText(
+ translate('AmendThemeForm', 'Outline Color:'))
+ self.OutlineEnabledLabel.setText(
+ translate('AmendThemeForm', 'Show Outline:'))
self.ShadowGroupBox.setTitle(translate('AmendThemeForm', 'Shadow'))
- self.ShadowSpinBoxLabel.setText(translate('AmendThemeForm', 'Shadow Size:'))
+ self.ShadowSpinBoxLabel.setText(
+ translate('AmendThemeForm', 'Shadow Size:'))
self.ShadowSpinBox.setSuffix(translate('AmendThemeForm', 'px'))
- self.ShadowColorLabel.setText(translate('AmendThemeForm', 'Shadow Color:'))
- self.ShadowEnabledLabel.setText(translate('AmendThemeForm', 'Show Shadow:'))
- self.AlignmentGroupBox.setTitle(translate('AmendThemeForm', 'Alignment'))
- self.HorizontalLabel.setText(translate('AmendThemeForm', 'Horizontal Align:'))
- self.HorizontalComboBox.setItemText(0, translate('AmendThemeForm', 'Left'))
- self.HorizontalComboBox.setItemText(1, translate('AmendThemeForm', 'Right'))
- self.HorizontalComboBox.setItemText(2, translate('AmendThemeForm', 'Center'))
- self.VerticalLabel.setText(translate('AmendThemeForm', 'Vertical Align:'))
+ self.ShadowColorLabel.setText(
+ translate('AmendThemeForm', 'Shadow Color:'))
+ self.ShadowEnabledLabel.setText(
+ translate('AmendThemeForm', 'Show Shadow:'))
+ self.AlignmentGroupBox.setTitle(
+ translate('AmendThemeForm', 'Alignment'))
+ self.HorizontalLabel.setText(
+ translate('AmendThemeForm', 'Horizontal Align:'))
+ self.HorizontalComboBox.setItemText(0,
+ translate('AmendThemeForm', 'Left'))
+ self.HorizontalComboBox.setItemText(1,
+ translate('AmendThemeForm', 'Right'))
+ self.HorizontalComboBox.setItemText(2,
+ translate('AmendThemeForm', 'Center'))
+ self.VerticalLabel.setText(
+ translate('AmendThemeForm', 'Vertical Align:'))
self.VerticalComboBox.setItemText(0, translate('AmendThemeForm', 'Top'))
- self.VerticalComboBox.setItemText(1, translate('AmendThemeForm', 'Middle'))
- self.VerticalComboBox.setItemText(2, translate('AmendThemeForm', 'Bottom'))
- self.TransitionGroupBox.setTitle(translate('AmendThemeForm', 'Slide Transition'))
- self.SlideTransitionCheckedBoxLabel.setText(translate('AmendThemeForm', 'Transition Active:'))
+ self.VerticalComboBox.setItemText(1,
+ translate('AmendThemeForm', 'Middle'))
+ self.VerticalComboBox.setItemText(2,
+ translate('AmendThemeForm', 'Bottom'))
+ self.TransitionGroupBox.setTitle(
+ translate('AmendThemeForm', 'Slide Transition'))
+ self.SlideTransitionCheckedBoxLabel.setText(
+ translate('AmendThemeForm', 'Transition Active:'))
self.ThemeTabWidget.setTabText(
self.ThemeTabWidget.indexOf(self.OtherOptionsTab),
translate('AmendThemeForm', 'Other Options'))
self.PreviewGroupBox.setTitle(translate('AmendThemeForm', 'Preview'))
+
=== modified file 'openlp/core/ui/amendthemeform.py'
--- openlp/core/ui/amendthemeform.py 2010-04-30 21:00:17 +0000
+++ openlp/core/ui/amendthemeform.py 2010-06-01 17:23:23 +0000
@@ -154,8 +154,8 @@
unicode(self.theme.background_endColor),
self.theme.background_direction)
else:
- (path, filename) = \
- os.path.split(unicode(self.theme.background_filename))
+ filename = \
+ os.path.split(unicode(self.theme.background_filename))[0]
new_theme.add_background_image(filename)
save_to = os.path.join(self.path, theme_name, filename)
save_from = self.theme.background_filename
=== modified file 'openlp/core/ui/mainwindow.py'
--- openlp/core/ui/mainwindow.py 2010-05-27 08:42:56 +0000
+++ openlp/core/ui/mainwindow.py 2010-06-01 17:23:23 +0000
@@ -33,7 +33,8 @@
ThemeManager, SlideController, PluginForm, MediaDockManager, DisplayManager
from openlp.core.lib import RenderManager, build_icon, OpenLPDockWidget, \
SettingsManager, PluginManager, Receiver, translate
-from openlp.core.utils import check_latest_version, AppLocation, add_actions, LanguageManager
+from openlp.core.utils import check_latest_version, AppLocation, add_actions, \
+ LanguageManager
log = logging.getLogger(__name__)
@@ -61,7 +62,8 @@
QtCore.QThread.__init__(self, parent)
self.parent = parent
self.app_version = app_version
- self.version_splitter = re.compile(r'([0-9]+).([0-9]+).([0-9]+)(?:-bzr([0-9]+))')
+ self.version_splitter = re.compile(
+ r'([0-9]+).([0-9]+).([0-9]+)(?:-bzr([0-9]+))')
def run(self):
"""
@@ -842,7 +844,8 @@
recentFileCount = QtCore.QSettings().value(
self.generalSettingsSection + u'/max recent files',
QtCore.QVariant(4)).toInt()[0]
- if filename and not self.recentFiles.contains(filename):
- self.recentFiles.prepend(QtCore.QString(filename))
+ if filename and filename not in self.recentFiles:
+ self.recentFiles.insert(0, QtCore.QString(filename))
while self.recentFiles.count() > recentFileCount:
- self.recentFiles.takeLast()
+ self.recentFiles.pop()
+
=== modified file 'openlp/core/ui/plugindialog.py'
--- openlp/core/ui/plugindialog.py 2010-05-01 19:45:06 +0000
+++ openlp/core/ui/plugindialog.py 2010-06-01 17:23:23 +0000
@@ -100,10 +100,12 @@
def retranslateUi(self, PluginViewDialog):
PluginViewDialog.setWindowTitle(translate('PluginForm', 'Plugin List'))
- self.PluginInfoGroupBox.setTitle(translate('PluginForm', 'Plugin Details'))
+ self.PluginInfoGroupBox.setTitle(
+ translate('PluginForm', 'Plugin Details'))
self.VersionLabel.setText(translate('PluginForm', 'Version:'))
self.VersionNumberLabel.setText(translate('PluginForm', 'TextLabel'))
self.AboutLabel.setText(translate('PluginForm', 'About:'))
self.StatusLabel.setText(translate('PluginForm', 'Status:'))
self.StatusComboBox.setItemText(0, translate('PluginForm', 'Active'))
self.StatusComboBox.setItemText(1, translate('PluginForm', 'Inactive'))
+
=== modified file 'openlp/core/ui/serviceitemeditdialog.py'
--- openlp/core/ui/serviceitemeditdialog.py 2010-05-01 19:45:06 +0000
+++ openlp/core/ui/serviceitemeditdialog.py 2010-06-01 17:23:23 +0000
@@ -67,7 +67,8 @@
QtCore.QMetaObject.connectSlotsByName(ServiceItemEditDialog)
def retranslateUi(self, ServiceItemEditDialog):
- ServiceItemEditDialog.setWindowTitle(translate('ServiceItemEditForm', 'Service Item Maintenance'))
+ ServiceItemEditDialog.setWindowTitle(
+ translate('ServiceItemEditForm', 'Service Item Maintenance'))
self.upButton.setText(translate('ServiceItemEditForm', 'Up'))
self.deleteButton.setText(translate('ServiceItemEditForm', 'Delete'))
self.downButton.setText(translate('ServiceItemEditForm', 'Down'))
=== modified file 'openlp/core/ui/servicemanager.py'
--- openlp/core/ui/servicemanager.py 2010-05-24 22:37:20 +0000
+++ openlp/core/ui/servicemanager.py 2010-06-01 17:23:23 +0000
@@ -147,9 +147,11 @@
self.ServiceManagerList.setAlternatingRowColors(True)
self.ServiceManagerList.setHeaderHidden(True)
self.ServiceManagerList.setExpandsOnDoubleClick(False)
- self.ServiceManagerList.setContextMenuPolicy(QtCore.Qt.CustomContextMenu)
+ self.ServiceManagerList.setContextMenuPolicy(
+ QtCore.Qt.CustomContextMenu)
QtCore.QObject.connect(self.ServiceManagerList,
- QtCore.SIGNAL('customContextMenuRequested(QPoint)'), self.contextMenu)
+ QtCore.SIGNAL('customContextMenuRequested(QPoint)'),
+ self.contextMenu)
self.ServiceManagerList.setObjectName(u'ServiceManagerList')
# enable drop
self.ServiceManagerList.__class__.dragEnterEvent = self.dragEnterEvent
@@ -172,7 +174,8 @@
self.trUtf8('Move to end'), self.onServiceEnd)
self.OrderToolbar.addSeparator()
self.OrderToolbar.addToolbarButton(
- self.trUtf8('&Delete >From Service'), u':/general/general_delete.png',
+ self.trUtf8('&Delete From Service'),
+ u':/general/general_delete.png',
self.trUtf8('Delete From Service'), self.onDeleteFromService)
self.Layout.addWidget(self.OrderToolbar)
# Connect up our signals and slots
@@ -205,7 +208,8 @@
self.dndMenu = QtGui.QMenu()
self.newAction = self.dndMenu.addAction(self.trUtf8('&Add New Item'))
self.newAction.setIcon(build_icon(u':/general/general_edit.png'))
- self.addToAction = self.dndMenu.addAction(self.trUtf8('&Add to Selected Item'))
+ self.addToAction = self.dndMenu.addAction(
+ self.trUtf8('&Add to Selected Item'))
self.addToAction.setIcon(build_icon(u':/general/general_edit.png'))
#build the context menu
self.menu = QtGui.QMenu()
@@ -269,7 +273,7 @@
self.makeLive()
def onServiceItemNoteForm(self):
- item, count = self.findServiceItem()
+ item = self.findServiceItem()[0]
self.serviceNoteForm.textEdit.setPlainText(
self.serviceItems[item][u'service_item'].notes)
if self.serviceNoteForm.exec_():
@@ -278,7 +282,7 @@
self.repaintServiceList(item, 0)
def onServiceItemEditForm(self):
- item, count = self.findServiceItem()
+ item = self.findServiceItem()[0]
self.serviceItemEditForm.setServiceItem(
self.serviceItems[item][u'service_item'])
if self.serviceItemEditForm.exec_():
@@ -477,7 +481,7 @@
"""
Remove the current ServiceItem from the list
"""
- item, count = self.findServiceItem()
+ item = self.findServiceItem()[0]
if item is not -1:
self.serviceItems.remove(self.serviceItems[item])
self.repaintServiceList(0, 0)
@@ -503,10 +507,10 @@
if serviceitem.notes:
icon = QtGui.QImage(serviceitem.icon)
icon = icon.scaled(80, 80, QtCore.Qt.KeepAspectRatio,
- QtCore.Qt.SmoothTransformation)
+ QtCore.Qt.SmoothTransformation)
overlay = QtGui.QImage(':/services/service_item_notes.png')
overlay = overlay.scaled(80, 80, QtCore.Qt.KeepAspectRatio,
- QtCore.Qt.SmoothTransformation)
+ QtCore.Qt.SmoothTransformation)
painter = QtGui.QPainter(icon)
painter.drawImage(0, 0, overlay)
painter.end()
@@ -514,7 +518,8 @@
else:
treewidgetitem.setIcon(0, serviceitem.iconic_representation)
else:
- treewidgetitem.setIcon(0, build_icon(u':/general/general_delete.png'))
+ treewidgetitem.setIcon(0,
+ build_icon(u':/general/general_delete.png'))
treewidgetitem.setText(0, serviceitem.title)
treewidgetitem.setToolTip(0, serviceitem.notes)
treewidgetitem.setData(0, QtCore.Qt.UserRole,
@@ -576,7 +581,7 @@
cPickle.dump(service, file)
file.close()
zip.write(servicefile)
- except:
+ except IOError:
log.exception(u'Failed to save service to disk')
finally:
if file:
@@ -585,7 +590,7 @@
zip.close()
try:
os.remove(servicefile)
- except:
+ except (IOError, OSError):
pass #if not present do not worry
name = filename.split(os.path.sep)
self.serviceName = name[-1]
@@ -636,23 +641,23 @@
self.parent.serviceSettingsSection,
os.path.split(filename)[0])
zip = None
- f = None
+ file_to = None
try:
zip = zipfile.ZipFile(unicode(filename))
for file in zip.namelist():
osfile = unicode(QtCore.QDir.toNativeSeparators(file))
names = osfile.split(os.path.sep)
- file_to = os.path.join(self.servicePath,
+ file_path = os.path.join(self.servicePath,
names[len(names) - 1])
- f = open(file_to, u'wb')
- f.write(zip.read(file))
- f.flush()
- f.close()
- if file_to.endswith(u'osd'):
- p_file = file_to
- f = open(p_file, u'r')
- items = cPickle.load(f)
- f.close()
+ file_to = open(file_path, u'wb')
+ file_to.write(zip.read(file))
+ file_to.flush()
+ file_to.close()
+ if file_path.endswith(u'osd'):
+ p_file = file_path
+ file_to = open(p_file, u'r')
+ items = cPickle.load(file_to)
+ file_to.close()
self.onNewService()
for item in items:
serviceitem = ServiceItem()
@@ -663,13 +668,13 @@
try:
if os.path.isfile(p_file):
os.remove(p_file)
- except:
+ except (IOError, OSError):
log.exception(u'Failed to remove osd file')
- except:
+ except IOError:
log.exception(u'Problem loading a service file')
finally:
- if f:
- f.close()
+ if file_to:
+ file_to.close()
if zip:
zip.close()
self.isNew = False
@@ -696,7 +701,7 @@
try:
if os.path.isfile(file_path):
os.remove(file_path)
- except:
+ except OSError:
log.exception(u'Failed to clean up servicePath')
def onThemeComboBoxSelected(self, currentIndex):
@@ -737,7 +742,7 @@
Service Item to be added
"""
- sitem, count = self.findServiceItem()
+ sitem = self.findServiceItem()[0]
item.render()
if replace:
item.merge(self.serviceItems[sitem][u'service_item'])
@@ -789,7 +794,7 @@
"""
Send the current item to the Preview slide controller
"""
- item, count = self.findServiceItem()
+ item = self.findServiceItem()[0]
if item == -1:
return False
else:
@@ -825,7 +830,7 @@
"""
Posts a remote edit message to a plugin to allow item to be edited.
"""
- item, count = self.findServiceItem()
+ item = self.findServiceItem()[0]
if self.serviceItems[item][u'service_item']\
.is_capable(ItemCapabilities.AllowsEdit):
Receiver.send_message(u'%s_edit' %
@@ -942,7 +947,7 @@
def onThemeChangeAction(self):
theme = unicode(self.sender().text())
- item, count = self.findServiceItem()
+ item = self.findServiceItem()[0]
self.serviceItems[item][u'service_item'].theme = theme
self.regenerateServiceItems()
@@ -955,7 +960,7 @@
def listRequest(self, message=None):
data = []
- curindex, count = self.findServiceItem()
+ curindex = self.findServiceItem()[0]
if curindex >= 0 and curindex < len(self.serviceItems):
curitem = self.serviceItems[curindex]
else:
@@ -969,3 +974,4 @@
data_item[u'selected'] = (item == curitem)
data.append(data_item)
Receiver.send_message(u'servicemanager_list_response', data)
+
=== modified file 'openlp/core/ui/servicenotedialog.py'
--- openlp/core/ui/servicenotedialog.py 2010-05-01 19:45:06 +0000
+++ openlp/core/ui/servicenotedialog.py 2010-06-01 17:23:23 +0000
@@ -39,7 +39,8 @@
self.textEdit.setObjectName(u'textEdit')
self.verticalLayout.addWidget(self.textEdit)
self.buttonBox = QtGui.QDialogButtonBox(self.widget)
- self.buttonBox.setStandardButtons(QtGui.QDialogButtonBox.Cancel|QtGui.QDialogButtonBox.Save)
+ self.buttonBox.setStandardButtons(QtGui.QDialogButtonBox.Cancel |
+ QtGui.QDialogButtonBox.Save)
self.buttonBox.setObjectName(u'buttonBox')
self.verticalLayout.addWidget(self.buttonBox)
@@ -47,4 +48,6 @@
QtCore.QMetaObject.connectSlotsByName(ServiceNoteEdit)
def retranslateUi(self, ServiceNoteEdit):
- ServiceNoteEdit.setWindowTitle(translate('ServiceNoteForm', 'Service Item Notes'))
+ ServiceNoteEdit.setWindowTitle(
+ translate('ServiceNoteForm', 'Service Item Notes'))
+
=== modified file 'openlp/core/ui/slidecontroller.py'
--- openlp/core/ui/slidecontroller.py 2010-05-24 22:37:20 +0000
+++ openlp/core/ui/slidecontroller.py 2010-06-01 17:23:23 +0000
@@ -377,9 +377,9 @@
width = self.parent.ControlSplitter.sizes()[self.split]
height = width * self.parent.RenderManager.screen_ratio
self.PreviewListWidget.setColumnWidth(0, width)
- #Sort out image hights (Songs , bibles excluded)
+ #Sort out image heights (Songs, bibles excluded)
if self.serviceItem and not self.serviceItem.is_text():
- for framenumber, frame in enumerate(self.serviceItem.get_frames()):
+ for framenumber in range(len(self.serviceItem.get_frames())):
self.PreviewListWidget.setRowHeight(framenumber, height)
def trackSplitter(self, tab, pos):
@@ -777,7 +777,8 @@
def updatePreview(self):
rm = self.parent.RenderManager
if not rm.screens.current[u'primary']:
- # Grab now, but try again in a couple of seconds if slide change is slow
+ # Grab now, but try again in a couple of seconds if slide change
+ # is slow
QtCore.QTimer.singleShot(0.5, self.grabMainDisplay)
QtCore.QTimer.singleShot(2.5, self.grabMainDisplay)
else:
=== modified file 'openlp/core/ui/thememanager.py'
--- openlp/core/ui/thememanager.py 2010-05-25 16:16:43 +0000
+++ openlp/core/ui/thememanager.py 2010-06-01 17:23:23 +0000
@@ -184,16 +184,14 @@
else:
for plugin in self.parent.plugin_manager.plugins:
if not plugin.can_delete_theme(theme):
- QtGui.QMessageBox.critical(
- self, self.trUtf8('Error'),
- self.trUtf8('Theme %s is use in %s plugin' % (theme, plugin.name)),
- QtGui.QMessageBox.StandardButtons(QtGui.QMessageBox.Ok))
+ QtGui.QMessageBox.critical(self, self.trUtf8('Error'),
+ self.trUtf8('Theme %s is use in %s plugin' % (theme,
+ plugin.name)))
return
if unicode(self.parent.ServiceManagerContents.ThemeComboBox.currentText()) == theme:
- QtGui.QMessageBox.critical(
- self, self.trUtf8('Error'),
- self.trUtf8('Theme %s is use by Service Manager' % theme),
- QtGui.QMessageBox.StandardButtons(QtGui.QMessageBox.Ok))
+ QtGui.QMessageBox.critical(self, self.trUtf8('Error'),
+ self.trUtf8('Theme %s is use by Service Manager' %
+ theme))
return
self.themelist.remove(theme)
th = theme + u'.png'
@@ -203,7 +201,7 @@
os.remove(os.path.join(self.path, th))
os.remove(os.path.join(self.thumbPath, th))
shutil.rmtree(os.path.join(self.path, theme))
- except:
+ except OSError:
#if not present do not worry
pass
# As we do not reload the themes push out the change
@@ -233,12 +231,12 @@
try:
zip = zipfile.ZipFile(themePath, u'w')
source = os.path.join(self.path, theme)
- for root, dirs, files in os.walk(source):
+ for files in os.walk(source)[2]:
for name in files:
zip.write(
os.path.join(source, name),
os.path.join(theme, name))
- except:
+ except (IOError, OSError):
log.exception(u'Export Theme Failed')
finally:
if zip:
@@ -272,11 +270,9 @@
#check to see file is in theme root directory
theme = os.path.join(self.path, name)
if os.path.exists(theme):
- (path, filename) = os.path.split(unicode(file))
textName = os.path.splitext(name)[0]
if textName == self.global_theme:
- name = u'%s (%s)' % (textName,
- self.trUtf8('default'))
+ name = u'%s (%s)' % (textName, self.trUtf8('default'))
else:
name = textName
thumb = os.path.join(self.thumbPath, u'%s.png' % textName)
@@ -360,11 +356,10 @@
outfile = open(fullpath, u'wb')
outfile.write(zip.read(file))
self.generateAndSaveImage(dir, themename, filexml)
- except:
+ except IOError:
QtGui.QMessageBox.critical(
self, self.trUtf8('Error'),
- self.trUtf8('File is not a valid theme.'),
- QtGui.QMessageBox.StandardButtons(QtGui.QMessageBox.Ok))
+ self.trUtf8('File is not a valid theme.'))
log.exception(u'Importing theme from zip file failed %s' % filename)
finally:
if zip:
@@ -456,7 +451,7 @@
try:
outfile = open(theme_file, u'w')
outfile.write(theme_pretty_xml)
- except:
+ except IOError:
log.exception(u'Saving theme to file failed')
finally:
if outfile:
@@ -464,7 +459,7 @@
if image_from and image_from != image_to:
try:
shutil.copyfile(image_from, image_to)
- except:
+ except IOError:
log.exception(u'Failed to save theme image')
self.generateAndSaveImage(self.path, name, theme_xml)
self.loadThemes()
@@ -567,3 +562,4 @@
#theme.theme_mode
theme.theme_name = theme.theme_name.strip()
#theme.theme_version
+
=== modified file 'openlp/migration/migratebibles.py'
--- openlp/migration/migratebibles.py 2010-05-28 00:26:49 +0000
+++ openlp/migration/migratebibles.py 2010-06-01 17:23:23 +0000
@@ -27,8 +27,8 @@
import sys
import sqlite3
-from sqlalchemy import create_engine
-from sqlalchemy.orm import scoped_session, sessionmaker, mapper
+from sqlalchemy.exceptions import InvalidRequestError
+from sqlalchemy.orm import mapper
from openlp.core.lib import BaseModel, SettingsManager
from openlp.core.utils import AppLocation
@@ -85,13 +85,6 @@
mapper(TBook, temp_book_table)
mapper(TVerse, temp_verse_table)
-def init_models(url):
- engine = create_engine(url)
- metadata.bind = engine
- session = scoped_session(sessionmaker(autoflush=False,
- autocommit=False, bind=engine))
- return session
-
class MigrateBibles(object):
def __init__(self, display):
self.display = display
@@ -105,8 +98,8 @@
def process(self):
self.progress(u'Bibles processing started')
- for f in self.database_files:
- self.v_1_9_0(f)
+ for db_file in self.database_files:
+ self.v_1_9_0(db_file)
self.progress(u'Bibles processing finished')
def v_1_9_0(self, database):
@@ -143,7 +136,7 @@
try:
self.session.add(testament)
self.session.commit()
- except:
+ except InvalidRequestError:
self.session.rollback()
print u'Error thrown = ', sys.exc_info()[1]
self.progress(u'Create book table')
@@ -157,7 +150,7 @@
try:
self.session.add(book)
self.session.commit()
- except:
+ except InvalidRequestError:
self.session.rollback()
print u'Error thrown = ', sys.exc_info()[1]
self.progress(u'Create verse table')
@@ -171,14 +164,10 @@
verse.text = verse_temp.text
try:
self.session.add(verse)
- except:
+ self.session.commit()
+ except InvalidRequestError:
self.session.rollback()
print u'Error thrown = ', sys.exc_info()[1]
- try:
- self.session.commit()
- except:
- self.session.rollback()
- print u'Error thrown = ', sys.exc_info()[1]
self.progress(u'Create metadata table')
results = self.session.query(TBibleMeta).order_by(TBibleMeta.key).all()
for biblemeta_temp in results:
@@ -188,7 +177,7 @@
try:
self.session.add(biblemeta)
self.session.commit()
- except:
+ except InvalidRequestError:
self.session.rollback()
print u'Error thrown = ', sys.exc_info()[1]
@@ -206,3 +195,4 @@
conn.commit()
conn.execute(u'vacuum;')
conn.commit()
+
=== modified file 'openlp/migration/migratesongs.py'
--- openlp/migration/migratesongs.py 2010-05-28 00:26:49 +0000
+++ openlp/migration/migratesongs.py 2010-06-01 17:23:23 +0000
@@ -27,8 +27,8 @@
import sys
import sqlite3
-from sqlalchemy import *
from sqlalchemy import create_engine
+from sqlalchemy.exceptions import InvalidRequestError
from sqlalchemy.orm import scoped_session, sessionmaker, mapper, relation
from openlp.core.lib import BaseModel, SettingsManager
@@ -159,7 +159,7 @@
try:
self.session.add(song)
self.session.commit()
- except:
+ except InvalidRequestError:
self.session.rollback()
print u'Error thrown = ', sys.exc_info()[1]
=== modified file 'openlp/plugins/alerts/forms/alertdialog.py'
--- openlp/plugins/alerts/forms/alertdialog.py 2010-05-01 19:45:06 +0000
+++ openlp/plugins/alerts/forms/alertdialog.py 2010-06-01 17:23:23 +0000
@@ -24,6 +24,7 @@
###############################################################################
from PyQt4 import QtCore, QtGui
+
from openlp.core.lib import translate
class Ui_AlertDialog(object):
@@ -31,7 +32,8 @@
AlertDialog.setObjectName(u'AlertDialog')
AlertDialog.resize(567, 440)
icon = QtGui.QIcon()
- icon.addPixmap(QtGui.QPixmap(u':/icon/openlp.org-icon-32.bmp'), QtGui.QIcon.Normal, QtGui.QIcon.Off)
+ icon.addPixmap(QtGui.QPixmap(u':/icon/openlp.org-icon-32.bmp'),
+ QtGui.QIcon.Normal, QtGui.QIcon.Off)
AlertDialog.setWindowIcon(icon)
self.AlertDialogLayout = QtGui.QVBoxLayout(AlertDialog)
self.AlertDialogLayout.setSpacing(8)
@@ -42,22 +44,28 @@
self.AlertTextLayout.setSpacing(8)
self.AlertTextLayout.setObjectName(u'AlertTextLayout')
self.AlertEntryLabel = QtGui.QLabel(AlertDialog)
- sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Fixed)
+ sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred,
+ QtGui.QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
- sizePolicy.setHeightForWidth(self.AlertEntryLabel.sizePolicy().hasHeightForWidth())
+ sizePolicy.setHeightForWidth(
+ self.AlertEntryLabel.sizePolicy().hasHeightForWidth())
self.AlertEntryLabel.setSizePolicy(sizePolicy)
self.AlertEntryLabel.setObjectName(u'AlertEntryLabel')
- self.AlertTextLayout.setWidget(0, QtGui.QFormLayout.LabelRole, self.AlertEntryLabel)
+ self.AlertTextLayout.setWidget(0, QtGui.QFormLayout.LabelRole,
+ self.AlertEntryLabel)
self.AlertParameter = QtGui.QLabel(AlertDialog)
self.AlertParameter.setObjectName(u'AlertParameter')
- self.AlertTextLayout.setWidget(1, QtGui.QFormLayout.LabelRole, self.AlertParameter)
+ self.AlertTextLayout.setWidget(1, QtGui.QFormLayout.LabelRole,
+ self.AlertParameter)
self.ParameterEdit = QtGui.QLineEdit(AlertDialog)
self.ParameterEdit.setObjectName(u'ParameterEdit')
- self.AlertTextLayout.setWidget(1, QtGui.QFormLayout.FieldRole, self.ParameterEdit)
+ self.AlertTextLayout.setWidget(1, QtGui.QFormLayout.FieldRole,
+ self.ParameterEdit)
self.AlertTextEdit = QtGui.QLineEdit(AlertDialog)
self.AlertTextEdit.setObjectName(u'AlertTextEdit')
- self.AlertTextLayout.setWidget(0, QtGui.QFormLayout.FieldRole, self.AlertTextEdit)
+ self.AlertTextLayout.setWidget(0, QtGui.QFormLayout.FieldRole,
+ self.AlertTextEdit)
self.AlertDialogLayout.addLayout(self.AlertTextLayout)
self.ManagementLayout = QtGui.QHBoxLayout()
self.ManagementLayout.setSpacing(8)
@@ -72,24 +80,28 @@
self.ManageButtonLayout.setObjectName(u'ManageButtonLayout')
self.NewButton = QtGui.QPushButton(AlertDialog)
icon1 = QtGui.QIcon()
- icon1.addPixmap(QtGui.QPixmap(u':/general/general_new.png'), QtGui.QIcon.Normal, QtGui.QIcon.Off)
+ icon1.addPixmap(QtGui.QPixmap(u':/general/general_new.png'),
+ QtGui.QIcon.Normal, QtGui.QIcon.Off)
self.NewButton.setIcon(icon1)
self.NewButton.setObjectName(u'NewButton')
self.ManageButtonLayout.addWidget(self.NewButton)
self.SaveButton = QtGui.QPushButton(AlertDialog)
self.SaveButton.setEnabled(False)
icon2 = QtGui.QIcon()
- icon2.addPixmap(QtGui.QPixmap(u':/general/general_save.png'), QtGui.QIcon.Normal, QtGui.QIcon.Off)
+ icon2.addPixmap(QtGui.QPixmap(u':/general/general_save.png'),
+ QtGui.QIcon.Normal, QtGui.QIcon.Off)
self.SaveButton.setIcon(icon2)
self.SaveButton.setObjectName(u'SaveButton')
self.ManageButtonLayout.addWidget(self.SaveButton)
self.DeleteButton = QtGui.QPushButton(AlertDialog)
icon3 = QtGui.QIcon()
- icon3.addPixmap(QtGui.QPixmap(u':/general/general_delete.png'), QtGui.QIcon.Normal, QtGui.QIcon.Off)
+ icon3.addPixmap(QtGui.QPixmap(u':/general/general_delete.png'),
+ QtGui.QIcon.Normal, QtGui.QIcon.Off)
self.DeleteButton.setIcon(icon3)
self.DeleteButton.setObjectName(u'DeleteButton')
self.ManageButtonLayout.addWidget(self.DeleteButton)
- spacerItem = QtGui.QSpacerItem(20, 40, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding)
+ spacerItem = QtGui.QSpacerItem(20, 40, QtGui.QSizePolicy.Minimum,
+ QtGui.QSizePolicy.Expanding)
self.ManageButtonLayout.addItem(spacerItem)
self.ManagementLayout.addLayout(self.ManageButtonLayout)
self.AlertDialogLayout.addLayout(self.ManagementLayout)
@@ -122,7 +134,8 @@
self.AlertParameter.setBuddy(self.ParameterEdit)
self.retranslateUi(AlertDialog)
- QtCore.QObject.connect(self.CloseButton, QtCore.SIGNAL(u'clicked()'), AlertDialog.close)
+ QtCore.QObject.connect(self.CloseButton, QtCore.SIGNAL(u'clicked()'),
+ AlertDialog.close)
QtCore.QMetaObject.connectSlotsByName(AlertDialog)
AlertDialog.setTabOrder(self.AlertTextEdit, self.ParameterEdit)
AlertDialog.setTabOrder(self.ParameterEdit, self.AlertListWidget)
@@ -141,6 +154,7 @@
self.SaveButton.setText(translate('AlertForm', '&Save'))
self.DeleteButton.setText(translate('AlertForm', '&Delete'))
self.DisplayButton.setText(translate('AlertForm', 'Displ&ay'))
- self.DisplayCloseButton.setText(translate('AlertForm', 'Display && Cl&ose'))
+ self.DisplayCloseButton.setText(
+ translate('AlertForm', 'Display && Cl&ose'))
self.CloseButton.setText(translate('AlertForm', '&Close'))
=== modified file 'openlp/plugins/alerts/lib/manager.py'
--- openlp/plugins/alerts/lib/manager.py 2010-05-25 14:30:34 +0000
+++ openlp/plugins/alerts/lib/manager.py 2010-06-01 17:23:23 +0000
@@ -26,6 +26,7 @@
import logging
from PyQt4 import QtCore
+from sqlalchemy.exceptions import InvalidRequestError
from openlp.core.utils import AppLocation
from openlp.plugins.alerts.lib.models import init_models, metadata, AlertItem
@@ -80,7 +81,7 @@
self.session.commit()
log.debug(u'Alert saved')
return True
- except:
+ except InvalidRequestError:
self.session.rollback()
log.exception(u'Alert save failed')
return False
@@ -104,7 +105,7 @@
self.session.delete(alert_item)
self.session.commit()
return True
- except:
+ except InvalidRequestError:
self.session.rollback()
log.exception(u'Alert deleton failed')
return False
=== modified file 'openlp/plugins/alerts/lib/models.py'
--- openlp/plugins/alerts/lib/models.py 2010-03-21 23:58:01 +0000
+++ openlp/plugins/alerts/lib/models.py 2010-06-01 17:23:23 +0000
@@ -34,6 +34,6 @@
engine = create_engine(url)
metadata.bind = engine
session = scoped_session(sessionmaker(autoflush=True, autocommit=False,
- bind=engine))
+ bind=engine))
mapper(AlertItem, alerts_table)
return session
=== modified file 'openlp/plugins/bibles/forms/bibleimportwizard.py'
--- openlp/plugins/bibles/forms/bibleimportwizard.py 2010-05-25 16:16:43 +0000
+++ openlp/plugins/bibles/forms/bibleimportwizard.py 2010-06-01 17:23:23 +0000
@@ -308,29 +308,41 @@
QtCore.QMetaObject.connectSlotsByName(BibleImportWizard)
def retranslateUi(self, BibleImportWizard):
- BibleImportWizard.setWindowTitle(translate('ImportWizardForm', 'Bible Import Wizard'))
+ BibleImportWizard.setWindowTitle(
+ translate('ImportWizardForm', 'Bible Import Wizard'))
self.TitleLabel.setText(
u'<span style="font-size:14pt; font-weight:600;">%s</span>' % \
translate('ImportWizardForm', 'Welcome to the Bible Import Wizard'))
self.InformationLabel.setText(
- translate('ImportWizardForm', 'This wizard will help you to import Bibles from a '
+ translate('ImportWizardForm',
+ 'This wizard will help you to import Bibles from a '
'variety of formats. Click the next button below to start the '
'process by selecting a format to import from.'))
- self.SelectPage.setTitle(translate('ImportWizardForm', 'Select Import Source'))
- self.SelectPage.setSubTitle(
- translate('ImportWizardForm', 'Select the import format, and where to import from.'))
+ self.SelectPage.setTitle(
+ translate('ImportWizardForm', 'Select Import Source'))
+ self.SelectPage.setSubTitle(translate('ImportWizardForm',
+ 'Select the import format, and where to import from.'))
self.FormatLabel.setText(translate('ImportWizardForm', 'Format:'))
- self.FormatComboBox.setItemText(0, translate('ImportWizardForm', 'OSIS'))
+ self.FormatComboBox.setItemText(0,
+ translate('ImportWizardForm', 'OSIS'))
self.FormatComboBox.setItemText(1, translate('ImportWizardForm', 'CSV'))
- self.FormatComboBox.setItemText(2, translate('ImportWizardForm', 'OpenSong'))
- self.FormatComboBox.setItemText(3, translate('ImportWizardForm', 'Web Download'))
- self.OsisLocationLabel.setText(translate('ImportWizardForm', 'File Location:'))
- self.BooksLocationLabel.setText(translate('ImportWizardForm', 'Books Location:'))
- self.VerseLocationLabel.setText(translate('ImportWizardForm', 'Verse Location:'))
- self.OpenSongFileLabel.setText(translate('ImportWizardForm', 'Bible Filename:'))
+ self.FormatComboBox.setItemText(2,
+ translate('ImportWizardForm', 'OpenSong'))
+ self.FormatComboBox.setItemText(3,
+ translate('ImportWizardForm', 'Web Download'))
+ self.OsisLocationLabel.setText(
+ translate('ImportWizardForm', 'File Location:'))
+ self.BooksLocationLabel.setText(
+ translate('ImportWizardForm', 'Books Location:'))
+ self.VerseLocationLabel.setText(
+ translate('ImportWizardForm', 'Verse Location:'))
+ self.OpenSongFileLabel.setText(
+ translate('ImportWizardForm', 'Bible Filename:'))
self.LocationLabel.setText(translate('ImportWizardForm', 'Location:'))
- self.LocationComboBox.setItemText(0, translate('ImportWizardForm', 'Crosswalk'))
- self.LocationComboBox.setItemText(1, translate('ImportWizardForm', 'BibleGateway'))
+ self.LocationComboBox.setItemText(0,
+ translate('ImportWizardForm', 'Crosswalk'))
+ self.LocationComboBox.setItemText(1,
+ translate('ImportWizardForm', 'BibleGateway'))
self.BibleLabel.setText(translate('ImportWizardForm', 'Bible:'))
self.WebDownloadTabWidget.setTabText(
self.WebDownloadTabWidget.indexOf(self.DownloadOptionsTab),
@@ -341,16 +353,19 @@
self.WebDownloadTabWidget.setTabText(
self.WebDownloadTabWidget.indexOf(self.ProxyServerTab),
translate('ImportWizardForm', 'Proxy Server (Optional)'))
- self.LicenseDetailsPage.setTitle(translate('ImportWizardForm', 'License Details'))
- self.LicenseDetailsPage.setSubTitle(
- translate('ImportWizardForm', 'Set up the Bible\'s license details.'))
- self.VersionNameLabel.setText(translate('ImportWizardForm', 'Version Name:'))
+ self.LicenseDetailsPage.setTitle(
+ translate('ImportWizardForm', 'License Details'))
+ self.LicenseDetailsPage.setSubTitle(translate('ImportWizardForm',
+ 'Set up the Bible\'s license details.'))
+ self.VersionNameLabel.setText(
+ translate('ImportWizardForm', 'Version Name:'))
self.CopyrightLabel.setText(translate('ImportWizardForm', 'Copyright:'))
- self.PermissionLabel.setText(translate('ImportWizardForm', 'Permission:'))
+ self.PermissionLabel.setText(
+ translate('ImportWizardForm', 'Permission:'))
self.ImportPage.setTitle(translate('ImportWizardForm', 'Importing'))
- self.ImportPage.setSubTitle(
- translate('ImportWizardForm', 'Please wait while your Bible is imported.'))
- self.ImportProgressLabel.setText(translate('ImportWizardForm', 'Ready.'))
+ self.ImportPage.setSubTitle(translate('ImportWizardForm',
+ 'Please wait while your Bible is imported.'))
+ self.ImportProgressLabel.setText(
+ translate('ImportWizardForm', 'Ready.'))
self.ImportProgressBar.setFormat(u'%p%')
-
=== modified file 'openlp/plugins/bibles/forms/importwizardform.py'
--- openlp/plugins/bibles/forms/importwizardform.py 2010-05-17 20:48:16 +0000
+++ openlp/plugins/bibles/forms/importwizardform.py 2010-06-01 17:23:23 +0000
@@ -146,7 +146,8 @@
QtGui.QMessageBox.StandardButtons(QtGui.QMessageBox.Ok))
self.CsvVerseLocationEdit.setFocus()
return False
- elif self.field(u'source_format').toInt()[0] == BibleFormat.OpenSong:
+ elif self.field(u'source_format').toInt()[0] == \
+ BibleFormat.OpenSong:
if self.field(u'opensong_file').toString() == u'':
QtGui.QMessageBox.critical(self,
self.trUtf8('Invalid OpenSong Bible'),
@@ -159,7 +160,8 @@
elif self.currentId() == 2:
# License details
license_version = variant_to_unicode(self.field(u'license_version'))
- license_copyright = variant_to_unicode(self.field(u'license_copyright'))
+ license_copyright = variant_to_unicode(
+ self.field(u'license_copyright'))
if license_version == u'':
QtGui.QMessageBox.critical(self,
self.trUtf8('Empty Version Name'),
@@ -317,7 +319,7 @@
if not isinstance(name, unicode):
name = unicode(name, u'utf8')
self.web_bible_list[WebDownload.Crosswalk][ver] = name.strip()
- except:
+ except IOError:
log.exception(u'Crosswalk resources missing')
finally:
if books_file:
@@ -336,8 +338,9 @@
ver = unicode(ver, u'utf8')
if not isinstance(name, unicode):
name = unicode(name, u'utf8')
- self.web_bible_list[WebDownload.BibleGateway][ver] = name.strip()
- except:
+ self.web_bible_list[WebDownload.BibleGateway][ver] = \
+ name.strip()
+ except IOError:
log.exception(u'Biblegateway resources missing')
finally:
if books_file:
@@ -399,16 +402,19 @@
if not isinstance(bible_version, unicode):
bible_version = unicode(bible_version, u'utf8')
if download_location == WebDownload.Crosswalk:
- bible = self.web_bible_list[WebDownload.Crosswalk][bible_version]
+ bible = \
+ self.web_bible_list[WebDownload.Crosswalk][bible_version]
elif download_location == WebDownload.BibleGateway:
- bible = self.web_bible_list[WebDownload.BibleGateway][bible_version]
+ bible = \
+ self.web_bible_list[WebDownload.BibleGateway][bible_version]
importer = self.manager.import_bible(
BibleFormat.WebDownload,
name=license_version,
download_source=WebDownload.get_name(download_location),
download_name=bible,
proxy_server=variant_to_unicode(self.field(u'proxy_server')),
- proxy_username=variant_to_unicode(self.field(u'proxy_username')),
+ proxy_username=variant_to_unicode(
+ self.field(u'proxy_username')),
proxy_password=variant_to_unicode(self.field(u'proxy_password'))
)
success = importer.do_import()
@@ -428,4 +434,3 @@
self.cancelButton.setVisible(False)
Receiver.send_message(u'openlp_process_events')
-
=== modified file 'openlp/plugins/bibles/lib/common.py'
--- openlp/plugins/bibles/lib/common.py 2010-05-26 15:52:33 +0000
+++ openlp/plugins/bibles/lib/common.py 2010-06-01 17:23:23 +0000
@@ -30,7 +30,8 @@
import htmlentitydefs
only_verses = re.compile(r'([\w .]+)[ ]+([0-9]+)[ ]*[:|v|V][ ]*([0-9]+)'
- r'(?:[ ]*-[ ]*([0-9]+|end))?(?:[ ]*,[ ]*([0-9]+)(?:[ ]*-[ ]*([0-9]+|end))?)?',
+ r'(?:[ ]*-[ ]*([0-9]+|end))?(?:[ ]*,[ ]*([0-9]+)'
+ r'(?:[ ]*-[ ]*([0-9]+|end))?)?',
re.UNICODE)
chapter_range = re.compile(r'([\w .]+)[ ]+([0-9]+)[ ]*[:|v|V][ ]*'
r'([0-9]+|end)[ ]*-[ ]*([0-9]+)[ ]*[:|v|V][ ]*([0-9]+|end)',
=== modified file 'openlp/plugins/bibles/lib/csvbible.py'
--- openlp/plugins/bibles/lib/csvbible.py 2010-05-25 15:04:37 +0000
+++ openlp/plugins/bibles/lib/csvbible.py 2010-06-01 17:23:23 +0000
@@ -80,7 +80,7 @@
self.create_book(unicode(line[1], details['encoding']),
line[2], int(line[0]))
Receiver.send_message(u'openlp_process_events')
- except:
+ except IOError:
log.exception(u'Loading books from file failed')
success = False
finally:
@@ -109,7 +109,7 @@
unicode(line[3], details['encoding']))
Receiver.send_message(u'openlp_process_events')
self.commit()
- except:
+ except IOError:
log.exception(u'Loading verses from file failed')
success = False
finally:
=== modified file 'openlp/plugins/bibles/lib/db.py'
--- openlp/plugins/bibles/lib/db.py 2010-04-30 21:00:17 +0000
+++ openlp/plugins/bibles/lib/db.py 2010-06-01 17:23:23 +0000
@@ -87,8 +87,8 @@
unicode(settings.value(u'db hostname').toString()),
unicode(settings.value(u'db database').toString()))
settings.endGroup()
- self.metadata, self.session = init_models(db_url)
- self.metadata.create_all(checkfirst=True)
+ self.session = init_models(db_url)
+ metadata.create_all(checkfirst=True)
if u'file' in kwargs:
self.get_name()
@@ -123,7 +123,7 @@
try:
os.remove(self.db_file)
return True
- except:
+ except OSError:
return False
def register(self, wizard):
@@ -320,12 +320,14 @@
verses = self.session.query(Verse)
if text.find(u',') > -1:
or_clause = []
- keywords = [u'%%%s%%' % keyword.strip() for keyword in text.split(u',')]
+ keywords = [u'%%%s%%' % keyword.strip()
+ for keyword in text.split(u',')]
for keyword in keywords:
or_clause.append(Verse.text.like(keyword))
verses = verses.filter(or_(*or_clause))
else:
- keywords = [u'%%%s%%' % keyword.strip() for keyword in text.split(u' ')]
+ keywords = [u'%%%s%%' % keyword.strip()
+ for keyword in text.split(u' ')]
for keyword in keywords:
verses = verses.filter(Verse.text.like(keyword))
verses = verses.all()
=== modified file 'openlp/plugins/bibles/lib/http.py'
--- openlp/plugins/bibles/lib/http.py 2010-05-25 23:47:26 +0000
+++ openlp/plugins/bibles/lib/http.py 2010-06-01 17:23:23 +0000
@@ -33,8 +33,9 @@
from openlp.core.lib import Receiver
from openlp.core.utils import AppLocation
-from common import BibleCommon, SearchResults, unescape
-from db import BibleDB
+from openlp.plugins.bibles.lib.common import BibleCommon, SearchResults, \
+ unescape
+from openlp.plugins.bibles.lib.db import BibleDB
from openlp.plugins.bibles.lib.models import Book
log = logging.getLogger(__name__)
@@ -462,7 +463,8 @@
"""
Return the list of books.
"""
- return [Book.populate(name=book['name']) for book in HTTPBooks.get_books()]
+ return [Book.populate(name=book['name'])
+ for book in HTTPBooks.get_books()]
def lookup_book(self, book):
"""
=== modified file 'openlp/plugins/bibles/lib/manager.py'
--- openlp/plugins/bibles/lib/manager.py 2010-04-30 22:38:15 +0000
+++ openlp/plugins/bibles/lib/manager.py 2010-06-01 17:23:23 +0000
@@ -181,7 +181,7 @@
Returns a list of the names of available Bibles.
"""
log.debug(u'get_bibles')
- return [name for name, bible in self.db_cache.iteritems()]
+ return self.db_cache.keys()
def get_books(self, bible):
"""
=== modified file 'openlp/plugins/bibles/lib/mediaitem.py'
--- openlp/plugins/bibles/lib/mediaitem.py 2010-05-27 16:58:00 +0000
+++ openlp/plugins/bibles/lib/mediaitem.py 2010-06-01 17:23:23 +0000
@@ -460,10 +460,14 @@
if bible2:
bible2_verses = []
for scripture in self.lastReference:
- bible2_verses.extend(self.parent.manager.get_verses(bible2, scripture))
- bible2_version = self.parent.manager.get_meta_data(bible2, u'Version')
- bible2_copyright = self.parent.manager.get_meta_data(bible2, u'Copyright')
- bible2_permission = self.parent.manager.get_meta_data(bible2, u'Permissions')
+ bible2_verses.extend(self.parent.manager.get_verses(bible2,
+ scripture))
+ bible2_version = self.parent.manager.get_meta_data(bible2,
+ u'Version')
+ bible2_copyright = self.parent.manager.get_meta_data(bible2,
+ u'Copyright')
+ bible2_permission = self.parent.manager.get_meta_data(bible2,
+ u'Permissions')
if bible2_version:
bible2_version = bible2_version.value
else:
@@ -491,25 +495,30 @@
copyright = self._decodeQtObject(reference, 'copyright')
permission = self._decodeQtObject(reference, 'permission')
if self.parent.settings_tab.display_style == 1:
- verse_text = self.formatVerse(old_chapter, chapter, verse, u'(u', u')')
+ verse_text = self.formatVerse(old_chapter, chapter, verse,
+ u'(u', u')')
elif self.parent.settings_tab.display_style == 2:
- verse_text = self.formatVerse(old_chapter, chapter, verse, u'{', u'}')
+ verse_text = self.formatVerse(old_chapter, chapter, verse,
+ u'{', u'}')
elif self.parent.settings_tab.display_style == 3:
- verse_text = self.formatVerse(old_chapter, chapter, verse, u'[', u']')
+ verse_text = self.formatVerse(old_chapter, chapter, verse,
+ u'[', u']')
else:
- verse_text = self.formatVerse(old_chapter, chapter, verse, u'', u'')
+ verse_text = self.formatVerse(old_chapter, chapter, verse,
+ u'', u'')
old_chapter = chapter
footer = u'%s (%s %s)' % (book, version, copyright)
#If not found add to footer
if footer not in raw_footer:
raw_footer.append(footer)
if bible2:
- footer = u'%s (%s %s)' % (book, bible2_version, bible2_copyright)
+ footer = u'%s (%s %s)' % (book, bible2_version,
+ bible2_copyright)
#If not found add second version and copyright to footer
if footer not in raw_footer:
raw_footer.append(footer)
- bible_text = u'%s %s \n\n %s %s' % \
- (verse_text, text, verse_text, bible2_verses[item.row()].text)
+ bible_text = u'%s %s \n\n %s %s' % (verse_text, text,
+ verse_text, bible2_verses[item.row()].text)
raw_slides.append(bible_text)
bible_text = u''
else:
=== modified file 'openlp/plugins/bibles/lib/models.py'
--- openlp/plugins/bibles/lib/models.py 2010-05-28 00:26:49 +0000
+++ openlp/plugins/bibles/lib/models.py 2010-06-01 17:23:23 +0000
@@ -60,10 +60,9 @@
def init_models(db_url):
engine = create_engine(db_url)
metadata.bind = engine
- session = scoped_session(sessionmaker(autoflush=True,
- autocommit=False,
- bind=engine))
- return metadata, session
+ session = scoped_session(sessionmaker(autoflush=True, autocommit=False,
+ bind=engine))
+ return session
metadata = MetaData()
meta_table = Table(u'metadata', metadata,
=== modified file 'openlp/plugins/bibles/lib/opensong.py'
--- openlp/plugins/bibles/lib/opensong.py 2010-05-17 20:48:16 +0000
+++ openlp/plugins/bibles/lib/opensong.py 2010-06-01 17:23:23 +0000
@@ -97,7 +97,7 @@
QtCore.QString('%s %s %s' % (self.trUtf8('Importing'),\
db_book.name, chapter.attrib[u'n'])))
self.commit()
- except:
+ except IOError:
log.exception(u'Loading bible from OpenSong file failed')
success = False
finally:
=== modified file 'openlp/plugins/bibles/lib/osis.py'
--- openlp/plugins/bibles/lib/osis.py 2010-05-17 20:48:16 +0000
+++ openlp/plugins/bibles/lib/osis.py 2010-06-01 17:23:23 +0000
@@ -78,7 +78,7 @@
book = line.split(u',')
self.books[book[0]] = (book[1].lstrip().rstrip(),
book[2].lstrip().rstrip())
- except:
+ except IOError:
log.exception(u'OSIS bible import failed')
finally:
if fbibles:
@@ -104,7 +104,7 @@
try:
detect_file = open(self.filename, u'r')
details = chardet.detect(detect_file.read())
- except:
+ except IOError:
log.exception(u'Failed to detect OSIS file encoding')
return
finally:
@@ -173,7 +173,7 @@
self.wizard.incrementProgressBar(u'Finishing import...')
if match_count == 0:
success = False
- except:
+ except (ValueError, IOError):
log.exception(u'Loading bible from OSIS file failed')
success = False
finally:
@@ -185,4 +185,3 @@
else:
return success
-
=== modified file 'openlp/plugins/custom/lib/manager.py'
--- openlp/plugins/custom/lib/manager.py 2010-05-25 14:30:34 +0000
+++ openlp/plugins/custom/lib/manager.py 2010-06-01 17:23:23 +0000
@@ -26,6 +26,7 @@
import logging
from PyQt4 import QtCore
+from sqlalchemy.exceptions import InvalidRequestError
from openlp.core.utils import AppLocation
from openlp.plugins.custom.lib.models import init_models, metadata, CustomSlide
@@ -80,7 +81,7 @@
self.session.commit()
log.debug(u'Custom Slide saved')
return True
- except:
+ except InvalidRequestError:
self.session.rollback()
log.exception(u'Custom Slide save failed')
return False
@@ -104,7 +105,7 @@
self.session.delete(customslide)
self.session.commit()
return True
- except:
+ except InvalidRequestError:
self.session.rollback()
log.exception(u'Custom Slide deleton failed')
return False
=== modified file 'openlp/plugins/custom/lib/models.py'
--- openlp/plugins/custom/lib/models.py 2010-03-21 23:58:01 +0000
+++ openlp/plugins/custom/lib/models.py 2010-06-01 17:23:23 +0000
@@ -34,6 +34,6 @@
engine = create_engine(url)
metadata.bind = engine
session = scoped_session(sessionmaker(autoflush=True, autocommit=False,
- bind=engine))
+ bind=engine))
mapper(CustomSlide, custom_slide_table)
return session
=== modified file 'openlp/plugins/images/lib/mediaitem.py'
--- openlp/plugins/images/lib/mediaitem.py 2010-05-25 16:16:43 +0000
+++ openlp/plugins/images/lib/mediaitem.py 2010-06-01 17:23:23 +0000
@@ -117,7 +117,7 @@
try:
os.remove(
os.path.join(self.servicePath, unicode(text.text())))
- except:
+ except OSError:
#if not present do not worry
pass
self.ListView.takeItem(item.row())
@@ -126,7 +126,7 @@
def loadList(self, list):
for file in list:
- (path, filename) = os.path.split(unicode(file))
+ filename = os.path.split(unicode(file))[1]
thumb = os.path.join(self.servicePath, filename)
if os.path.exists(thumb):
if self.validate(file, thumb):
=== modified file 'openlp/plugins/media/lib/mediaitem.py'
--- openlp/plugins/media/lib/mediaitem.py 2010-05-25 16:16:43 +0000
+++ openlp/plugins/media/lib/mediaitem.py 2010-06-01 17:23:23 +0000
@@ -143,7 +143,7 @@
def loadList(self, list):
for file in list:
- (path, filename) = os.path.split(unicode(file))
+ filename = os.path.split(unicode(file))[1]
item_name = QtGui.QListWidgetItem(filename)
img = QtGui.QPixmap(u':/media/media_video.png').toImage()
item_name.setIcon(build_icon(img))
=== modified file 'openlp/plugins/presentations/lib/impresscontroller.py'
--- openlp/plugins/presentations/lib/impresscontroller.py 2010-05-24 22:37:20 +0000
+++ openlp/plugins/presentations/lib/impresscontroller.py 2010-06-01 17:23:23 +0000
@@ -176,14 +176,12 @@
return doc
class ImpressDocument(PresentationDocument):
-
def __init__(self, controller, presentation):
log.debug(u'Init Presentation OpenOffice')
- self.controller = controller
+ PresentationDocument.__init__(controller, presentation)
self.document = None
self.presentation = None
self.control = None
- self.store_filename(presentation)
def load_presentation(self):
"""
=== modified file 'openlp/plugins/presentations/lib/mediaitem.py'
--- openlp/plugins/presentations/lib/mediaitem.py 2010-05-25 16:16:43 +0000
+++ openlp/plugins/presentations/lib/mediaitem.py 2010-06-01 17:23:23 +0000
@@ -131,7 +131,7 @@
for file in list:
if currlist.count(file) > 0:
continue
- (path, filename) = os.path.split(unicode(file))
+ filename = os.path.split(unicode(file))[1]
if titles.count(filename) > 0:
QtGui.QMessageBox.critical(
self, self.trUtf8('File exists'), self.trUtf8(
=== modified file 'openlp/plugins/presentations/lib/messagelistener.py'
--- openlp/plugins/presentations/lib/messagelistener.py 2010-05-03 21:49:42 +0000
+++ openlp/plugins/presentations/lib/messagelistener.py 2010-06-01 17:23:23 +0000
@@ -256,35 +256,35 @@
self.previewHandler.slide(slide, isLive)
def first(self, message):
- isLive, item = self.decode_message(message)
+ isLive = self.decode_message(message)[0]
if isLive:
self.liveHandler.first()
else:
self.previewHandler.first()
def last(self, message):
- isLive, item = self.decode_message(message)
+ isLive = self.decode_message(message)[0]
if isLive:
self.liveHandler.last()
else:
self.previewHandler.last()
def next(self, message):
- isLive, item = self.decode_message(message)
+ isLive = self.decode_message(message)[0]
if isLive:
self.liveHandler.next()
else:
self.previewHandler.next()
def previous(self, message):
- isLive, item = self.decode_message(message)
+ isLive = self.decode_message(message)[0]
if isLive:
self.liveHandler.previous()
else:
self.previewHandler.previous()
def shutdown(self, message):
- isLive, item = self.decode_message(message)
+ isLive = self.decode_message(message)[0]
if isLive:
Receiver.send_message(u'maindisplay_show')
self.liveHandler.shutdown()
@@ -292,17 +292,17 @@
self.previewHandler.shutdown()
def hide(self, message):
- isLive, item = self.decode_message(message)
+ isLive = self.decode_message(message)[0]
if isLive:
self.liveHandler.stop()
def blank(self, message):
- isLive, item = self.decode_message(message)
+ isLive = self.decode_message(message)[0]
if isLive:
self.liveHandler.blank()
def unblank(self, message):
- isLive, item = self.decode_message(message)
+ isLive = self.decode_message(message)[0]
if isLive:
self.liveHandler.unblank()
=== modified file 'openlp/plugins/presentations/lib/powerpointcontroller.py'
--- openlp/plugins/presentations/lib/powerpointcontroller.py 2010-04-30 21:00:17 +0000
+++ openlp/plugins/presentations/lib/powerpointcontroller.py 2010-06-01 17:23:23 +0000
@@ -102,12 +102,10 @@
return doc
class PowerpointDocument(PresentationDocument):
-
def __init__(self, controller, presentation):
log.debug(u'Init Presentation Powerpoint')
+ PresentationDocument.__init__(controller, presentation)
self.presentation = None
- self.controller = controller
- self.store_filename(presentation)
def load_presentation(self):
"""
=== modified file 'openlp/plugins/presentations/lib/pptviewcontroller.py'
--- openlp/plugins/presentations/lib/pptviewcontroller.py 2010-05-24 22:37:20 +0000
+++ openlp/plugins/presentations/lib/pptviewcontroller.py 2010-06-01 17:23:23 +0000
@@ -102,11 +102,10 @@
class PptviewDocument(PresentationDocument):
def __init__(self, controller, presentation):
log.debug(u'Init Presentation PowerPoint')
+ PresentationDocument.__init__(controller, presentation)
self.presentation = None
self.pptid = None
self.blanked = False
- self.controller = controller
- self.store_filename(presentation)
def load_presentation(self):
"""
=== modified file 'openlp/plugins/presentations/lib/presentationcontroller.py'
--- openlp/plugins/presentations/lib/presentationcontroller.py 2010-05-24 22:37:20 +0000
+++ openlp/plugins/presentations/lib/presentationcontroller.py 2010-06-01 17:23:23 +0000
@@ -100,16 +100,17 @@
self.docs = []
self.plugin = plugin
self.name = name
- self.settingsSection = self.plugin.settingsSection
+ self.settings_section = self.plugin.settingsSection
self.available = self.check_available()
if self.available:
self.enabled = QtCore.QSettings().value(
- self.settingsSection + u'/' + name,
- QtCore.QVariant(QtCore.Qt.Unchecked)).toInt()[0] == QtCore.Qt.Checked
+ self.settings_section + u'/' + name,
+ QtCore.QVariant(QtCore.Qt.Unchecked)).toInt()[0] == \
+ QtCore.Qt.Checked
else:
self.enabled = False
self.thumbnailroot = os.path.join(
- AppLocation.get_section_data_path(self.settingsSection),
+ AppLocation.get_section_data_path(self.settings_section),
name, u'thumbnails')
self.thumbnailprefix = u'slide'
if not os.path.isdir(self.thumbnailroot):
@@ -123,7 +124,8 @@
def start_process(self):
"""
- Loads a running version of the presentation application in the background.
+ Loads a running version of the presentation application in the
+ background.
"""
pass
@@ -231,7 +233,10 @@
Cleans up/deletes any controller specific files created for
a file, e.g. thumbnails
"""
- shutil.rmtree(self.thumbnailpath)
+ try:
+ shutil.rmtree(self.thumbnailpath)
+ except OSError:
+ log.exception(u'Failed to delete presentation controller files')
def store_filename(self, presentation):
"""
@@ -388,3 +393,4 @@
The slide the notes are required for, starting at 1
"""
return ''
+
=== modified file 'openlp/plugins/remotes/lib/httpserver.py'
--- openlp/plugins/remotes/lib/httpserver.py 2010-05-26 15:52:33 +0000
+++ openlp/plugins/remotes/lib/httpserver.py 2010-06-01 17:23:23 +0000
@@ -191,7 +191,7 @@
path = os.path.normpath(os.path.join(self.parent.html_dir, filename))
if not path.startswith(self.parent.html_dir):
return None
- (fileroot, ext) = os.path.splitext(filename)
+ ext = os.path.splitext(filename)[1]
if ext == u'.html':
mimetype = u'text/html'
elif ext == u'.css':
=== modified file 'openlp/plugins/songs/forms/authorsdialog.py'
--- openlp/plugins/songs/forms/authorsdialog.py 2010-05-01 19:45:06 +0000
+++ openlp/plugins/songs/forms/authorsdialog.py 2010-06-01 17:23:23 +0000
@@ -74,7 +74,9 @@
QtCore.QMetaObject.connectSlotsByName(AuthorsDialog)
def retranslateUi(self, AuthorsDialog):
- AuthorsDialog.setWindowTitle(translate('AuthorsForm', 'Author Maintenance'))
+ AuthorsDialog.setWindowTitle(
+ translate('AuthorsForm', 'Author Maintenance'))
self.DisplayLabel.setText(translate('AuthorsForm', 'Display name:'))
self.FirstNameLabel.setText(translate('AuthorsForm', 'First name:'))
self.LastNameLabel.setText(translate('AuthorsForm', 'Last name:'))
+
=== modified file 'openlp/plugins/songs/forms/authorsform.py'
--- openlp/plugins/songs/forms/authorsform.py 2010-03-21 23:58:01 +0000
+++ openlp/plugins/songs/forms/authorsform.py 2010-06-01 17:23:23 +0000
@@ -37,11 +37,13 @@
"""
QtGui.QDialog.__init__(self, parent)
self.setupUi(self)
- self.autoDisplayName = False
+ self._autoDisplayName = False
QtCore.QObject.connect(self.FirstNameEdit,
- QtCore.SIGNAL(u'textEdited(QString)'), self.onFirstNameEditTextEdited)
+ QtCore.SIGNAL(u'textEdited(QString)'),
+ self.onFirstNameEditTextEdited)
QtCore.QObject.connect(self.LastNameEdit,
- QtCore.SIGNAL(u'textEdited(QString)'), self.onLastNameEditTextEdited)
+ QtCore.SIGNAL(u'textEdited(QString)'),
+ self.onLastNameEditTextEdited)
def exec_(self, clear=True):
if clear:
@@ -52,7 +54,7 @@
return QtGui.QDialog.exec_(self)
def onFirstNameEditTextEdited(self, text):
- if not self.autoDisplayName:
+ if not self._autoDisplayName:
return
display_name = text
if self.LastNameEdit.text() != u'':
@@ -60,7 +62,7 @@
self.DisplayEdit.setText(display_name)
def onLastNameEditTextEdited(self, text):
- if not self.autoDisplayName:
+ if not self._autoDisplayName:
return
display_name = text
if self.FirstNameEdit.text() != u'':
@@ -68,24 +70,20 @@
self.DisplayEdit.setText(display_name)
def autoDisplayName(self):
- return self.autoDisplayName
+ return self._autoDisplayName
def setAutoDisplayName(self, on):
- self.autoDisplayName = on
+ self._autoDisplayName = on
def accept(self):
if not self.FirstNameEdit.text():
- QtGui.QMessageBox.critical(
- self, self.trUtf8('Error'),
- self.trUtf8('You need to type in the first name of the author.'),
- QtGui.QMessageBox.StandardButtons(QtGui.QMessageBox.Ok))
+ QtGui.QMessageBox.critical(self, self.trUtf8('Error'), self.trUtf8(
+ 'You need to type in the first name of the author.'))
self.FirstNameEdit.setFocus()
return False
elif not self.LastNameEdit.text():
- QtGui.QMessageBox.critical(
- self, self.trUtf8('Error'),
- self.trUtf8('You need to type in the last name of the author.'),
- QtGui.QMessageBox.StandardButtons(QtGui.QMessageBox.Ok))
+ QtGui.QMessageBox.critical(self, self.trUtf8('Error'),
+ self.trUtf8('You need to type in the last name of the author.'))
self.LastNameEdit.setFocus()
return False
elif not self.DisplayEdit.text():
@@ -105,3 +103,4 @@
return False
else:
return QtGui.QDialog.accept(self)
+
=== modified file 'openlp/plugins/songs/forms/editsongform.py'
--- openlp/plugins/songs/forms/editsongform.py 2010-05-25 15:35:34 +0000
+++ openlp/plugins/songs/forms/editsongform.py 2010-06-01 17:23:23 +0000
@@ -569,7 +569,8 @@
verseId = unicode((item.data(QtCore.Qt.UserRole)).toString())
bits = verseId.split(u':')
sxml.add_verse_to_lyrics(bits[0], bits[1], unicode(item.text()))
- text = text + unicode(self.VerseListWidget.item(i, 0).text()) + u' '
+ text = text + unicode(self.VerseListWidget.item(i, 0).text()) \
+ + u' '
text = text.replace(u'\'', u'')
text = text.replace(u',', u'')
text = text.replace(u';', u'')
=== modified file 'openlp/plugins/songs/lib/manager.py'
--- openlp/plugins/songs/lib/manager.py 2010-05-17 20:48:16 +0000
+++ openlp/plugins/songs/lib/manager.py 2010-06-01 17:23:23 +0000
@@ -26,6 +26,7 @@
import logging
from PyQt4 import QtCore
+from sqlalchemy.exceptions import InvalidRequestError
from openlp.core.utils import AppLocation
from openlp.plugins.songs.lib.models import init_models, metadata, Song, \
@@ -161,7 +162,7 @@
self.session.add(song)
self.session.commit()
return True
- except:
+ except InvalidRequestError:
log.exception(u'Could not save song to song database')
self.session.rollback()
return False
@@ -172,7 +173,7 @@
self.session.delete(song)
self.session.commit()
return True
- except:
+ except InvalidRequestError:
self.session.rollback()
log.exception(u'Could not delete song from song database')
return False
@@ -203,7 +204,7 @@
self.session.add(author)
self.session.commit()
return True
- except:
+ except InvalidRequestError:
self.session.rollback()
log.exception(u'Could not save author to song database')
return False
@@ -217,7 +218,7 @@
self.session.delete(author)
self.session.commit()
return True
- except:
+ except InvalidRequestError:
self.session.rollback()
log.exception(u'Could not delete author from song database')
return False
@@ -248,7 +249,7 @@
self.session.add(topic)
self.session.commit()
return True
- except:
+ except InvalidRequestError:
self.session.rollback()
log.exception(u'Could not save topic to song database')
return False
@@ -262,7 +263,7 @@
self.session.delete(topic)
self.session.commit()
return True
- except:
+ except InvalidRequestError:
self.session.rollback()
log.exception(u'Could not delete topic from song database')
return False
@@ -293,7 +294,7 @@
self.session.add(book)
self.session.commit()
return True
- except:
+ except InvalidRequestError:
self.session.rollback()
log.exception(u'Could not save book to song database')
return False
@@ -307,10 +308,11 @@
self.session.delete(book)
self.session.commit()
return True
- except:
+ except InvalidRequestError:
self.session.rollback()
log.exception(u'Could not delete book from song database')
return False
def get_songs_for_theme(self, theme):
return self.session.query(Song).filter(Song.theme_name == theme).all()
+
=== modified file 'openlp/plugins/songs/lib/models.py'
--- openlp/plugins/songs/lib/models.py 2010-03-21 23:58:01 +0000
+++ openlp/plugins/songs/lib/models.py 2010-06-01 17:23:23 +0000
@@ -33,15 +33,16 @@
def init_models(url):
engine = create_engine(url)
metadata.bind = engine
- session = scoped_session(sessionmaker(autoflush=False,
- autocommit=False, bind=engine))
+ session = scoped_session(sessionmaker(autoflush=False, autocommit=False,
+ bind=engine))
mapper(Author, authors_table)
mapper(Book, song_books_table)
mapper(Song, songs_table,
- properties={'authors': relation(Author, backref='songs',
- secondary=authors_songs_table),
- 'book': relation(Book, backref='songs'),
- 'topics': relation(Topic, backref='songs',
- secondary=songs_topics_table)})
+ properties={'authors': relation(Author, backref='songs',
+ secondary=authors_songs_table),
+ 'book': relation(Book, backref='songs'),
+ 'topics': relation(Topic, backref='songs',
+ secondary=songs_topics_table)})
mapper(Topic, topics_table)
return session
+
=== modified file 'openlp/plugins/songs/lib/oooimport.py'
--- openlp/plugins/songs/lib/oooimport.py 2010-04-13 07:33:58 +0000
+++ openlp/plugins/songs/lib/oooimport.py 2010-06-01 17:23:23 +0000
@@ -24,7 +24,9 @@
###############################################################################
import os
+
from PyQt4 import QtCore
+
from songimport import SongImport
if os.name == u'nt':
@@ -35,9 +37,11 @@
else:
try:
import uno
- from com.sun.star.style.BreakType import PAGE_BEFORE, PAGE_AFTER, PAGE_BOTH
- except:
+ from com.sun.star.style.BreakType import PAGE_BEFORE, PAGE_AFTER, \
+ PAGE_BOTH
+ except ImportError:
pass
+
class OooImport(object):
"""
Import songs from Impress/Powerpoint docs using Impress
@@ -75,7 +79,8 @@
"""
if os.name == u'nt':
self.start_ooo_process()
- self.desktop = self.manager.createInstance(u'com.sun.star.frame.Desktop')
+ self.desktop = self.manager.createInstance(
+ u'com.sun.star.frame.Desktop')
else:
context = uno.getComponentContext()
resolver = context.ServiceManager.createInstanceWithContext(
@@ -101,8 +106,8 @@
self.manager._FlagAsMethod(u'Bridge_GetStruct')
self.manager._FlagAsMethod(u'Bridge_GetValueObject')
else:
- cmd = u'openoffice.org -nologo -norestore -minimized -invisible ' \
- + u'-nofirststartwizard ' \
+ cmd = u'openoffice.org -nologo -norestore -minimized ' \
+ + u'-invisible -nofirststartwizard ' \
+ '-accept="socket,host=localhost,port=2002;urp;"'
process = QtCore.QProcess()
process.startDetached(cmd)
=== modified file 'openlp/plugins/songs/lib/songxml.py'
--- openlp/plugins/songs/lib/songxml.py 2010-05-26 15:52:33 +0000
+++ openlp/plugins/songs/lib/songxml.py 2010-06-01 17:23:23 +0000
@@ -60,7 +60,7 @@
# TODO: Song: Import ChangingSong
# TODO: Song: Export ChangingSong
-_blankOpenSongXml = \
+_BLANK_OPENSONG_XML = \
'''<?xml version="1.0" encoding="UTF-8"?>
<song>
<title></title>
@@ -84,7 +84,7 @@
def _reset(self):
"""Reset all song attributes"""
- self._setFromXml(_blankOpenSongXml, 'song')
+ self._setFromXml(_BLANK_OPENSONG_XML, 'song')
def from_buffer(self, xmlContent):
"""Initialize from buffer(string) with xml content"""
@@ -288,7 +288,7 @@
osfile.close()
xml = "".join(list)
self.from_opensong_buffer(xml)
- except:
+ except IOError:
log.exception(u'Failed to load opensong xml file')
finally:
if osfile:
@@ -394,7 +394,7 @@
ccli_file = open(textFileName, 'r')
lines = [orgline.rstrip() for orgline in ccli_file]
self.from_ccli_text_buffer(lines)
- except:
+ except IOError:
log.exception(u'Failed to load CCLI text file')
finally:
if ccli_file:
=== modified file 'openlp/plugins/songs/lib/xml.py'
--- openlp/plugins/songs/lib/xml.py 2010-04-03 16:43:29 +0000
+++ openlp/plugins/songs/lib/xml.py 2010-06-01 17:23:23 +0000
@@ -24,6 +24,7 @@
###############################################################################
from lxml import objectify
+from lxml.etree import XMLSyntaxError
class LyricsXML(object):
"""
@@ -73,7 +74,7 @@
})
self.lyrics.append(language)
return True
- except:
+ except XMLSyntaxError:
return False
def extract(self, text):
=== modified file 'openlp/plugins/songusage/forms/songusagedetailform.py'
--- openlp/plugins/songusage/forms/songusagedetailform.py 2010-05-25 16:16:43 +0000
+++ openlp/plugins/songusage/forms/songusagedetailform.py 2010-06-01 17:23:23 +0000
@@ -85,7 +85,7 @@
(instance.usagedate,instance.usagetime, instance.title,
instance.copyright, instance.ccl_number , instance.authors)
file.write(record)
- except:
+ except IOError:
log.exception(u'Failed to write out song usage records')
finally:
if file:
=== modified file 'openlp/plugins/songusage/lib/manager.py'
--- openlp/plugins/songusage/lib/manager.py 2010-05-25 14:30:34 +0000
+++ openlp/plugins/songusage/lib/manager.py 2010-06-01 17:23:23 +0000
@@ -26,6 +26,7 @@
import logging
from PyQt4 import QtCore
+from sqlalchemy.exceptions import InvalidRequestError
from openlp.core.utils import AppLocation
from openlp.plugins.songusage.lib.models import init_models, metadata, \
@@ -87,7 +88,7 @@
self.session.add(songusageitem)
self.session.commit()
return True
- except:
+ except InvalidRequestError:
self.session.rollback()
log.exception(u'SongUsage item failed to save')
return False
@@ -111,7 +112,7 @@
self.session.delete(songusageitem)
self.session.commit()
return True
- except:
+ except InvalidRequestError:
self.session.rollback()
log.exception(u'SongUsage Item failed to delete')
return False
@@ -126,7 +127,7 @@
self.session.query(SongUsageItem).delete(synchronize_session=False)
self.session.commit()
return True
- except:
+ except InvalidRequestError:
self.session.rollback()
log.exception(u'Failed to delete all Song Usage items')
return False
@@ -141,7 +142,8 @@
.delete(synchronize_session=False)
self.session.commit()
return True
- except:
+ except InvalidRequestError:
self.session.rollback()
log.exception(u'Failed to delete all Song Usage items to %s' % date)
return False
+
=== modified file 'openlp/plugins/songusage/lib/models.py'
--- openlp/plugins/songusage/lib/models.py 2010-03-21 23:58:01 +0000
+++ openlp/plugins/songusage/lib/models.py 2010-06-01 17:23:23 +0000
@@ -34,6 +34,6 @@
engine = create_engine(url)
metadata.bind = engine
session = scoped_session(sessionmaker(autoflush=True, autocommit=False,
- bind=engine))
+ bind=engine))
mapper(SongUsageItem, songusage_table)
return session
Follow ups