openlp-core team mailing list archive
-
openlp-core team
-
Mailing list archive
-
Message #01628
[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/26003
Your team OpenLP Core is requested to review the proposed merge of lp:~meths/openlp/trivialfixes into lp:openlp.
=== modified file '.bzrignore'
--- .bzrignore 2010-04-27 21:30:04 +0000
+++ .bzrignore 2010-05-26 01:17:24 +0000
@@ -15,3 +15,4 @@
build
resources/innosetup/Output
_eric4project
+.pylint.d
=== modified file 'openlp/core/lib/__init__.py'
--- openlp/core/lib/__init__.py 2010-04-30 19:23:02 +0000
+++ openlp/core/lib/__init__.py 2010-05-26 01:17:24 +0000
@@ -132,6 +132,9 @@
return action
def contextMenuSeparator(base):
+ """
+ Add a separator to a context menu
+ """
action = QtGui.QAction(u'', base)
action.setSeparator(True)
return action
@@ -150,7 +153,8 @@
realw = preview.width()
realh = preview.height()
# and move it to the centre of the preview space
- newImage = QtGui.QImage(width, height, QtGui.QImage.Format_ARGB32_Premultiplied)
+ newImage = QtGui.QImage(
+ width, height, QtGui.QImage.Format_ARGB32_Premultiplied)
newImage.fill(QtCore.Qt.black)
painter = QtGui.QPainter(newImage)
painter.drawImage((width - realw) / 2, (height - realh) / 2, preview)
@@ -158,6 +162,9 @@
class ThemeLevel(object):
+ """
+ Provides an enumeration for the level a theme applies to
+ """
Global = 1
Service = 2
Song = 3
@@ -178,5 +185,4 @@
from themexmlhandler import ThemeXML
from renderer import Renderer
from rendermanager import RenderManager
-from mediamanageritem import MediaManagerItem
from baselistwithdnd import BaseListWithDnD
=== modified file 'openlp/core/lib/eventreceiver.py'
--- openlp/core/lib/eventreceiver.py 2010-05-01 12:10:48 +0000
+++ openlp/core/lib/eventreceiver.py 2010-05-26 01:17:24 +0000
@@ -230,7 +230,7 @@
self.emit(QtCore.SIGNAL(event), msg)
-class Receiver():
+class Receiver(object):
"""
Class to allow events to be passed from different parts of the system. This
is a static wrapper around the ``EventReceiver`` class. As there is only
=== modified file 'openlp/core/lib/mediamanageritem.py'
--- openlp/core/lib/mediamanageritem.py 2010-05-01 13:05:17 +0000
+++ openlp/core/lib/mediamanageritem.py 2010-05-26 01:17:24 +0000
@@ -367,7 +367,7 @@
def IconFromFile(self, file, thumb):
icon = build_icon(unicode(file))
- pixmap = icon.pixmap(QtCore.QSize(88,50))
+ pixmap = icon.pixmap(QtCore.QSize(88, 50))
ext = os.path.splitext(thumb)[1].lower()
pixmap.save(thumb, ext[1:])
return icon
=== modified file 'openlp/core/lib/renderer.py'
--- openlp/core/lib/renderer.py 2010-05-15 06:44:36 +0000
+++ openlp/core/lib/renderer.py 2010-05-26 01:17:24 +0000
@@ -474,7 +474,7 @@
# draw a box around the text - debug only
if self._debug:
- self.painter.setPen(QtGui.QPen(QtGui.QColor(0,255,0)))
+ self.painter.setPen(QtGui.QPen(QtGui.QColor(0, 255, 0)))
self.painter.drawRect(startx, starty, rightextent-startx, y-starty)
brcorner = (rightextent, y)
self.painter.end()
=== modified file 'openlp/core/lib/serviceitem.py'
--- openlp/core/lib/serviceitem.py 2010-05-10 18:19:45 +0000
+++ openlp/core/lib/serviceitem.py 2010-05-26 01:17:24 +0000
@@ -43,12 +43,12 @@
Command = 3
class ItemCapabilities(object):
- AllowsPreview = 1
- AllowsEdit = 2
- AllowsMaintain = 3
- RequiresMedia = 4
- AllowsLoop = 5
- AllowsAdditions = 6
+ AllowsPreview = 1
+ AllowsEdit = 2
+ AllowsMaintain = 3
+ RequiresMedia = 4
+ AllowsLoop = 5
+ AllowsAdditions = 6
class ServiceItem(object):
"""
@@ -159,7 +159,7 @@
frame = self.RenderManager.generate_slide(format,
self.raw_footer)
else:
- frame = self.RenderManager.generate_slide(format,u'')
+ frame = self.RenderManager.generate_slide(format, u'')
self.cache[row] = frame
return frame
=== modified file 'openlp/core/lib/themexmlhandler.py'
--- openlp/core/lib/themexmlhandler.py 2010-04-24 07:21:35 +0000
+++ openlp/core/lib/themexmlhandler.py 2010-05-26 01:17:24 +0000
@@ -30,7 +30,7 @@
from openlp.core.lib import str_to_bool
-blankthemexml=\
+blankthemexml = \
'''<?xml version="1.0" encoding="utf-8"?>
<theme version="1.0">
<name>BlankStyle</name>
@@ -215,7 +215,7 @@
The height of the text block.
"""
background = self.theme_xml.createElement(u'font')
- background.setAttribute(u'type',fonttype)
+ background.setAttribute(u'type', fonttype)
self.theme.appendChild(background)
#Create Font name element
self.child_element(background, u'name', name)
@@ -230,11 +230,12 @@
#Create indentation name element
self.child_element(background, u'indentation', unicode(indentation))
#Create indentation name element
- self.child_element(background, u'line_adjustment', unicode(line_adjustment))
+ self.child_element(
+ background, u'line_adjustment', unicode(line_adjustment))
#Create Location element
element = self.theme_xml.createElement(u'location')
- element.setAttribute(u'override',override)
+ element.setAttribute(u'override', override)
if override == u'True':
element.setAttribute(u'x', xpos)
element.setAttribute(u'y', ypos)
=== modified file 'openlp/core/lib/xmlrootclass.py'
--- openlp/core/lib/xmlrootclass.py 2010-03-21 23:58:01 +0000
+++ openlp/core/lib/xmlrootclass.py 2010-05-26 01:17:24 +0000
@@ -102,3 +102,4 @@
if not attrib.startswith(u'_'):
result += u'_%s_' % getattr(self, attrib)
return result
+
=== modified file 'openlp/core/theme/__init__.py'
--- openlp/core/theme/__init__.py 2010-03-21 23:58:01 +0000
+++ openlp/core/theme/__init__.py 2010-05-26 01:17:24 +0000
@@ -23,4 +23,4 @@
# Temple Place, Suite 330, Boston, MA 02111-1307 USA #
###############################################################################
-from theme import Theme
+from openlp.core.theme.theme import Theme
=== modified file 'openlp/core/theme/theme.py'
--- openlp/core/theme/theme.py 2010-03-21 23:58:01 +0000
+++ openlp/core/theme/theme.py 2010-05-26 01:17:24 +0000
@@ -28,13 +28,13 @@
from xml.etree.ElementTree import ElementTree, XML
from PyQt4 import QtGui
-DelphiColors={"clRed":0xFF0000,
+DelphiColors = {"clRed":0xFF0000,
"clBlue":0x0000FF,
"clYellow":0xFFFF00,
- "clBlack":0x000000,
- "clWhite":0xFFFFFF}
+ "clBlack":0x000000,
+ "clWhite":0xFFFFFF}
-blankstylexml=\
+blankstylexml = \
'''<?xml version="1.0" encoding="iso-8859-1"?>
<Theme>
<Name>BlankStyle</Name>
@@ -136,12 +136,15 @@
except ValueError:
val = t
if (element.tag.find(u'Color') > 0 or
- (element.tag.find(u'BackgroundParameter') == 0 and type(val) == type(0))):
+ (element.tag.find(u'BackgroundParameter') == 0 and
+ type(val) == type(0))):
# convert to a wx.Colour
- if not delphiColorChange:
- val = QtGui.QColor(val&0xFF, (val>>8)&0xFF, (val>>16)&0xFF)
- else:
- val = QtGui.QColor((val>>16)&0xFF, (val>>8)&0xFF, val&0xFF)
+ if not delphiColorChange:
+ val = QtGui.QColor(
+ val&0xFF, (val>>8)&0xFF, (val>>16)&0xFF)
+ else:
+ val = QtGui.QColor(
+ (val>>16)&0xFF, (val>>8)&0xFF, val&0xFF)
setattr(self, element.tag, val)
def __str__(self):
=== modified file 'openlp/core/ui/displaytab.py'
--- openlp/core/ui/displaytab.py 2010-05-16 15:39:58 +0000
+++ openlp/core/ui/displaytab.py 2010-05-26 01:17:24 +0000
@@ -222,8 +222,8 @@
self.postSetUp()
def postSetUp(self):
- self.screens.override[u'size'] = QtCore.QRect(int(self.XposEdit.text()),\
- int(self.YposEdit.text()), int(self.WidthEdit.text()),\
+ self.screens.override[u'size'] = QtCore.QRect(int(self.XposEdit.text()),
+ int(self.YposEdit.text()), int(self.WidthEdit.text()),
int(self.HeightEdit.text()))
if self.amend_display:
self.screens.set_override_display()
@@ -233,3 +233,4 @@
if self.amend_display_start != self.amend_display:
self.amend_display_start = self.amend_display
Receiver.send_message(u'config_screen_changed')
+
=== modified file 'openlp/core/ui/mainwindow.py'
--- openlp/core/ui/mainwindow.py 2010-05-17 18:39:28 +0000
+++ openlp/core/ui/mainwindow.py 2010-05-26 01:17:24 +0000
@@ -352,11 +352,13 @@
translate('MainWindow', 'Theme Manager'))
self.FileNewItem.setText(translate('MainWindow', '&New'))
self.FileNewItem.setToolTip(translate('MainWindow', 'New Service'))
- self.FileNewItem.setStatusTip(translate('MainWindow', 'Create a new Service'))
+ self.FileNewItem.setStatusTip(
+ translate('MainWindow', 'Create a new Service'))
self.FileNewItem.setShortcut(translate('MainWindow', 'Ctrl+N'))
self.FileOpenItem.setText(translate('MainWindow', '&Open'))
self.FileOpenItem.setToolTip(translate('MainWindow', 'Open Service'))
- self.FileOpenItem.setStatusTip(translate('MainWindow', 'Open an existing service'))
+ self.FileOpenItem.setStatusTip(
+ translate('MainWindow', 'Open an existing service'))
self.FileOpenItem.setShortcut(translate('MainWindow', 'Ctrl+O'))
self.FileSaveItem.setText(translate('MainWindow', '&Save'))
self.FileSaveItem.setToolTip(translate('MainWindow', 'Save Service'))
@@ -364,9 +366,10 @@
translate('MainWindow', 'Save the current service to disk'))
self.FileSaveItem.setShortcut(translate('MainWindow', 'Ctrl+S'))
self.FileSaveAsItem.setText(translate('MainWindow', 'Save &As...'))
- self.FileSaveAsItem.setToolTip(translate('MainWindow', 'Save Service As'))
- self.FileSaveAsItem.setStatusTip(
- translate('MainWindow', 'Save the current service under a new name'))
+ self.FileSaveAsItem.setToolTip(
+ translate('MainWindow', 'Save Service As'))
+ self.FileSaveAsItem.setStatusTip(translate('MainWindow',
+ 'Save the current service under a new name'))
self.FileSaveAsItem.setShortcut(translate('MainWindow', 'F12'))
self.FileExitItem.setText(translate('MainWindow', 'E&xit'))
self.FileExitItem.setStatusTip(translate('MainWindow', 'Quit OpenLP'))
@@ -377,34 +380,40 @@
self.ExportLanguageItem.setText(translate('MainWindow', '&Language'))
self.actionLook_Feel.setText(translate('MainWindow', 'Look && &Feel'))
self.OptionsSettingsItem.setText(translate('MainWindow', '&Settings'))
- self.ViewMediaManagerItem.setText(translate('MainWindow', '&Media Manager'))
+ self.ViewMediaManagerItem.setText(
+ translate('MainWindow', '&Media Manager'))
self.ViewMediaManagerItem.setToolTip(
translate('MainWindow', 'Toggle Media Manager'))
- self.ViewMediaManagerItem.setStatusTip(
- translate('MainWindow', 'Toggle the visibility of the Media Manager'))
+ self.ViewMediaManagerItem.setStatusTip(translate('MainWindow',
+ 'Toggle the visibility of the Media Manager'))
self.ViewMediaManagerItem.setShortcut(translate('MainWindow', 'F8'))
- self.ViewThemeManagerItem.setText(translate('MainWindow', '&Theme Manager'))
+ self.ViewThemeManagerItem.setText(
+ translate('MainWindow', '&Theme Manager'))
self.ViewThemeManagerItem.setToolTip(
translate('MainWindow', 'Toggle Theme Manager'))
- self.ViewThemeManagerItem.setStatusTip(
- translate('MainWindow', 'Toggle the visibility of the Theme Manager'))
+ self.ViewThemeManagerItem.setStatusTip(translate('MainWindow',
+ 'Toggle the visibility of the Theme Manager'))
self.ViewThemeManagerItem.setShortcut(translate('MainWindow', 'F10'))
- self.ViewServiceManagerItem.setText(translate('MainWindow', '&Service Manager'))
+ self.ViewServiceManagerItem.setText(
+ translate('MainWindow', '&Service Manager'))
self.ViewServiceManagerItem.setToolTip(
translate('MainWindow', 'Toggle Service Manager'))
- self.ViewServiceManagerItem.setStatusTip(
- translate('MainWindow', 'Toggle the visibility of the Service Manager'))
+ self.ViewServiceManagerItem.setStatusTip(translate('MainWindow',
+ 'Toggle the visibility of the Service Manager'))
self.ViewServiceManagerItem.setShortcut(translate('MainWindow', 'F9'))
- self.action_Preview_Panel.setText(translate('MainWindow', '&Preview Panel'))
+ self.action_Preview_Panel.setText(
+ translate('MainWindow', '&Preview Panel'))
self.action_Preview_Panel.setToolTip(
translate('MainWindow', 'Toggle Preview Panel'))
- self.action_Preview_Panel.setStatusTip(
- translate('MainWindow', 'Toggle the visibility of the Preview Panel'))
+ self.action_Preview_Panel.setStatusTip(translate('MainWindow',
+ 'Toggle the visibility of the Preview Panel'))
self.action_Preview_Panel.setShortcut(translate('MainWindow', 'F11'))
self.PluginItem.setText(translate('MainWindow', '&Plugin List'))
- self.PluginItem.setStatusTip(translate('MainWindow', 'List the Plugins'))
+ self.PluginItem.setStatusTip(
+ translate('MainWindow', 'List the Plugins'))
self.PluginItem.setShortcut(translate('MainWindow', 'Alt+F7'))
- self.HelpDocumentationItem.setText(translate('MainWindow', '&User Guide'))
+ self.HelpDocumentationItem.setText(
+ translate('MainWindow', '&User Guide'))
self.HelpAboutItem.setText(translate('MainWindow', '&About'))
self.HelpAboutItem.setStatusTip(
translate('MainWindow', 'More information about OpenLP'))
@@ -417,12 +426,13 @@
translate('MainWindow', 'Choose System language, if available'))
for item in self.LanguageGroup.actions():
item.setText(item.objectName())
- item.setStatusTip(
- translate('MainWindow', 'Set the interface language to %1').arg(item.objectName()))
+ item.setStatusTip(translate('MainWindow',
+ 'Set the interface language to %1').arg(item.objectName()))
self.ToolsAddToolItem.setText(translate('MainWindow', 'Add &Tool...'))
self.ToolsAddToolItem.setStatusTip(
translate('MainWindow', 'Add an application to the list of tools'))
- self.action_Preview_Panel.setText(translate('MainWindow', '&Preview Pane'))
+ self.action_Preview_Panel.setText(
+ translate('MainWindow', '&Preview Pane'))
self.ModeLiveItem.setText(translate('MainWindow', '&Live'))
=== modified file 'openlp/core/ui/servicemanager.py'
--- openlp/core/ui/servicemanager.py 2010-05-23 07:03:28 +0000
+++ openlp/core/ui/servicemanager.py 2010-05-26 01:17:24 +0000
@@ -810,8 +810,8 @@
if self.serviceItems and item < len(self.serviceItems) and \
self.serviceItems[item][u'service_item'].is_capable(
ItemCapabilities.AllowsPreview):
- self.parent.PreviewController.addServiceManagerItem(
- self.serviceItems[item][u'service_item'], 0)
+ self.parent.PreviewController.addServiceManagerItem(
+ self.serviceItems[item][u'service_item'], 0)
else:
QtGui.QMessageBox.critical(self,
self.trUtf8('Missing Display Handler'),
@@ -897,17 +897,18 @@
#we are over somthing so lets investigate
pos = self._getParentItemData(item) - 1
serviceItem = self.serviceItems[pos]
- if plugin == serviceItem[u'service_item'].name \
- and serviceItem[u'service_item'].is_capable(ItemCapabilities.AllowsAdditions):
- action = self.dndMenu.exec_(QtGui.QCursor.pos())
- #New action required
- if action == self.newAction:
- self.droppos = self._getParentItemData(item)
- #Append to existing action
- if action == self.addToAction:
- self.droppos = self._getParentItemData(item)
- item.setSelected(True)
- replace = True
+ if (plugin == serviceItem[u'service_item'].name and
+ serviceItem[u'service_item'].is_capable(
+ ItemCapabilities.AllowsAdditions)):
+ action = self.dndMenu.exec_(QtGui.QCursor.pos())
+ #New action required
+ if action == self.newAction:
+ self.droppos = self._getParentItemData(item)
+ #Append to existing action
+ if action == self.addToAction:
+ self.droppos = self._getParentItemData(item)
+ item.setSelected(True)
+ replace = True
else:
self.droppos = self._getParentItemData(item)
Receiver.send_message(u'%s_add_service_item' % plugin, replace)
=== modified file 'openlp/core/ui/slidecontroller.py'
--- openlp/core/ui/slidecontroller.py 2010-05-23 07:03:28 +0000
+++ openlp/core/ui/slidecontroller.py 2010-05-26 01:17:24 +0000
@@ -426,11 +426,12 @@
self.Toolbar.makeWidgetsVisible([u'Song Menu'])
if item.is_capable(ItemCapabilities.AllowsLoop) and \
len(item.get_frames()) > 1:
- self.Toolbar.makeWidgetsVisible(self.loopList)
+ self.Toolbar.makeWidgetsVisible(self.loopList)
if item.is_media():
self.Toolbar.setVisible(False)
self.Mediabar.setVisible(True)
- #self.volumeSlider.setAudioOutput(self.mainDisplay.videoDisplay.audio)
+ #self.volumeSlider.setAudioOutput(
+ # self.mainDisplay.videoDisplay.audio)
def enablePreviewToolBar(self, item):
"""
=== modified file 'openlp/core/ui/thememanager.py'
--- openlp/core/ui/thememanager.py 2010-04-30 22:38:15 +0000
+++ openlp/core/ui/thememanager.py 2010-05-26 01:17:24 +0000
@@ -73,7 +73,7 @@
self.Layout.addWidget(self.Toolbar)
self.ThemeListWidget = QtGui.QListWidget(self)
self.ThemeListWidget.setAlternatingRowColors(True)
- self.ThemeListWidget.setIconSize(QtCore.QSize(88,50))
+ self.ThemeListWidget.setIconSize(QtCore.QSize(88, 50))
self.Layout.addWidget(self.ThemeListWidget)
self.ThemeListWidget.setContextMenuPolicy(QtCore.Qt.ActionsContextMenu)
self.ThemeListWidget.addAction(
@@ -285,7 +285,7 @@
icon = build_icon(thumb)
else:
icon = build_icon(theme)
- pixmap = icon.pixmap(QtCore.QSize(88,50))
+ pixmap = icon.pixmap(QtCore.QSize(88, 50))
pixmap.save(thumb, u'png')
item_name.setIcon(icon)
item_name.setData(QtCore.Qt.UserRole,
@@ -450,8 +450,6 @@
'would you like to overwrite it?'),
(QtGui.QMessageBox.Yes | QtGui.QMessageBox.No),
QtGui.QMessageBox.No)
- else:
- result == QtGui.QMessageBox.Yes
if result == QtGui.QMessageBox.Yes:
# Save the theme, overwriting the existing theme if necessary.
outfile = None
@@ -485,7 +483,7 @@
frame.save(samplepathname, u'png')
thumb = os.path.join(self.thumbPath, u'%s.png' % name)
icon = build_icon(frame)
- pixmap = icon.pixmap(QtCore.QSize(88,50))
+ pixmap = icon.pixmap(QtCore.QSize(88, 50))
pixmap.save(thumb, u'png')
log.debug(u'Theme image written to %s', samplepathname)
=== modified file 'openlp/core/utils/__init__.py'
--- openlp/core/utils/__init__.py 2010-04-30 19:23:02 +0000
+++ openlp/core/utils/__init__.py 2010-05-26 01:17:24 +0000
@@ -186,4 +186,5 @@
from languagemanager import LanguageManager
-__all__ = [u'AppLocation', u'check_latest_version', u'add_actions', u'LanguageManager']
+__all__ = [u'AppLocation', u'check_latest_version', u'add_actions',
+ u'LanguageManager']
=== modified file 'openlp/migration/display.py'
--- openlp/migration/display.py 2010-03-21 23:58:01 +0000
+++ openlp/migration/display.py 2010-05-26 01:17:24 +0000
@@ -27,7 +27,7 @@
log = logging.getLogger(__name__)
-class Display():
+class Display(object):
log.info(u'Display Class loaded')
@staticmethod
=== modified file 'openlp/migration/migratebibles.py'
--- openlp/migration/migratebibles.py 2010-04-28 03:16:49 +0000
+++ openlp/migration/migratebibles.py 2010-05-26 01:17:24 +0000
@@ -27,7 +27,6 @@
import sys
import sqlite3
-from sqlalchemy import *
from sqlalchemy import create_engine
from sqlalchemy.orm import scoped_session, sessionmaker, mapper
@@ -35,22 +34,6 @@
from openlp.core.utils import AppLocation
from openlp.plugins.bibles.lib.models import *
-class BaseModel(object):
- """
- BaseModel provides a base object with a set of generic functions
- """
-
- @classmethod
- def populate(cls, **kwargs):
- """
- Creates an instance of a class and populates it, returning the instance
- """
- me = cls()
- keys = kwargs.keys()
- for key in keys:
- me.__setattr__(key, kwargs[key])
- return me
-
class TBibleMeta(BaseModel):
"""
Bible Meta Data
@@ -109,7 +92,7 @@
autocommit=False, bind=engine))
return session
-class MigrateBibles():
+class MigrateBibles(object):
def __init__(self, display):
self.display = display
self.data_path = AppLocation.get_section_data_path(u'bibles')
=== modified file 'openlp/migration/migratefiles.py'
--- openlp/migration/migratefiles.py 2010-04-28 03:16:49 +0000
+++ openlp/migration/migratefiles.py 2010-05-26 01:17:24 +0000
@@ -25,7 +25,7 @@
from openlp.core.utils import AppLocation
-class MigrateFiles():
+class MigrateFiles(object):
def __init__(self, display):
self.display = display
=== modified file 'openlp/migration/migratesongs.py'
--- openlp/migration/migratesongs.py 2010-04-30 21:00:17 +0000
+++ openlp/migration/migratesongs.py 2010-05-26 01:17:24 +0000
@@ -75,21 +75,6 @@
Column(u'authorid', types.Integer, primary_key=True),
Column(u'songid', types.Integer)
)
-class BaseModel(object):
- """
- BaseModel provides a base object with a set of generic functions
- """
-
- @classmethod
- def populate(cls, **kwargs):
- """
- Creates an instance of a class and populates it, returning the instance
- """
- me = cls()
- keys = kwargs.keys()
- for key in keys:
- me.__setattr__(key, kwargs[key])
- return me
class TAuthor(BaseModel):
"""
@@ -109,7 +94,7 @@
"""
pass
-class MigrateSongs():
+class MigrateSongs(object):
def __init__(self, display):
self.display = display
self.data_path = AppLocation.get_section_data_path(u'songs')
=== modified file 'openlp/plugins/alerts/lib/alertsmanager.py'
--- openlp/plugins/alerts/lib/alertsmanager.py 2010-05-01 12:10:48 +0000
+++ openlp/plugins/alerts/lib/alertsmanager.py 2010-05-26 01:17:24 +0000
@@ -67,7 +67,7 @@
- self.alertHeight
self.alertHeight = self.screen[u'size'].height() \
- self.alertScreenPosition
- self.parent.maindisplay.setAlertSize(self.alertScreenPosition,\
+ self.parent.maindisplay.setAlertSize(self.alertScreenPosition,
self.alertHeight)
def onAlertText(self, message):
=== modified file 'openlp/plugins/alerts/lib/manager.py'
--- openlp/plugins/alerts/lib/manager.py 2010-04-28 14:17:42 +0000
+++ openlp/plugins/alerts/lib/manager.py 2010-05-26 01:17:24 +0000
@@ -32,7 +32,7 @@
log = logging.getLogger(__name__)
-class DBManager():
+class DBManager(object):
"""
The Song Manager provides a central location for all database code. This
class takes care of connecting to the database and running all the queries.
@@ -70,13 +70,13 @@
"""
return self.session.query(AlertItem).order_by(AlertItem.text).all()
- def save_alert(self, AlertItem):
+ def save_alert(self, alert_item):
"""
Saves a Alert show to the database
"""
log.debug(u'Alert added')
try:
- self.session.add(AlertItem)
+ self.session.add(alert_item)
self.session.commit()
log.debug(u'Alert saved')
return True
@@ -99,9 +99,9 @@
Delete a Alert show
"""
if id != 0:
- AlertItem = self.get_alert(id)
+ alert_item = self.get_alert(id)
try:
- self.session.delete(AlertItem)
+ self.session.delete(alert_item)
self.session.commit()
return True
except:
@@ -110,3 +110,4 @@
return False
else:
return True
+
=== modified file 'openlp/plugins/bibles/forms/bibleimportwizard.py'
--- openlp/plugins/bibles/forms/bibleimportwizard.py 2010-05-17 20:48:16 +0000
+++ openlp/plugins/bibles/forms/bibleimportwizard.py 2010-05-26 01:17:24 +0000
@@ -277,7 +277,7 @@
self.CopyrightEdit)
self.PermissionLabel = QtGui.QLabel(self.LicenseDetailsPage)
self.PermissionLabel.setObjectName(u'PermissionLabel')
- self.LicenseDetailsLayout.setWidget(2, QtGui.QFormLayout.LabelRole,\
+ self.LicenseDetailsLayout.setWidget(2, QtGui.QFormLayout.LabelRole,
self.PermissionLabel)
self.PermissionEdit = QtGui.QLineEdit(self.LicenseDetailsPage)
self.PermissionEdit.setObjectName(u'PermissionEdit')
=== modified file 'openlp/plugins/bibles/lib/csvbible.py'
--- openlp/plugins/bibles/lib/csvbible.py 2010-05-17 20:48:16 +0000
+++ openlp/plugins/bibles/lib/csvbible.py 2010-05-26 01:17:24 +0000
@@ -27,6 +27,8 @@
import chardet
import csv
+from PyQt4 import QtCore
+
from openlp.core.lib import Receiver
from db import BibleDB
@@ -89,7 +91,7 @@
verse_file = None
try:
book_ptr = None
- verse_file = open(versesfile, 'r')
+ verse_file = open(self.versesfile, 'r')
dialect = csv.Sniffer().sniff(verse_file.read(1024))
verse_file.seek(0)
verse_reader = csv.reader(verse_file, dialect)
=== modified file 'openlp/plugins/bibles/lib/http.py'
--- openlp/plugins/bibles/lib/http.py 2010-04-16 07:31:01 +0000
+++ openlp/plugins/bibles/lib/http.py 2010-05-26 01:17:24 +0000
@@ -418,12 +418,13 @@
Receiver.send_message(u'bibles_nobook')
return []
db_book = self.create_book(book_details[u'name'],
- book_details[u'abbreviation'], book_details[u'testament_id'])
+ book_details[u'abbreviation'],
+ book_details[u'testament_id'])
book = db_book.name
if BibleDB.get_verse_count(self, book, reference[1]) == 0:
Receiver.send_message(u'bibles_showprogress')
Receiver.send_message(u'openlp_process_events')
- search_results = self.get_chapter(self.name, book, reference[1])
+ search_results = self.get_chapter(book, reference[1])
if search_results and search_results.has_verselist():
## We have found a book of the bible lets check to see
## if it was there. By reusing the returned book name
@@ -433,18 +434,19 @@
Receiver.send_message(u'openlp_process_events')
# check to see if book/chapter exists
db_book = self.get_book(bookname)
- self.create_chapter(db_book.id, search_results.get_chapter(),
+ self.create_chapter(db_book.id,
+ search_results.get_chapter(),
search_results.get_verselist())
Receiver.send_message(u'openlp_process_events')
Receiver.send_message(u'bibles_hideprogress')
Receiver.send_message(u'openlp_process_events')
return BibleDB.get_verses(self, reference_list)
- def get_chapter(self, version, book, chapter):
+ def get_chapter(self, book, chapter):
"""
Receive the request and call the relevant handler methods
"""
- log.debug(u'get_chapter %s, %s, %s', version, book, chapter)
+ log.debug(u'get_chapter %s, %s', book, chapter)
log.debug(u'source = %s', self.download_source)
try:
if self.download_source.lower() == u'crosswalk':
=== modified file 'openlp/plugins/custom/forms/editcustomform.py'
--- openlp/plugins/custom/forms/editcustomform.py 2010-04-30 21:00:17 +0000
+++ openlp/plugins/custom/forms/editcustomform.py 2010-05-26 01:17:24 +0000
@@ -211,8 +211,8 @@
for row in range(0, self.VerseListView.count()):
item = self.VerseListView.item(row)
verse_list += item.text()
- if row != self.VerseListView.count() - 1:
- verse_list += u'\n[---]\n'
+ if row != self.VerseListView.count() - 1:
+ verse_list += u'\n[---]\n'
self.editText(verse_list)
def editText(self, text):
=== modified file 'openlp/plugins/custom/lib/manager.py'
--- openlp/plugins/custom/lib/manager.py 2010-04-28 14:17:42 +0000
+++ openlp/plugins/custom/lib/manager.py 2010-05-26 01:17:24 +0000
@@ -32,7 +32,7 @@
log = logging.getLogger(__name__)
-class CustomManager():
+class CustomManager(object):
"""
The Song Manager provides a central location for all database code. This
class takes care of connecting to the database and running all the queries.
=== modified file 'openlp/plugins/images/lib/mediaitem.py'
--- openlp/plugins/images/lib/mediaitem.py 2010-05-01 22:02:31 +0000
+++ openlp/plugins/images/lib/mediaitem.py 2010-05-26 01:17:24 +0000
@@ -75,7 +75,7 @@
self.ListView.clear()
self.ListView.setSelectionMode(
QtGui.QAbstractItemView.ExtendedSelection)
- self.ListView.setIconSize(QtCore.QSize(88,50))
+ self.ListView.setIconSize(QtCore.QSize(88, 50))
self.servicePath = os.path.join(
AppLocation.get_section_data_path(self.settingsSection),
u'thumbnails')
=== modified file 'openlp/plugins/media/lib/mediaitem.py'
--- openlp/plugins/media/lib/mediaitem.py 2010-04-30 22:38:15 +0000
+++ openlp/plugins/media/lib/mediaitem.py 2010-05-26 01:17:24 +0000
@@ -129,7 +129,7 @@
def initialise(self):
self.ListView.setSelectionMode(
QtGui.QAbstractItemView.ExtendedSelection)
- self.ListView.setIconSize(QtCore.QSize(88,50))
+ self.ListView.setIconSize(QtCore.QSize(88, 50))
self.loadList(SettingsManager.load_list(
self.settingsSection, self.settingsSection))
=== modified file 'openlp/plugins/presentations/lib/impresscontroller.py'
--- openlp/plugins/presentations/lib/impresscontroller.py 2010-04-30 21:00:17 +0000
+++ openlp/plugins/presentations/lib/impresscontroller.py 2010-05-26 01:17:24 +0000
@@ -354,10 +354,10 @@
self.control.gotoSlideIndex(slideno-1)
def next_step(self):
- """
- Triggers the next effect of slide on the running presentation
- """
- self.control.gotoNextEffect()
+ """
+ Triggers the next effect of slide on the running presentation
+ """
+ self.control.gotoNextEffect()
def previous_step(self):
"""
=== modified file 'openlp/plugins/presentations/lib/mediaitem.py'
--- openlp/plugins/presentations/lib/mediaitem.py 2010-05-06 16:49:12 +0000
+++ openlp/plugins/presentations/lib/mediaitem.py 2010-05-26 01:17:24 +0000
@@ -109,7 +109,7 @@
self.servicePath = os.path.join(
AppLocation.get_section_data_path(self.settingsSection),
u'thumbnails')
- self.ListView.setIconSize(QtCore.QSize(88,50))
+ self.ListView.setIconSize(QtCore.QSize(88, 50))
if not os.path.exists(self.servicePath):
os.mkdir(self.servicePath)
list = SettingsManager.load_list(
=== modified file 'openlp/plugins/presentations/lib/pptviewcontroller.py'
--- openlp/plugins/presentations/lib/pptviewcontroller.py 2010-04-30 21:00:17 +0000
+++ openlp/plugins/presentations/lib/pptviewcontroller.py 2010-05-26 01:17:24 +0000
@@ -73,7 +73,7 @@
self.start_process()
return self.process.CheckInstalled()
except:
- return False
+ return False
def start_process(self):
"""
=== modified file 'openlp/plugins/presentations/lib/presentationcontroller.py'
--- openlp/plugins/presentations/lib/presentationcontroller.py 2010-05-06 20:30:08 +0000
+++ openlp/plugins/presentations/lib/presentationcontroller.py 2010-05-26 01:17:24 +0000
@@ -151,7 +151,7 @@
if doc is None:
return
if doc in self.docs:
- self.docs.remove(doc)
+ self.docs.remove(doc)
def close_presentation(self):
pass
=== modified file 'openlp/plugins/songs/forms/editsongform.py'
--- openlp/plugins/songs/forms/editsongform.py 2010-05-20 16:43:18 +0000
+++ openlp/plugins/songs/forms/editsongform.py 2010-05-26 01:17:24 +0000
@@ -127,8 +127,8 @@
authorsCompleter = QtGui.QCompleter(
[author.display_name for author in authors],
self.AuthorsSelectionComboItem)
- authorsCompleter.setCaseSensitivity(QtCore.Qt.CaseInsensitive);
- self.AuthorsSelectionComboItem.setCompleter(authorsCompleter);
+ authorsCompleter.setCaseSensitivity(QtCore.Qt.CaseInsensitive)
+ self.AuthorsSelectionComboItem.setCompleter(authorsCompleter)
self.AuthorsSelectionComboItem.clear()
for author in authors:
row = self.AuthorsSelectionComboItem.count()
@@ -139,10 +139,9 @@
def loadTopics(self):
topics = self.songmanager.get_topics()
topicsCompleter = QtGui.QCompleter(
- [topic.name for topic in topics],
- self.SongTopicCombo)
- topicsCompleter.setCaseSensitivity(QtCore.Qt.CaseInsensitive);
- self.SongTopicCombo.setCompleter(topicsCompleter);
+ [topic.name for topic in topics], self.SongTopicCombo)
+ topicsCompleter.setCaseSensitivity(QtCore.Qt.CaseInsensitive)
+ self.SongTopicCombo.setCompleter(topicsCompleter)
self.SongTopicCombo.clear()
for topic in topics:
row = self.SongTopicCombo.count()
@@ -153,8 +152,8 @@
books = self.songmanager.get_books()
booksCompleter = QtGui.QCompleter(
[book.name for book in books], self.SongbookCombo)
- booksCompleter.setCaseSensitivity(QtCore.Qt.CaseInsensitive);
- self.SongbookCombo.setCompleter(booksCompleter);
+ booksCompleter.setCaseSensitivity(QtCore.Qt.CaseInsensitive)
+ self.SongbookCombo.setCompleter(booksCompleter)
self.SongbookCombo.clear()
self.SongbookCombo.addItem(u' ')
for book in books:
@@ -166,8 +165,8 @@
themesCompleter = QtGui.QCompleter(
[theme for theme in theme_list],
self.ThemeSelectionComboItem)
- themesCompleter.setCaseSensitivity(QtCore.Qt.CaseInsensitive);
- self.ThemeSelectionComboItem.setCompleter(themesCompleter);
+ themesCompleter.setCaseSensitivity(QtCore.Qt.CaseInsensitive)
+ self.ThemeSelectionComboItem.setCompleter(themesCompleter)
self.ThemeSelectionComboItem.clear()
self.ThemeSelectionComboItem.addItem(u' ')
for theme in theme_list:
=== modified file 'openlp/plugins/songs/forms/songmaintenanceform.py'
--- openlp/plugins/songs/forms/songmaintenanceform.py 2010-04-07 19:10:47 +0000
+++ openlp/plugins/songs/forms/songmaintenanceform.py 2010-05-26 01:17:24 +0000
@@ -81,7 +81,7 @@
return -1
def _deleteItem(self, list_widget, get_func, del_func, reset_func,
- dlg_title, del_text, err_text, sel_text):
+ dlg_title, del_text, err_text, sel_text):
item_id = self._getCurrentItemId(list_widget)
if item_id != -1:
item = get_func(item_id)
@@ -93,11 +93,9 @@
del_func(item.id)
reset_func()
else:
- QtGui.QMessageBox.critical(self, dlg_title, err_text,
- QtGui.QMessageBox.StandardButtons(QtGui.QMessageBox.Ok))
+ QtGui.QMessageBox.critical(self, dlg_title, err_text)
else:
- QtGui.QMessageBox.critical(self, dlg_title, sel_text,
- QtGui.QMessageBox.StandardButtons(QtGui.QMessageBox.Ok))
+ QtGui.QMessageBox.critical(self, dlg_title, sel_text)
def resetAuthors(self):
self.AuthorsListWidget.clear()
@@ -131,39 +129,41 @@
self.authorform.setAutoDisplayName(True)
if self.authorform.exec_():
author = Author.populate(
- first_name=unicode(self.authorform.FirstNameEdit.text(), u'utf-8'),
- last_name=unicode(self.authorform.LastNameEdit.text(), u'utf-8'),
- display_name=unicode(self.authorform.DisplayEdit.text(), u'utf-8'))
+ first_name=unicode(
+ self.authorform.FirstNameEdit.text(), u'utf-8'),
+ last_name=unicode(
+ self.authorform.LastNameEdit.text(), u'utf-8'),
+ display_name=unicode(
+ self.authorform.DisplayEdit.text(), u'utf-8'))
if self.songmanager.save_author(author):
self.resetAuthors()
else:
QtGui.QMessageBox.critical(
self, self.trUtf8('Error'),
- self.trUtf8('Couldn\'t add your author.'),
- QtGui.QMessageBox.StandardButtons(QtGui.QMessageBox.Ok))
+ self.trUtf8('Couldn\'t add your author.'))
def onTopicAddButtonClick(self):
if self.topicform.exec_():
- topic = Topic.populate(name=unicode(self.topicform.NameEdit.text(), u'utf-8'))
+ topic = Topic.populate(
+ name=unicode(self.topicform.NameEdit.text(), u'utf-8'))
if self.songmanager.save_topic(topic):
self.resetTopics()
else:
QtGui.QMessageBox.critical(
self, self.trUtf8('Error'),
- self.trUtf8('Couldn\'t add your topic.'),
- QtGui.QMessageBox.StandardButtons(QtGui.QMessageBox.Ok))
+ self.trUtf8('Couldn\'t add your topic.'))
def onBookAddButtonClick(self):
if self.bookform.exec_():
- book = Book.populate(name=unicode(self.bookform.NameEdit.text(), u'utf-8'),
+ book = Book.populate(
+ name=unicode(self.bookform.NameEdit.text(), u'utf-8'),
publisher=unicode(self.bookform.PublisherEdit.text(), u'utf-8'))
if self.songmanager.save_book(book):
self.resetBooks()
else:
QtGui.QMessageBox.critical(
self, self.trUtf8('Error'),
- self.trUtf8('Couldn\'t add your book.'),
- QtGui.QMessageBox.StandardButtons(QtGui.QMessageBox.Ok))
+ self.trUtf8('Couldn\'t add your book.'))
def onAuthorEditButtonClick(self):
author_id = self._getCurrentItemId(self.AuthorsListWidget)
@@ -174,16 +174,18 @@
self.authorform.LastNameEdit.setText(author.last_name)
self.authorform.DisplayEdit.setText(author.display_name)
if self.authorform.exec_(False):
- author.first_name = unicode(self.authorform.FirstNameEdit.text(), u'utf-8')
- author.last_name = unicode(self.authorform.LastNameEdit.text(), u'utf-8')
- author.display_name = unicode(self.authorform.DisplayEdit.text(), u'utf-8')
+ author.first_name = unicode(
+ self.authorform.FirstNameEdit.text(), u'utf-8')
+ author.last_name = unicode(
+ self.authorform.LastNameEdit.text(), u'utf-8')
+ author.display_name = unicode(
+ self.authorform.DisplayEdit.text(), u'utf-8')
if self.songmanager.save_author(author):
self.resetAuthors()
else:
QtGui.QMessageBox.critical(
self, self.trUtf8('Error'),
- self.trUtf8('Couldn\'t save your author.'),
- QtGui.QMessageBox.StandardButtons(QtGui.QMessageBox.Ok))
+ self.trUtf8('Couldn\'t save your author.'))
def onTopicEditButtonClick(self):
topic_id = self._getCurrentItemId(self.TopicsListWidget)
@@ -197,8 +199,7 @@
else:
QtGui.QMessageBox.critical(
self, self.trUtf8('Error'),
- self.trUtf8('Couldn\'t save your topic.'),
- QtGui.QMessageBox.StandardButtons(QtGui.QMessageBox.Ok))
+ self.trUtf8('Couldn\'t save your topic.'))
def onBookEditButtonClick(self):
book_id = self._getCurrentItemId(self.BooksListWidget)
@@ -208,14 +209,14 @@
self.bookform.PublisherEdit.setText(book.publisher)
if self.bookform.exec_(False):
book.name = unicode(self.bookform.NameEdit.text(), u'utf-8')
- book.publisher = unicode(self.bookform.PublisherEdit.text(), u'utf-8')
+ book.publisher = unicode(
+ self.bookform.PublisherEdit.text(), u'utf-8')
if self.songmanager.save_book(book):
self.resetBooks()
else:
QtGui.QMessageBox.critical(
self, self.trUtf8('Error'),
- self.trUtf8('Couldn\'t save your book.'),
- QtGui.QMessageBox.StandardButtons(QtGui.QMessageBox.Ok))
+ self.trUtf8('Couldn\'t save your book.'))
def onAuthorDeleteButtonClick(self):
"""
=== modified file 'openlp/plugins/songs/lib/classes.py'
--- openlp/plugins/songs/lib/classes.py 2010-03-21 23:58:01 +0000
+++ openlp/plugins/songs/lib/classes.py 2010-05-26 01:17:24 +0000
@@ -50,7 +50,8 @@
Book model
"""
def __repr__(self):
- return u'<Book id="%s" name="%s" publisher="%s" />' % (str(self.id), self.name, self.publisher)
+ return u'<Book id="%s" name="%s" publisher="%s" />' % (
+ str(self.id), self.name, self.publisher)
class Song(BaseModel):
"""
=== modified file 'openlp/plugins/songs/lib/mediaitem.py'
--- openlp/plugins/songs/lib/mediaitem.py 2010-05-23 07:03:28 +0000
+++ openlp/plugins/songs/lib/mediaitem.py 2010-05-26 01:17:24 +0000
@@ -270,7 +270,7 @@
self.edit_song_form.loadSong(fields[1], (fields[0] == u'P'))
self.edit_song_form.exec_()
- def onEditClick(self, preview=False):
+ def onEditClick(self):
item = self.ListView.currentItem()
if item:
item_id = (item.data(QtCore.Qt.UserRole)).toInt()[0]
@@ -283,7 +283,8 @@
if len(items) == 1:
del_message = self.trUtf8('Delete song?')
else:
- del_message = unicode(self.trUtf8('Delete %d songs?')) % len(items)
+ del_message = unicode(
+ self.trUtf8('Delete %d songs?')) % len(items)
ans = QtGui.QMessageBox.question(self,
self.trUtf8('Delete Confirmation'), del_message,
QtGui.QMessageBox.StandardButtons(QtGui.QMessageBox.Ok|
@@ -323,7 +324,8 @@
#no verse list or only 1 space (in error)
if not song.verse_order or not song.verse_order.strip():
for verse in verseList:
- verseTag = u'%s:%s' % (verse[0][u'type'], verse[0][u'label'])
+ verseTag = u'%s:%s' % (
+ verse[0][u'type'], verse[0][u'label'])
service_item.add_from_text(\
verse[1][:30], unicode(verse[1]), verseTag)
else:
@@ -372,4 +374,3 @@
]
return True
-
=== modified file 'openlp/plugins/songs/lib/sofimport.py'
--- openlp/plugins/songs/lib/sofimport.py 2010-04-19 18:43:20 +0000
+++ openlp/plugins/songs/lib/sofimport.py 2010-05-26 01:17:24 +0000
@@ -67,7 +67,7 @@
Initialise the class. Requires a songmanager class which is passed
to SongImport for writing song to disk
"""
- OooImport.__init__(self,songmanager)
+ OooImport.__init__(self, songmanager)
def import_sof(self, filename):
self.start_ooo()
@@ -332,105 +332,205 @@
Because someone at Kingsway forgot to check the 1+2 RTF file,
some verses were not formatted correctly.
"""
- if song_number == 11: return 8
- if song_number == 18: return 5
- if song_number == 21: return 6
- if song_number == 23: return 4
- if song_number == 24: return 7
- if song_number == 27: return 4
- if song_number == 31: return 6
- if song_number == 49: return 4
- if song_number == 50: return 8
- if song_number == 70: return 4
- if song_number == 75: return 8
- if song_number == 79: return 6
- if song_number == 97: return 7
- if song_number == 107: return 4
- if song_number == 109: return 4
- if song_number == 133: return 4
- if song_number == 155: return 10
- if song_number == 156: return 8
- if song_number == 171: return 4
- if song_number == 188: return 7
- if song_number == 192: return 4
- if song_number == 208: return 8
- if song_number == 215: return 8
- if song_number == 220: return 4
- if song_number == 247: return 6
- if song_number == 248: return 6
- if song_number == 251: return 8
- if song_number == 295: return 8
- if song_number == 307: return 5
- if song_number == 314: return 6
- if song_number == 325: return 8
- if song_number == 386: return 6
- if song_number == 415: return 4
- if song_number == 426: return 4
- if song_number == 434: return 5
- if song_number == 437: return 4
- if song_number == 438: return 6
- if song_number == 456: return 8
- if song_number == 461: return 4
- if song_number == 469: return 4
- if song_number == 470: return 5
- if song_number == 476: return 6
- if song_number == 477: return 7
- if song_number == 480: return 8
- if song_number == 482: return 4
- if song_number == 512: return 4
- if song_number == 513: return 8
- if song_number == 518: return 5
- if song_number == 520: return 4
- if song_number == 523: return 6
- if song_number == 526: return 8
- if song_number == 527: return 4
- if song_number == 529: return 4
- if song_number == 537: return 4
- if song_number == 555: return 6
- if song_number == 581: return 4
- if song_number == 589: return 6
- if song_number == 590: return 4
- if song_number == 593: return 8
- if song_number == 596: return 4
- if song_number == 610: return 6
- if song_number == 611: return 6
- if song_number == 619: return 8
- if song_number == 645: return 5
- if song_number == 653: return 6
- if song_number == 683: return 7
- if song_number == 686: return 4
- if song_number == 697: return 8
- if song_number == 698: return 4
- if song_number == 704: return 6
- if song_number == 716: return 4
- if song_number == 717: return 6
- if song_number == 730: return 4
- if song_number == 731: return 8
- if song_number == 732: return 8
- if song_number == 738: return 4
- if song_number == 756: return 9
- if song_number == 815: return 6
- if song_number == 830: return 8
- if song_number == 831: return 4
- if song_number == 876: return 6
- if song_number == 877: return 6
- if song_number == 892: return 4
- if song_number == 894: return 6
- if song_number == 902: return 8
- if song_number == 905: return 8
- if song_number == 921: return 6
- if song_number == 940: return 7
- if song_number == 955: return 9
- if song_number == 968: return 8
- if song_number == 972: return 7
- if song_number == 974: return 4
- if song_number == 988: return 6
- if song_number == 991: return 5
- if song_number == 1002: return 8
- if song_number == 1024: return 8
- if song_number == 1044: return 9
- if song_number == 1088: return 6
- if song_number == 1117: return 6
- if song_number == 1119: return 7
+ if song_number == 11:
+ return 8
+ if song_number == 18:
+ return 5
+ if song_number == 21:
+ return 6
+ if song_number == 23:
+ return 4
+ if song_number == 24:
+ return 7
+ if song_number == 27:
+ return 4
+ if song_number == 31:
+ return 6
+ if song_number == 49:
+ return 4
+ if song_number == 50:
+ return 8
+ if song_number == 70:
+ return 4
+ if song_number == 75:
+ return 8
+ if song_number == 79:
+ return 6
+ if song_number == 97:
+ return 7
+ if song_number == 107:
+ return 4
+ if song_number == 109:
+ return 4
+ if song_number == 133:
+ return 4
+ if song_number == 155:
+ return 10
+ if song_number == 156:
+ return 8
+ if song_number == 171:
+ return 4
+ if song_number == 188:
+ return 7
+ if song_number == 192:
+ return 4
+ if song_number == 208:
+ return 8
+ if song_number == 215:
+ return 8
+ if song_number == 220:
+ return 4
+ if song_number == 247:
+ return 6
+ if song_number == 248:
+ return 6
+ if song_number == 251:
+ return 8
+ if song_number == 295:
+ return 8
+ if song_number == 307:
+ return 5
+ if song_number == 314:
+ return 6
+ if song_number == 325:
+ return 8
+ if song_number == 386:
+ return 6
+ if song_number == 415:
+ return 4
+ if song_number == 426:
+ return 4
+ if song_number == 434:
+ return 5
+ if song_number == 437:
+ return 4
+ if song_number == 438:
+ return 6
+ if song_number == 456:
+ return 8
+ if song_number == 461:
+ return 4
+ if song_number == 469:
+ return 4
+ if song_number == 470:
+ return 5
+ if song_number == 476:
+ return 6
+ if song_number == 477:
+ return 7
+ if song_number == 480:
+ return 8
+ if song_number == 482:
+ return 4
+ if song_number == 512:
+ return 4
+ if song_number == 513:
+ return 8
+ if song_number == 518:
+ return 5
+ if song_number == 520:
+ return 4
+ if song_number == 523:
+ return 6
+ if song_number == 526:
+ return 8
+ if song_number == 527:
+ return 4
+ if song_number == 529:
+ return 4
+ if song_number == 537:
+ return 4
+ if song_number == 555:
+ return 6
+ if song_number == 581:
+ return 4
+ if song_number == 589:
+ return 6
+ if song_number == 590:
+ return 4
+ if song_number == 593:
+ return 8
+ if song_number == 596:
+ return 4
+ if song_number == 610:
+ return 6
+ if song_number == 611:
+ return 6
+ if song_number == 619:
+ return 8
+ if song_number == 645:
+ return 5
+ if song_number == 653:
+ return 6
+ if song_number == 683:
+ return 7
+ if song_number == 686:
+ return 4
+ if song_number == 697:
+ return 8
+ if song_number == 698:
+ return 4
+ if song_number == 704:
+ return 6
+ if song_number == 716:
+ return 4
+ if song_number == 717:
+ return 6
+ if song_number == 730:
+ return 4
+ if song_number == 731:
+ return 8
+ if song_number == 732:
+ return 8
+ if song_number == 738:
+ return 4
+ if song_number == 756:
+ return 9
+ if song_number == 815:
+ return 6
+ if song_number == 830:
+ return 8
+ if song_number == 831:
+ return 4
+ if song_number == 876:
+ return 6
+ if song_number == 877:
+ return 6
+ if song_number == 892:
+ return 4
+ if song_number == 894:
+ return 6
+ if song_number == 902:
+ return 8
+ if song_number == 905:
+ return 8
+ if song_number == 921:
+ return 6
+ if song_number == 940:
+ return 7
+ if song_number == 955:
+ return 9
+ if song_number == 968:
+ return 8
+ if song_number == 972:
+ return 7
+ if song_number == 974:
+ return 4
+ if song_number == 988:
+ return 6
+ if song_number == 991:
+ return 5
+ if song_number == 1002:
+ return 8
+ if song_number == 1024:
+ return 8
+ if song_number == 1044:
+ return 9
+ if song_number == 1088:
+ return 6
+ if song_number == 1117:
+ return 6
+ if song_number == 1119:
+ return 7
return None
-
+
=== modified file 'openlp/plugins/songs/lib/songimport.py'
--- openlp/plugins/songs/lib/songimport.py 2010-04-19 18:43:20 +0000
+++ openlp/plugins/songs/lib/songimport.py 2010-05-26 01:17:24 +0000
@@ -122,8 +122,9 @@
or text.lower().find(self.copyright_symbol) >= 0:
copyright_found = False
for line in lines:
- if copyright_found or line.lower().find(self.copyright_string) >= 0\
- or line.lower().find(self.copyright_symbol) >= 0:
+ if (copyright_found or
+ line.lower().find(self.copyright_string) >= 0 or
+ line.lower().find(self.copyright_symbol) >= 0):
copyright_found = True
self.add_copyright(line)
else:
=== modified file 'openlp/plugins/songs/lib/songxml.py'
--- openlp/plugins/songs/lib/songxml.py 2010-04-30 21:00:17 +0000
+++ openlp/plugins/songs/lib/songxml.py 2010-05-26 01:17:24 +0000
@@ -23,6 +23,7 @@
# Temple Place, Suite 330, Boston, MA 02111-1307 USA #
###############################################################################
+import logging
import sys
import os
@@ -32,6 +33,9 @@
from openlp.core.lib import XmlRootClass
+log = logging.getLogger(__name__)
+
+
class SongException(Exception):
pass
@@ -80,7 +84,6 @@
def _reset(self):
"""Reset all song attributes"""
- global _blankOpenSongXml
self._setFromXml(_blankOpenSongXml, 'song')
def from_buffer(self, xmlContent):
@@ -301,7 +304,7 @@
string = title
for char in punctuation:
string = string.replace(char, '')
- return s
+ return string
def set_title(self, title):
"""Set the song title
@@ -403,7 +406,7 @@
if string_in is None:
string_out = ""
else:
- string_out = unicode(s)
+ string_out = unicode(string_in)
return string_out
def _split_to_list(self, aString):
=== modified file 'openlp/plugins/songusage/forms/songusagedetailform.py'
--- openlp/plugins/songusage/forms/songusagedetailform.py 2010-04-30 22:38:15 +0000
+++ openlp/plugins/songusage/forms/songusagedetailform.py 2010-05-26 01:17:24 +0000
@@ -35,10 +35,11 @@
log = logging.getLogger(__name__)
class SongUsageDetailForm(QtGui.QDialog, Ui_SongUsageDetailDialog):
- log.info(u'SongUsage Detail Form loaded')
"""
Class documentation goes here.
"""
+ log.info(u'SongUsage Detail Form Loaded')
+
def __init__(self, parent=None):
"""
Constructor
=== modified file 'openlp/plugins/songusage/lib/manager.py'
--- openlp/plugins/songusage/lib/manager.py 2010-04-28 14:17:42 +0000
+++ openlp/plugins/songusage/lib/manager.py 2010-05-26 01:17:24 +0000
@@ -33,7 +33,7 @@
log = logging.getLogger(__name__)
-class SongUsageManager():
+class SongUsageManager(object):
"""
The Song Manager provides a central location for all database code. This
class takes care of connecting to the database and running all the queries.
Follow ups