openlp-core team mailing list archive
-
openlp-core team
-
Mailing list archive
-
Message #01491
[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)
Coding style fixes including:
* Whitespace/alignment
* Correct naming convention for settingsSection
File changed after dos2unix run resources/pyinstaller/hook-lxml.objectify.py
--
https://code.launchpad.net/~meths/openlp/trivialfixes/+merge/24538
Your team OpenLP Core is subscribed to branch lp:openlp.
=== modified file 'openlp/core/lib/baselistwithdnd.py'
--- openlp/core/lib/baselistwithdnd.py 2010-03-21 23:58:01 +0000
+++ openlp/core/lib/baselistwithdnd.py 2010-04-30 22:43:19 +0000
@@ -48,5 +48,4 @@
mimeData = QtCore.QMimeData()
drag.setMimeData(mimeData)
mimeData.setText(self.PluginName)
- dropAction = drag.start(QtCore.Qt.CopyAction)
-
+ drag.start(QtCore.Qt.CopyAction)
=== modified file 'openlp/core/lib/mediamanageritem.py'
--- openlp/core/lib/mediamanageritem.py 2010-04-30 14:27:05 +0000
+++ openlp/core/lib/mediamanageritem.py 2010-04-30 22:43:19 +0000
@@ -98,7 +98,7 @@
"""
QtGui.QWidget.__init__(self)
self.parent = parent
- self.settings_section = title.lower()
+ self.settingsSection = title.lower()
if type(icon) is QtGui.QIcon:
self.icon = icon
elif type(icon) is types.StringType:
@@ -331,15 +331,15 @@
def onFileClick(self):
files = QtGui.QFileDialog.getOpenFileNames(
self, self.OnNewPrompt,
- SettingsManager.get_last_dir(self.settings_section),
+ SettingsManager.get_last_dir(self.settingsSection),
self.OnNewFileMasks)
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.settings_section, dir)
- SettingsManager.set_list(self.settings_section,
- self.settings_section, self.getFileList())
+ SettingsManager.set_last_dir(self.settingsSection, dir)
+ SettingsManager.set_list(self.settingsSection,
+ self.settingsSection, self.getFileList())
def getFileList(self):
count = 0
=== modified file 'openlp/core/lib/plugin.py'
--- openlp/core/lib/plugin.py 2010-04-28 14:17:42 +0000
+++ openlp/core/lib/plugin.py 2010-04-30 22:43:19 +0000
@@ -51,7 +51,7 @@
``version``
The version number of this iteration of the plugin.
- ``settings_section``
+ ``settingsSection``
The namespace to store settings for the plugin.
``icon``
@@ -116,7 +116,7 @@
self.name = name
if version:
self.version = version
- self.settings_section = self.name.lower()
+ self.settingsSection = self.name.lower()
self.icon = None
self.weight = 0
self.status = PluginStatus.Inactive
@@ -147,7 +147,7 @@
Sets the status of the plugin
"""
self.status = QtCore.QSettings().value(
- self.settings_section + u'/status',
+ self.settingsSection + u'/status',
QtCore.QVariant(PluginStatus.Inactive)).toInt()[0]
def toggle_status(self, new_status):
@@ -156,7 +156,7 @@
"""
self.status = new_status
QtCore.QSettings().setValue(
- self.settings_section + u'/status', QtCore.QVariant(self.status))
+ self.settingsSection + u'/status', QtCore.QVariant(self.status))
def is_active(self):
"""
=== modified file 'openlp/core/lib/renderer.py'
--- openlp/core/lib/renderer.py 2010-04-28 17:07:36 +0000
+++ openlp/core/lib/renderer.py 2010-04-30 22:43:19 +0000
@@ -117,8 +117,7 @@
QtGui.QImage.Format_ARGB32_Premultiplied)
if self._bg_image_filename and not self.bg_image:
self.bg_image = resize_image(self._bg_image_filename,
- self._frame.width(),
- self._frame.height())
+ self._frame.width(), self._frame.height())
if self.bg_frame is None:
self._generate_background_frame()
@@ -223,7 +222,7 @@
``rect_footer``
The footer text block.
"""
- log.debug(u'set_text_rectangle %s , %s' %(rect_main, rect_footer) )
+ log.debug(u'set_text_rectangle %s , %s' % (rect_main, rect_footer))
self._rect = rect_main
self._rect_footer = rect_footer
@@ -268,8 +267,8 @@
QtGui.QPixmap(self._frame.width(), self._frame.height())
self.bg_frame.fill(QtCore.Qt.transparent)
else:
- self.bg_frame = QtGui.QImage(self._frame.width(), self._frame.height(),
- QtGui.QImage.Format_ARGB32_Premultiplied)
+ self.bg_frame = QtGui.QImage(self._frame.width(),
+ self._frame.height(), QtGui.QImage.Format_ARGB32_Premultiplied)
log.debug(u'render background %s start', self._theme.background_type)
painter = QtGui.QPainter()
painter.begin(self.bg_frame)
@@ -550,8 +549,8 @@
path = QtGui.QPainterPath()
path.addText(QtCore.QPointF(x, rowpos), font, line)
self.painter.setBrush(self.painter.pen().brush())
- self.painter.setPen(QtGui.QPen(
- QtGui.QColor(self._theme.display_outline_color), outline_size))
+ self.painter.setPen(QtGui.QPen(QtGui.QColor(
+ self._theme.display_outline_color), outline_size))
self.painter.drawPath(path)
self.painter.setPen(pen)
self.painter.drawText(x, rowpos, line)
=== modified file 'openlp/core/lib/settingstab.py'
--- openlp/core/lib/settingstab.py 2010-04-30 01:31:41 +0000
+++ openlp/core/lib/settingstab.py 2010-04-30 22:43:19 +0000
@@ -40,7 +40,7 @@
QtGui.QWidget.__init__(self)
self.tabTitle = title
self.tabTitleVisible = None
- self.settings_section = self.tabTitle.lower()
+ self.settingsSection = self.tabTitle.lower()
self.setupUi()
self.retranslateUi()
self.initialise()
=== modified file 'openlp/core/ui/amendthemeform.py'
--- openlp/core/ui/amendthemeform.py 2010-04-24 07:21:35 +0000
+++ openlp/core/ui/amendthemeform.py 2010-04-30 22:43:19 +0000
@@ -133,7 +133,8 @@
QtCore.SIGNAL(u'editingFinished()'),
self.onOutlineSpinBoxChanged)
QtCore.QObject.connect(self.SlideTransitionCheckedBox,
- QtCore.SIGNAL(u'stateChanged(int)'), self.onSlideTransitionCheckedBoxChanged)
+ QtCore.SIGNAL(u'stateChanged(int)'),
+ self.onSlideTransitionCheckedBoxChanged)
def accept(self):
new_theme = ThemeXML()
@@ -145,10 +146,10 @@
new_theme.add_background_transparent()
else:
if self.theme.background_type == u'solid':
- new_theme.add_background_solid( \
+ new_theme.add_background_solid(
unicode(self.theme.background_color))
elif self.theme.background_type == u'gradient':
- new_theme.add_background_gradient( \
+ new_theme.add_background_gradient(
unicode(self.theme.background_startColor),
unicode(self.theme.background_endColor),
self.theme.background_direction)
@@ -158,7 +159,6 @@
new_theme.add_background_image(filename)
save_to = os.path.join(self.path, theme_name, filename)
save_from = self.theme.background_filename
-
new_theme.add_font(unicode(self.theme.font_main_name),
unicode(self.theme.font_main_color),
unicode(self.theme.font_main_proportion),
@@ -182,7 +182,7 @@
unicode(self.theme.font_footer_x),
unicode(self.theme.font_footer_y),
unicode(self.theme.font_footer_width),
- unicode(self.theme.font_footer_height) )
+ unicode(self.theme.font_footer_height))
new_theme.add_display(unicode(self.theme.display_shadow),
unicode(self.theme.display_shadow_color),
unicode(self.theme.display_outline),
=== modified file 'openlp/core/ui/displaytab.py'
--- openlp/core/ui/displaytab.py 2010-04-30 14:30:07 +0000
+++ openlp/core/ui/displaytab.py 2010-04-30 22:43:19 +0000
@@ -178,7 +178,7 @@
def load(self):
settings = QtCore.QSettings()
- settings.beginGroup(self.settings_section)
+ settings.beginGroup(self.settingsSection)
self.Xpos.setText(unicode(self.screens.current[u'size'].x()))
self.Ypos.setText(unicode(self.screens.current[u'size'].y()))
self.Height.setText(unicode(self.screens.current[u'size'].height()))
@@ -208,7 +208,7 @@
def save(self):
settings = QtCore.QSettings()
- settings.beginGroup(self.settings_section)
+ settings.beginGroup(self.settingsSection)
settings.setValue('x position',
QtCore.QVariant(self.XposEdit.text()))
settings.setValue('y position',
=== modified file 'openlp/core/ui/generaltab.py'
--- openlp/core/ui/generaltab.py 2010-04-30 14:27:05 +0000
+++ openlp/core/ui/generaltab.py 2010-04-30 22:43:19 +0000
@@ -42,7 +42,7 @@
If not set before default to last screen.
"""
settings = QtCore.QSettings()
- settings.beginGroup(self.settings_section)
+ settings.beginGroup(self.settingsSection)
self.MonitorNumber = settings.value(u'monitor',
QtCore.QVariant(self.screens.monitor_number)).toInt()[0]
self.screens.set_current_display(self.MonitorNumber)
@@ -229,7 +229,7 @@
def load(self):
settings = QtCore.QSettings()
- settings.beginGroup(self.settings_section)
+ settings.beginGroup(self.settingsSection)
for screen in self.screens.screen_list:
screen_name = u'%s %d' % (self.trUtf8('Screen'),
screen[u'number'] + 1)
@@ -268,7 +268,7 @@
def save(self):
settings = QtCore.QSettings()
- settings.beginGroup(self.settings_section)
+ settings.beginGroup(self.settingsSection)
settings.setValue(u'monitor', QtCore.QVariant(self.MonitorNumber))
settings.setValue(u'display on monitor',
QtCore.QVariant(self.DisplayOnMonitor))
=== modified file 'openlp/core/ui/maindisplay.py'
--- openlp/core/ui/maindisplay.py 2010-04-30 16:57:53 +0000
+++ openlp/core/ui/maindisplay.py 2010-04-30 22:43:19 +0000
@@ -34,7 +34,6 @@
log = logging.getLogger(__name__)
-
class DisplayManager(QtGui.QWidget):
"""
Wrapper class to hold the display widgets.
@@ -144,16 +143,16 @@
"""
Sets up the screen on a particular screen.
"""
- log.debug(u'Setup %s for %s ' %(self.screens,
- self.screens.monitor_number))
+ log.debug(u'Setup %s for %s ' % (
+ self.screens, self.screens.monitor_number))
self.setVisible(False)
self.screen = self.screens.current
#Sort out screen locations and sizes
self.display_alert.setGeometry(self.screen[u'size'])
- self.display_image.resize(self.screen[u'size'].width(),
- self.screen[u'size'].height())
- self.display_text.resize(self.screen[u'size'].width(),
- self.screen[u'size'].height())
+ self.display_image.resize(
+ self.screen[u'size'].width(), self.screen[u'size'].height())
+ self.display_text.resize(
+ self.screen[u'size'].width(), self.screen[u'size'].height())
self.setGeometry(self.screen[u'size'])
#Build a custom splash screen
self.InitialFrame = QtGui.QImage(
@@ -179,8 +178,8 @@
painter.begin(self.blankFrame)
painter.fillRect(self.blankFrame.rect(), QtCore.Qt.black)
#build a blank transparent image
- self.transparent = QtGui.QPixmap(self.screen[u'size'].width(),
- self.screen[u'size'].height())
+ self.transparent = QtGui.QPixmap(
+ self.screen[u'size'].width(), self.screen[u'size'].height())
self.transparent.fill(QtCore.Qt.transparent)
self.display_alert.setPixmap(self.transparent)
self.display_text.setPixmap(self.transparent)
@@ -220,19 +219,21 @@
if mode == HideMode.Screen:
self.display_image.setPixmap(self.transparent)
elif mode == HideMode.Blank:
- self.display_image.setPixmap(QtGui.QPixmap.fromImage(self.blankFrame))
+ self.display_image.setPixmap(
+ QtGui.QPixmap.fromImage(self.blankFrame))
else:
if self.parent.renderManager.renderer.bg_frame:
- self.display_image.setPixmap(QtGui.QPixmap.fromImage(\
+ self.display_image.setPixmap(QtGui.QPixmap.fromImage(
self.parent.renderManager.renderer.bg_frame))
else:
- self.display_image.setPixmap(QtGui.QPixmap.fromImage(self.blankFrame))
+ self.display_image.setPixmap(
+ QtGui.QPixmap.fromImage(self.blankFrame))
self.moveToTop()
def moveToTop(self):
log.debug(u'moveToTop')
- self.setWindowFlags(QtCore.Qt.WindowStaysOnTopHint \
- | QtCore.Qt.FramelessWindowHint | QtCore.Qt.Dialog)
+ self.setWindowFlags(QtCore.Qt.WindowStaysOnTopHint |
+ QtCore.Qt.FramelessWindowHint | QtCore.Qt.Dialog)
self.show()
def showDisplay(self):
@@ -254,9 +255,8 @@
def addImageWithText(self, frame):
log.debug(u'addImageWithText')
- frame = resize_image(frame,
- self.screen[u'size'].width(),
- self.screen[u'size'].height() )
+ frame = resize_image(
+ frame, self.screen[u'size'].width(), self.screen[u'size'].height())
self.display_image.setPixmap(QtGui.QPixmap.fromImage(frame))
self.moveToTop()
@@ -340,8 +340,8 @@
self.audioObject = Phonon.AudioOutput(Phonon.VideoCategory)
Phonon.createPath(self.mediaObject, self)
Phonon.createPath(self.mediaObject, self.audioObject)
- self.setWindowFlags(QtCore.Qt.WindowStaysOnBottomHint \
- | QtCore.Qt.FramelessWindowHint | QtCore.Qt.Dialog)
+ self.setWindowFlags(QtCore.Qt.WindowStaysOnBottomHint |
+ QtCore.Qt.FramelessWindowHint | QtCore.Qt.Dialog)
QtCore.QObject.connect(Receiver.get_receiver(),
QtCore.SIGNAL(u'maindisplay_hide'), self.mediaHide)
QtCore.QObject.connect(Receiver.get_receiver(),
@@ -376,7 +376,7 @@
"""
Sets up the screen on a particular screen.
"""
- log.debug(u'VideoDisplay Setup %s for %s ' %(self.screens,
+ log.debug(u'VideoDisplay Setup %s for %s ' % (self.screens,
self.screens.monitor_number))
self.screen = self.screens.current
#Sort out screen locations and sizes
@@ -393,7 +393,7 @@
if not message:
message = self.message
log.debug(u'VideoDisplay Queue new media message %s' % message)
- source = self.mediaObject.setCurrentSource(Phonon.MediaSource(message))
+ self.mediaObject.setCurrentSource(Phonon.MediaSource(message))
self.message = message
self.background = True
self._play()
@@ -402,7 +402,7 @@
log.debug(u'VideoDisplay Queue new media message %s' % message)
file = os.path.join(message[0].get_frame_path(),
message[0].get_frame_title())
- source = self.mediaObject.setCurrentSource(Phonon.MediaSource(file))
+ self.mediaObject.setCurrentSource(Phonon.MediaSource(file))
self._play()
def onMediaPlay(self):
@@ -442,4 +442,3 @@
if self.hidden:
self.hidden = False
self._play()
-
=== modified file 'openlp/core/ui/mainwindow.py'
--- openlp/core/ui/mainwindow.py 2010-04-30 14:27:05 +0000
+++ openlp/core/ui/mainwindow.py 2010-04-30 22:43:19 +0000
@@ -426,10 +426,10 @@
self.applicationVersion = applicationVersion
# Set up settings sections for the main application
# (not for use by plugins)
- self.ui_settings_section = u'user interface'
- self.general_settings_section = u'general'
- self.service_settings_section = u'servicemanager'
- self.songs_settings_section = u'songs'
+ self.uiSettingsSection = u'user interface'
+ self.generalSettingsSection = u'general'
+ self.serviceSettingsSection = u'servicemanager'
+ self.songsSettingsSection = u'songs'
self.serviceNotSaved = False
self.settingsmanager = SettingsManager(screens)
self.displayManager = DisplayManager(screens)
@@ -576,7 +576,7 @@
self.displayManager.mainDisplay.setFocus()
self.activateWindow()
if QtCore.QSettings().value(
- self.general_settings_section + u'/auto open',
+ self.generalSettingsSection + u'/auto open',
QtCore.QVariant(False)).toBool():
self.ServiceManagerContents.onLoadService(True)
@@ -586,7 +586,7 @@
Triggered by delay thread.
"""
settings = QtCore.QSettings()
- settings.beginGroup(self.general_settings_section)
+ settings.beginGroup(self.generalSettingsSection)
if settings.value(u'screen blank', QtCore.QVariant(False)).toBool() \
and settings.value(u'blank warning', QtCore.QVariant(False)).toBool():
self.LiveController.onBlankDisplay(True)
@@ -731,10 +731,10 @@
def loadSettings(self):
log.debug(u'Loading QSettings')
settings = QtCore.QSettings()
- settings.beginGroup(self.general_settings_section)
+ settings.beginGroup(self.generalSettingsSection)
self.recentFiles = settings.value(u'recent files').toStringList()
settings.endGroup()
- settings.beginGroup(self.ui_settings_section)
+ settings.beginGroup(self.uiSettingsSection)
self.move(settings.value(u'main window position',
QtCore.QVariant(QtCore.QPoint(0, 0))).toPoint())
self.restoreGeometry(
@@ -745,12 +745,12 @@
def saveSettings(self):
log.debug(u'Saving QSettings')
settings = QtCore.QSettings()
- settings.beginGroup(self.general_settings_section)
+ settings.beginGroup(self.generalSettingsSection)
recentFiles = QtCore.QVariant(self.recentFiles) \
if self.recentFiles else QtCore.QVariant()
settings.setValue(u'recent files', recentFiles)
settings.endGroup()
- settings.beginGroup(self.ui_settings_section)
+ settings.beginGroup(self.uiSettingsSection)
settings.setValue(u'main window position',
QtCore.QVariant(self.pos()))
settings.setValue(u'main window state',
@@ -780,7 +780,7 @@
def addRecentFile(self, filename):
recentFileCount = QtCore.QSettings().value(
- self.general_settings_section + u'/max recent files',
+ 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))
=== modified file 'openlp/core/ui/mediadockmanager.py'
--- openlp/core/ui/mediadockmanager.py 2010-04-30 01:31:41 +0000
+++ openlp/core/ui/mediadockmanager.py 2010-04-30 22:43:19 +0000
@@ -45,7 +45,7 @@
log.debug(u'Inserting %s dock' % media_item.title)
match = False
for dock_index in range(0, self.media_dock.count()):
- if self.media_dock.widget(dock_index).settings_section == \
+ if self.media_dock.widget(dock_index).settingsSection == \
media_item.title.lower():
match = True
break
@@ -56,6 +56,6 @@
log.debug(u'remove %s dock' % name)
for dock_index in range(0, self.media_dock.count()):
if self.media_dock.widget(dock_index):
- if self.media_dock.widget(dock_index).settings_section == name:
+ if self.media_dock.widget(dock_index).settingsSection == name:
self.media_dock.widget(dock_index).hide()
self.media_dock.removeItem(dock_index)
=== modified file 'openlp/core/ui/servicemanager.py'
--- openlp/core/ui/servicemanager.py 2010-04-30 14:27:05 +0000
+++ openlp/core/ui/servicemanager.py 2010-04-30 22:43:19 +0000
@@ -1,4 +1,3 @@
-import os.path
# -*- coding: utf-8 -*-
# vim: autoindent shiftwidth=4 expandtab textwidth=80 tabstop=4 softtabstop=4
@@ -85,7 +84,7 @@
mimeData = QtCore.QMimeData()
drag.setMimeData(mimeData)
mimeData.setText(u'ServiceManager')
- dropAction = drag.start(QtCore.Qt.CopyAction)
+ drag.start(QtCore.Qt.CopyAction)
class ServiceManager(QtGui.QWidget):
"""
@@ -192,7 +191,7 @@
QtCore.SIGNAL(u'config_updated'), self.regenerateServiceItems)
# Last little bits of setting up
self.service_theme = unicode(QtCore.QSettings().value(
- self.parent.service_settings_section + u'/service theme',
+ self.parent.serviceSettingsSection + u'/service theme',
QtCore.QVariant(u'')).toString())
self.servicePath = AppLocation.get_section_data_path(u'servicemanager')
#build the context menu
@@ -405,7 +404,7 @@
Clear the list to create a new service
"""
if self.parent.serviceNotSaved and QtCore.QSettings().value(
- self.parent.general_settings_section + u'/save prompt',
+ self.parent.generalSettingsSection + u'/save prompt',
QtCore.QVariant(False)).toBool():
ret = QtGui.QMessageBox.question(self,
self.trUtf8('Save Changes to Service?'),
@@ -490,11 +489,11 @@
if not quick or self.isNew:
filename = QtGui.QFileDialog.getSaveFileName(self,
self.trUtf8(u'Save Service'),
- SettingsManager.get_last_dir(self.parent.service_settings_section),
+ SettingsManager.get_last_dir(self.parent.serviceSettingsSection),
self.trUtf8(u'OpenLP Service Files (*.osz)'))
else:
filename = SettingsManager.get_last_dir(
- self.parent.service_settings_section)
+ self.parent.serviceSettingsSection)
if filename:
splittedFile = filename.split(u'.')
if splittedFile[-1] != u'osz':
@@ -502,7 +501,7 @@
filename = unicode(filename)
self.isNew = False
SettingsManager.set_last_dir(
- self.parent.service_settings_section,
+ self.parent.serviceSettingsSection,
os.path.split(filename)[0])
service = []
servicefile = filename + u'.osd'
@@ -545,12 +544,12 @@
def onLoadService(self, lastService=False):
if lastService:
filename = SettingsManager.get_last_dir(
- self.parent.service_settings_section)
+ self.parent.serviceSettingsSection)
else:
filename = QtGui.QFileDialog.getOpenFileName(
self, self.trUtf8('Open Service'),
SettingsManager.get_last_dir(
- self.parent.service_settings_section), u'Services (*.osz)')
+ self.parent.serviceSettingsSection), u'Services (*.osz)')
self.loadService(filename)
def loadService(self, filename=None):
@@ -580,7 +579,7 @@
name = filename.split(os.path.sep)
if filename:
SettingsManager.set_last_dir(
- self.parent.service_settings_section,
+ self.parent.serviceSettingsSection,
os.path.split(filename)[0])
zip = None
f = None
@@ -651,7 +650,7 @@
self.service_theme = unicode(self.ThemeComboBox.currentText())
self.parent.RenderManager.set_service_theme(self.service_theme)
QtCore.QSettings().setValue(
- self.parent.service_settings_section + u'/service theme',
+ self.parent.serviceSettingsSection + u'/service theme',
QtCore.QVariant(self.service_theme))
self.regenerateServiceItems()
@@ -735,7 +734,7 @@
self.parent.LiveController.addServiceManagerItem(
self.serviceItems[item][u'service_item'], count)
if QtCore.QSettings().value(
- self.parent.general_settings_section + u'/auto preview',
+ self.parent.generalSettingsSection + u'/auto preview',
QtCore.QVariant(False)).toBool():
item += 1
if self.serviceItems and item < len(self.serviceItems) and \
@@ -797,7 +796,7 @@
plugin = event.mimeData().text()
item = self.ServiceManagerList.itemAt(event.pos())
if plugin == u'ServiceManager':
- startpos, startCount = self.findServiceItem()
+ startpos, startCount = self.findServiceItem()
if item is None:
endpos = len(self.serviceItems)
else:
=== modified file 'openlp/core/ui/slidecontroller.py'
--- openlp/core/ui/slidecontroller.py 2010-04-30 15:41:48 +0000
+++ openlp/core/ui/slidecontroller.py 2010-04-30 22:43:19 +0000
@@ -200,7 +200,7 @@
if isLive:
self.Toolbar.addToolbarSeparator(u'Loop Separator')
self.Toolbar.addToolbarButton(
- u'Start Loop', u':/media/media_time.png',
+ u'Start Loop', u':/media/media_time.png',
self.trUtf8('Start continuous loop'), self.onStartLoop)
self.Toolbar.addToolbarButton(
u'Stop Loop', u':/media/media_stop.png',
@@ -217,13 +217,13 @@
#Build a Media ToolBar
self.Mediabar = OpenLPToolbar(self)
self.Mediabar.addToolbarButton(
- u'Media Start', u':/slides/media_playback_start.png',
+ u'Media Start', u':/slides/media_playback_start.png',
self.trUtf8('Start playing media'), self.onMediaPlay)
self.Mediabar.addToolbarButton(
- u'Media Pause', u':/slides/media_playback_pause.png',
+ u'Media Pause', u':/slides/media_playback_pause.png',
self.trUtf8('Start playing media'), self.onMediaPause)
self.Mediabar.addToolbarButton(
- u'Media Stop', u':/slides/media_playback_stop.png',
+ u'Media Stop', u':/slides/media_playback_stop.png',
self.trUtf8('Start playing media'), self.onMediaStop)
if self.isLive:
self.blankButton = self.Mediabar.addToolbarButton(
@@ -396,7 +396,7 @@
if item.is_text():
self.Toolbar.makeWidgetsInvisible(self.loop_list)
if QtCore.QSettings().value(
- self.parent.songs_settings_section + u'/show songbar',
+ self.parent.songsSettingsSection + u'/show songbar',
QtCore.QVariant(True)).toBool() and len(self.slideList) > 0:
self.Toolbar.makeWidgetsVisible([u'Song Menu'])
if item.is_capable(ItemCapabilities.AllowsLoop) and \
@@ -585,7 +585,7 @@
self.hideButton.setChecked(False)
self.themeButton.setChecked(False)
QtCore.QSettings().setValue(
- self.parent.general_settings_section + u'/screen blank',
+ self.parent.generalSettingsSection + u'/screen blank',
QtCore.QVariant(checked))
if checked:
Receiver.send_message(u'maindisplay_hide', HideMode.Blank)
@@ -636,7 +636,6 @@
% self.serviceItem.name.lower(),
[self.serviceItem, self.isLive])
-
def onSlideSelected(self):
"""
Generate the preview when you click on a slide.
@@ -727,7 +726,7 @@
if not self.serviceItem:
return
Receiver.send_message(u'%s_previous' % self.serviceItem.name.lower(),
- [self.serviceItem, self.isLive])
+ [self.serviceItem, self.isLive])
if self.serviceItem.is_command():
self.updatePreview()
else:
=== modified file 'openlp/core/ui/thememanager.py'
--- openlp/core/ui/thememanager.py 2010-04-30 14:27:05 +0000
+++ openlp/core/ui/thememanager.py 2010-04-30 22:43:19 +0000
@@ -47,7 +47,7 @@
def __init__(self, parent):
QtGui.QWidget.__init__(self, parent)
self.parent = parent
- self.settings_section = u'themes'
+ self.settingsSection = u'themes'
self.Layout = QtGui.QVBoxLayout(self)
self.Layout.setSpacing(0)
self.Layout.setMargin(0)
@@ -106,14 +106,14 @@
QtCore.SIGNAL(u'theme_update_global'), self.changeGlobalFromTab)
#Variables
self.themelist = []
- self.path = AppLocation.get_section_data_path(self.settings_section)
+ self.path = AppLocation.get_section_data_path(self.settingsSection)
self.checkThemesExists(self.path)
self.thumbPath = os.path.join(self.path, u'thumbnails')
self.checkThemesExists(self.thumbPath)
self.amendThemeForm.path = self.path
# Last little bits of setting up
self.global_theme = unicode(QtCore.QSettings().value(
- self.settings_section + u'/global theme',
+ self.settingsSection + u'/global theme',
QtCore.QVariant(u'')).toString())
def changeGlobalFromTab(self, themeName):
@@ -147,7 +147,7 @@
name = u'%s (%s)' % (self.global_theme, self.trUtf8('default'))
self.ThemeListWidget.item(count).setText(name)
QtCore.QSettings().setValue(
- self.settings_section + u'/global theme',
+ self.settingsSection + u'/global theme',
QtCore.QVariant(self.global_theme))
Receiver.send_message(u'theme_update_global', self.global_theme)
self.pushThemes()
@@ -170,7 +170,7 @@
def onDeleteTheme(self):
self.global_theme = unicode(QtCore.QSettings().value(
- self.settings_section + u'/global theme',
+ self.settingsSection + u'/global theme',
QtCore.QVariant(u'')).toString())
item = self.ThemeListWidget.currentItem()
if item:
@@ -224,10 +224,10 @@
theme = unicode(item.data(QtCore.Qt.UserRole).toString())
path = QtGui.QFileDialog.getExistingDirectory(self,
unicode(self.trUtf8('Save Theme - (%s)')) % theme,
- SettingsManager.get_last_dir(self.settings_section, 1))
+ SettingsManager.get_last_dir(self.settingsSection, 1))
path = unicode(path)
if path:
- SettingsManager.set_last_dir(self.settings_section, path, 1)
+ SettingsManager.set_last_dir(self.settingsSection, path, 1)
themePath = os.path.join(path, theme + u'.theme')
zip = None
try:
@@ -247,12 +247,12 @@
def onImportTheme(self):
files = QtGui.QFileDialog.getOpenFileNames(
self, self.trUtf8('Select Theme Import File'),
- SettingsManager.get_last_dir(self.settings_section), u'Theme (*.*)')
+ SettingsManager.get_last_dir(self.settingsSection), u'Theme (*.*)')
log.info(u'New Themes %s', unicode(files))
if files:
for file in files:
SettingsManager.set_last_dir(
- self.settings_section, unicode(file))
+ self.settingsSection, unicode(file))
self.unzipTheme(file, self.path)
self.loadThemes()
@@ -295,7 +295,7 @@
self.pushThemes()
def pushThemes(self):
- Receiver.send_message(u'theme_update_list', self.getThemes() )
+ Receiver.send_message(u'theme_update_list', self.getThemes())
def getThemes(self):
return self.themelist
=== modified file 'openlp/core/ui/themestab.py'
--- openlp/core/ui/themestab.py 2010-04-30 01:31:41 +0000
+++ openlp/core/ui/themestab.py 2010-04-30 22:43:19 +0000
@@ -124,7 +124,7 @@
def load(self):
settings = QtCore.QSettings()
- settings.beginGroup(self.settings_section)
+ settings.beginGroup(self.settingsSection)
self.theme_level = settings.value(
u'theme level', QtCore.QVariant(ThemeLevel.Global)).toInt()[0]
self.global_theme = unicode(settings.value(
@@ -139,7 +139,7 @@
def save(self):
settings = QtCore.QSettings()
- settings.beginGroup(self.settings_section)
+ settings.beginGroup(self.settingsSection)
settings.setValue(u'theme level',
QtCore.QVariant(self.theme_level))
settings.setValue(u'global theme',
@@ -179,7 +179,7 @@
"""
#reload as may have been triggered by the ThemeManager
self.global_theme = unicode(QtCore.QSettings().value(
- self.settings_section + u'/global theme',
+ self.settingsSection + u'/global theme',
QtCore.QVariant(u'')).toString())
self.DefaultComboBox.clear()
for theme in theme_list:
=== modified file 'openlp/migration/migratesongs.py'
--- openlp/migration/migratesongs.py 2010-04-28 03:16:49 +0000
+++ openlp/migration/migratesongs.py 2010-04-30 22:43:19 +0000
@@ -47,7 +47,7 @@
mapper(TAuthor, temp_authors_table)
mapper(Book, song_books_table)
mapper(Song, songs_table,
- properties={'authors': relation(Author, backref='songs',
+ properties={'authors': relation(Author, backref='songs',
secondary=authors_songs_table),
'book': relation(Book, backref='songs'),
'topics': relation(Topic, backref='songs',
@@ -156,13 +156,13 @@
print songs_temp.songtitle
aa = self.session.execute(
u'select * from songauthors_temp where songid =' + \
- unicode(songs_temp.songid) )
+ unicode(songs_temp.songid))
for row in aa:
a = row['authorid']
authors_temp = self.session.query(TAuthor).get(a)
bb = self.session.execute(
u'select * from authors where display_name = \"%s\"' % \
- unicode(authors_temp.authorname) ).fetchone()
+ unicode(authors_temp.authorname)).fetchone()
if bb is None:
author = Author()
author.display_name = authors_temp.authorname
=== modified file 'openlp/plugins/alerts/alertsplugin.py'
--- openlp/plugins/alerts/alertsplugin.py 2010-04-30 01:43:05 +0000
+++ openlp/plugins/alerts/alertsplugin.py 2010-04-30 22:43:19 +0000
@@ -84,7 +84,7 @@
def togglealertsState(self):
self.alertsActive = not self.alertsActive
QtCore.QSettings().setValue(
- self.settings_section + u'/active',
+ self.settingsSection + u'/active',
QtCore.QVariant(self.alertsActive))
def onAlertsTrigger(self):
=== modified file 'openlp/plugins/alerts/lib/alertstab.py'
--- openlp/plugins/alerts/lib/alertstab.py 2010-04-30 01:35:41 +0000
+++ openlp/plugins/alerts/lib/alertstab.py 2010-04-30 22:43:19 +0000
@@ -229,7 +229,7 @@
def load(self):
settings = QtCore.QSettings()
- settings.beginGroup(self.settings_section)
+ settings.beginGroup(self.settingsSection)
self.timeout = settings.value(u'timeout', QtCore.QVariant(5)).toInt()[0]
self.font_color = unicode(settings.value(
u'font color', QtCore.QVariant(u'#ffffff')).toString())
@@ -260,7 +260,7 @@
def save(self):
settings = QtCore.QSettings()
- settings.beginGroup(self.settings_section)
+ settings.beginGroup(self.settingsSection)
self.font_face = self.FontComboBox.currentFont().family()
settings.setValue(u'background color', QtCore.QVariant(self.bg_color))
settings.setValue(u'font color', QtCore.QVariant(self.font_color))
=== modified file 'openlp/plugins/bibles/forms/importwizardform.py'
--- openlp/plugins/bibles/forms/importwizardform.py 2010-04-28 14:17:42 +0000
+++ openlp/plugins/bibles/forms/importwizardform.py 2010-04-30 22:43:19 +0000
@@ -274,7 +274,7 @@
def setDefaults(self):
settings = QtCore.QSettings()
- settings.beginGroup(self.bibleplugin.settings_section)
+ settings.beginGroup(self.bibleplugin.settingsSection)
self.setField(u'source_format', QtCore.QVariant(0))
self.setField(u'osis_location', QtCore.QVariant(''))
self.setField(u'csv_booksfile', QtCore.QVariant(''))
@@ -345,11 +345,11 @@
def getFileName(self, title, editbox):
filename = QtGui.QFileDialog.getOpenFileName(self, title,
- SettingsManager.get_last_dir(self.bibleplugin.settings_section, 1))
+ SettingsManager.get_last_dir(self.bibleplugin.settingsSection, 1))
if filename:
editbox.setText(filename)
SettingsManager.set_last_dir(
- self.bibleplugin.settings_section, filename, 1)
+ self.bibleplugin.settingsSection, filename, 1)
def incrementProgressBar(self, status_text):
log.debug(u'IncrementBar %s', status_text)
=== modified file 'openlp/plugins/bibles/lib/biblestab.py'
--- openlp/plugins/bibles/lib/biblestab.py 2010-04-30 01:31:41 +0000
+++ openlp/plugins/bibles/lib/biblestab.py 2010-04-30 22:43:19 +0000
@@ -189,7 +189,7 @@
def load(self):
settings = QtCore.QSettings()
- settings.beginGroup(self.settings_section)
+ settings.beginGroup(self.settingsSection)
self.show_new_chapters = settings.value(
u'display new chapter', QtCore.QVariant(False)).toBool()
self.display_style = settings.value(
@@ -208,7 +208,7 @@
def save(self):
settings = QtCore.QSettings()
- settings.beginGroup(self.settings_section)
+ settings.beginGroup(self.settingsSection)
settings.setValue(u'display new chapter',
QtCore.QVariant(self.show_new_chapters))
settings.setValue(u'display brackets',
=== modified file 'openlp/plugins/bibles/lib/db.py'
--- openlp/plugins/bibles/lib/db.py 2010-04-28 14:17:42 +0000
+++ openlp/plugins/bibles/lib/db.py 2010-04-30 22:43:19 +0000
@@ -111,7 +111,7 @@
``old_filename``
The "dirty" file name or version name.
"""
- if not isinstance(old_filename, unicode):
+ if not isinstance(old_filename, unicode):
old_filename = unicode(old_filename, u'utf-8')
old_filename = re.sub(r'[^\w]+', u'_', old_filename).strip(u'_')
return old_filename + u'.sqlite'
=== modified file 'openlp/plugins/bibles/lib/manager.py'
--- openlp/plugins/bibles/lib/manager.py 2010-04-28 14:17:42 +0000
+++ openlp/plugins/bibles/lib/manager.py 2010-04-30 22:43:19 +0000
@@ -109,12 +109,12 @@
"""
log.debug(u'Bible Initialising')
self.parent = parent
- self.settings_section = u'bibles'
+ self.settingsSection = u'bibles'
self.web = u'Web'
self.db_cache = None
- self.path = AppLocation.get_section_data_path(self.settings_section)
+ self.path = AppLocation.get_section_data_path(self.settingsSection)
self.proxy_name = unicode(
- QtCore.QSettings().value(self.settings_section + u'/proxy name',
+ QtCore.QSettings().value(self.settingsSection + u'/proxy name',
QtCore.QVariant(u'')).toString())
self.suffix = u'.sqlite'
self.import_wizard = None
@@ -128,7 +128,7 @@
BibleDB class.
"""
log.debug(u'Reload bibles')
- files = SettingsManager.get_files(self.settings_section, self.suffix)
+ files = SettingsManager.get_files(self.settingsSection, self.suffix)
log.debug(u'Bible Files %s', files)
self.db_cache = {}
for filename in files:
=== modified file 'openlp/plugins/bibles/lib/mediaitem.py'
--- openlp/plugins/bibles/lib/mediaitem.py 2010-04-30 01:31:41 +0000
+++ openlp/plugins/bibles/lib/mediaitem.py 2010-04-30 22:43:19 +0000
@@ -275,7 +275,7 @@
self.SearchProgress.setObjectName(u'SearchProgress')
def configUpdated(self):
- if QtCore.QSettings().value(self.settings_section + u'/dual bibles',
+ if QtCore.QSettings().value(self.settingsSection + u'/dual bibles',
QtCore.QVariant(False)).toBool():
self.AdvancedSecondBibleLabel.setVisible(True)
self.AdvancedSecondBibleComboBox.setVisible(True)
=== modified file 'openlp/plugins/bibles/lib/osis.py'
--- openlp/plugins/bibles/lib/osis.py 2010-04-27 16:27:57 +0000
+++ openlp/plugins/bibles/lib/osis.py 2010-04-30 22:43:19 +0000
@@ -165,7 +165,7 @@
verse_text = verse_text.replace(u'</lb>', u'')\
.replace(u'</l>', u'').replace(u'<lg>', u'')\
.replace(u'</lg>', u'').replace(u'</q>', u'')\
- .replace(u'</div>', u'').replace(u'</w>', u'')
+ .replace(u'</div>', u'').replace(u'</w>', u'')
verse_text = self.spaces_regex.sub(u' ', verse_text)
self.create_verse(db_book.id, chapter, verse, verse_text)
Receiver.send_message(u'openlp_process_events')
=== modified file 'openlp/plugins/custom/forms/editcustomform.py'
--- openlp/plugins/custom/forms/editcustomform.py 2010-04-20 22:00:55 +0000
+++ openlp/plugins/custom/forms/editcustomform.py 2010-04-30 22:43:19 +0000
@@ -271,4 +271,4 @@
if self.VerseTextEdit.toPlainText():
self.VerseTextEdit.setFocus()
return False, self.trUtf8('You have unsaved data, please save or clear')
- return True, u''
+ return True, u''
=== modified file 'openlp/plugins/custom/lib/customtab.py'
--- openlp/plugins/custom/lib/customtab.py 2010-04-30 01:31:41 +0000
+++ openlp/plugins/custom/lib/customtab.py 2010-04-30 22:43:19 +0000
@@ -67,10 +67,10 @@
def load(self):
self.displayFooter = QtCore.QSettings().value(
- self.settings_section + u'/display footer',
+ self.settingsSection + u'/display footer',
QtCore.QVariant(True)).toBool()
self.DisplayFooterCheckBox.setChecked(self.displayFooter)
def save(self):
- QtCore.QSettings().setValue(self.settings_section + u'/display footer',
+ QtCore.QSettings().setValue(self.settingsSection + u'/display footer',
QtCore.QVariant(self.displayFooter))
=== modified file 'openlp/plugins/custom/lib/mediaitem.py'
--- openlp/plugins/custom/lib/mediaitem.py 2010-04-30 01:31:41 +0000
+++ openlp/plugins/custom/lib/mediaitem.py 2010-04-30 22:43:19 +0000
@@ -163,7 +163,7 @@
service_item.title = title
for slide in raw_slides:
service_item.add_from_text(slide[:30], slide)
- if QtCore.QSettings().value(self.settings_section + u'/display footer',
+ if QtCore.QSettings().value(self.settingsSection + u'/display footer',
QtCore.QVariant(True)).toBool() or credit:
raw_footer.append(title + u' ' + credit)
else:
=== modified file 'openlp/plugins/images/lib/imagetab.py'
--- openlp/plugins/images/lib/imagetab.py 2010-04-30 01:31:41 +0000
+++ openlp/plugins/images/lib/imagetab.py 2010-04-30 22:43:19 +0000
@@ -72,12 +72,12 @@
def load(self):
self.loop_delay = QtCore.QSettings().value(
- self.settings_section + u'/loop delay',
+ self.settingsSection + u'/loop delay',
QtCore.QVariant(5)).toInt()[0]
self.TimeoutSpinBox.setValue(self.loop_delay)
def save(self):
- QtCore.QSettings().setValue(self.settings_section + u'/loop delay',
+ QtCore.QSettings().setValue(self.settingsSection + u'/loop delay',
QtCore.QVariant(self.loop_delay))
Receiver.send_message(u'slidecontroller_live_spin_delay',
self.loop_delay)
=== modified file 'openlp/plugins/images/lib/mediaitem.py'
--- openlp/plugins/images/lib/mediaitem.py 2010-04-30 14:27:05 +0000
+++ openlp/plugins/images/lib/mediaitem.py 2010-04-30 22:43:19 +0000
@@ -77,12 +77,12 @@
QtGui.QAbstractItemView.ExtendedSelection)
self.ListView.setIconSize(QtCore.QSize(88,50))
self.servicePath = os.path.join(
- AppLocation.get_section_data_path(self.settings_section),
+ AppLocation.get_section_data_path(self.settingsSection),
u'thumbnails')
if not os.path.exists(self.servicePath):
os.mkdir(self.servicePath)
self.loadList(SettingsManager.load_list(
- self.settings_section, self.settings_section))
+ self.settingsSection, self.settingsSection))
def addListViewToToolBar(self):
MediaManagerItem.addListViewToToolBar(self)
@@ -121,8 +121,8 @@
#if not present do not worry
pass
self.ListView.takeItem(item.row())
- SettingsManager.set_list(self.settings_section,
- self.settings_section, self.getFileList())
+ SettingsManager.set_list(self.settingsSection,
+ self.settingsSection, self.getFileList())
def loadList(self, list):
for file in list:
=== modified file 'openlp/plugins/media/lib/mediaitem.py'
--- openlp/plugins/media/lib/mediaitem.py 2010-04-30 16:30:25 +0000
+++ openlp/plugins/media/lib/mediaitem.py 2010-04-30 22:43:19 +0000
@@ -113,7 +113,6 @@
filename = unicode((bitem.data(QtCore.Qt.UserRole)).toString())
Receiver.send_message(u'videodisplay_background', filename)
-
def generateSlideData(self, service_item, item=None):
if item is None:
item = self.ListView.currentItem()
@@ -132,15 +131,15 @@
QtGui.QAbstractItemView.ExtendedSelection)
self.ListView.setIconSize(QtCore.QSize(88,50))
self.loadList(SettingsManager.load_list(
- self.settings_section, self.settings_section))
+ self.settingsSection, self.settingsSection))
def onDeleteClick(self):
item = self.ListView.currentItem()
if item:
row = self.ListView.row(item)
self.ListView.takeItem(row)
- SettingsManager.set_list(self.settings_section,
- self.settings_section, self.getFileList())
+ SettingsManager.set_list(self.settingsSection,
+ self.settingsSection, self.getFileList())
def loadList(self, list):
for file in list:
=== modified file 'openlp/plugins/presentations/lib/impresscontroller.py'
--- openlp/plugins/presentations/lib/impresscontroller.py 2010-04-17 07:31:15 +0000
+++ openlp/plugins/presentations/lib/impresscontroller.py 2010-04-30 22:43:19 +0000
@@ -47,7 +47,7 @@
from PyQt4 import QtCore
-from presentationcontroller import PresentationController, PresentationDocument
+from presentationcontroller import PresentationController, PresentationDocument
log = logging.getLogger(__name__)
@@ -171,13 +171,13 @@
def add_doc(self, name):
log.debug(u'Add Doc OpenOffice')
- doc = ImpressDocument(self, name)
+ doc = ImpressDocument(self, name)
self.docs.append(doc)
return doc
class ImpressDocument(PresentationDocument):
- def __init__(self, controller, presentation):
+ def __init__(self, controller, presentation):
log.debug(u'Init Presentation OpenOffice')
self.controller = controller
self.document = None
=== modified file 'openlp/plugins/presentations/lib/mediaitem.py'
--- openlp/plugins/presentations/lib/mediaitem.py 2010-04-30 16:30:25 +0000
+++ openlp/plugins/presentations/lib/mediaitem.py 2010-04-30 22:43:19 +0000
@@ -106,13 +106,13 @@
def initialise(self):
self.servicePath = os.path.join(
- AppLocation.get_section_data_path(self.settings_section),
+ AppLocation.get_section_data_path(self.settingsSection),
u'thumbnails')
self.ListView.setIconSize(QtCore.QSize(88,50))
if not os.path.exists(self.servicePath):
os.mkdir(self.servicePath)
list = SettingsManager.load_list(
- self.settings_section, u'presentations')
+ self.settingsSection, u'presentations')
self.loadList(list)
for item in self.controllers:
#load the drop down selection
@@ -141,12 +141,12 @@
for controller in self.controllers:
thumbPath = os.path.join(
AppLocation.get_section_data_path(
- self.settings_section),
+ self.settingsSection),
u'thumbnails', controller, filename)
thumb = os.path.join(thumbPath, u'slide1.png')
preview = os.path.join(
AppLocation.get_section_data_path(
- self.settings_section),
+ self.settingsSection),
controller, u'thumbnails', filename, u'slide1.png')
if os.path.exists(preview):
if os.path.exists(thumb):
@@ -170,8 +170,8 @@
if item:
row = self.ListView.row(item)
self.ListView.takeItem(row)
- SettingsManager.set_list(self.settings_section,
- self.settings_section, self.getFileList())
+ SettingsManager.set_list(self.settingsSection,
+ self.settingsSection, self.getFileList())
filepath = unicode((item.data(QtCore.Qt.UserRole)).toString())
#not sure of this has errors
#John please can you look at .
=== modified file 'openlp/plugins/presentations/lib/messagelistener.py'
--- openlp/plugins/presentations/lib/messagelistener.py 2010-04-30 14:49:27 +0000
+++ openlp/plugins/presentations/lib/messagelistener.py 2010-04-30 22:43:19 +0000
@@ -44,7 +44,7 @@
self.doc = None
log.info(u'%s controller loaded' % live)
- def addHandler(self, controller, file, isBlank):
+ def addHandler(self, controller, file, isBlank):
log.debug(u'Live = %s, addHandler %s' % (self.isLive, file))
self.controller = controller
if self.doc is not None:
=== modified file 'openlp/plugins/presentations/lib/powerpointcontroller.py'
--- openlp/plugins/presentations/lib/powerpointcontroller.py 2010-03-23 21:51:20 +0000
+++ openlp/plugins/presentations/lib/powerpointcontroller.py 2010-04-30 22:43:19 +0000
@@ -31,7 +31,7 @@
import _winreg
import win32ui
-from presentationcontroller import PresentationController, PresentationDocument
+from presentationcontroller import PresentationController, PresentationDocument
log = logging.getLogger(__name__)
@@ -62,7 +62,8 @@
log.debug(u'check_available')
if os.name == u'nt':
try:
- _winreg.OpenKey(_winreg.HKEY_CLASSES_ROOT, u'PowerPoint.Application').Close()
+ _winreg.OpenKey(_winreg.HKEY_CLASSES_ROOT,
+ u'PowerPoint.Application').Close()
return True
except:
pass
@@ -96,13 +97,13 @@
def add_doc(self, name):
log.debug(u'Add Doc PowerPoint')
- doc = PowerpointDocument(self, name)
+ doc = PowerpointDocument(self, name)
self.docs.append(doc)
return doc
class PowerpointDocument(PresentationDocument):
- def __init__(self, controller, presentation):
+ def __init__(self, controller, presentation):
log.debug(u'Init Presentation Powerpoint')
self.presentation = None
self.controller = controller
=== modified file 'openlp/plugins/presentations/lib/pptviewcontroller.py'
--- openlp/plugins/presentations/lib/pptviewcontroller.py 2010-03-23 21:51:20 +0000
+++ openlp/plugins/presentations/lib/pptviewcontroller.py 2010-04-30 22:43:19 +0000
@@ -82,7 +82,8 @@
if self.process:
return
log.debug(u'start PPTView')
- self.process = cdll.LoadLibrary(r'openlp\plugins\presentations\lib\pptviewlib\pptviewlib.dll')
+ self.process = cdll.LoadLibrary(
+ r'openlp\plugins\presentations\lib\pptviewlib\pptviewlib.dll')
def kill(self):
"""
@@ -94,13 +95,12 @@
def add_doc(self, name):
log.debug(u'Add Doc PPTView')
- doc = PptviewDocument(self, name)
+ doc = PptviewDocument(self, name)
self.docs.append(doc)
return doc
class PptviewDocument(PresentationDocument):
-
- def __init__(self, controller, presentation):
+ def __init__(self, controller, presentation):
log.debug(u'Init Presentation PowerPoint')
self.presentation = None
self.pptid = None
=== modified file 'openlp/plugins/presentations/lib/presentationcontroller.py'
--- openlp/plugins/presentations/lib/presentationcontroller.py 2010-04-28 14:17:42 +0000
+++ openlp/plugins/presentations/lib/presentationcontroller.py 2010-04-30 22:43:19 +0000
@@ -100,16 +100,16 @@
self.docs = []
self.plugin = plugin
self.name = name
- self.settings_section = self.plugin.settings_section
+ self.settingsSection = self.plugin.settingsSection
self.available = self.check_available()
if self.available:
self.enabled = QtCore.QSettings().value(
- self.settings_section + u'/' + name,
+ self.settingsSection + u'/' + name,
QtCore.Qt.Unchecked).toInt()[0] == QtCore.Qt.Checked
else:
self.enabled = False
self.thumbnailroot = os.path.join(
- AppLocation.get_section_data_path(self.settings_section),
+ AppLocation.get_section_data_path(self.settingsSection),
name, u'thumbnails')
self.thumbnailprefix = u'slide'
if not os.path.isdir(self.thumbnailroot):
@@ -210,7 +210,7 @@
Returns a path to an image containing a preview for the requested slide
"""
- def __init__(self, controller, name):
+ def __init__(self, controller, name):
self.slidenumber = 0
self.controller = controller
self.store_filename(name)
@@ -243,10 +243,10 @@
if not os.path.isdir(self.thumbnailpath):
os.mkdir(self.thumbnailpath)
- def get_file_name(self, presentation):
+ def get_file_name(self, presentation):
return os.path.split(presentation)[1]
- def get_thumbnail_path(self, presentation):
+ def get_thumbnail_path(self, presentation):
return os.path.join(
self.controller.thumbnailroot, self.get_file_name(presentation))
=== modified file 'openlp/plugins/presentations/lib/presentationtab.py'
--- openlp/plugins/presentations/lib/presentationtab.py 2010-04-30 01:31:41 +0000
+++ openlp/plugins/presentations/lib/presentationtab.py 2010-04-30 22:43:19 +0000
@@ -101,7 +101,7 @@
if controller.available:
checkbox = self.PresenterCheckboxes[controller.name]
checkbox.setChecked(QtCore.QSettings().value(
- self.settings_section + u'/' + controller.name,
+ self.settingsSection + u'/' + controller.name,
QtCore.QVariant(0)).toInt()[0])
def save(self):
@@ -109,5 +109,5 @@
controller = self.controllers[key]
checkbox = self.PresenterCheckboxes[controller.name]
QtCore.QSettings().setValue(
- self.settings_section + u'/' + controller.name,
+ self.settingsSection + u'/' + controller.name,
QtCore.QVariant(checkbox.checkState()))
=== modified file 'openlp/plugins/remotes/lib/remotetab.py'
--- openlp/plugins/remotes/lib/remotetab.py 2010-04-30 01:31:41 +0000
+++ openlp/plugins/remotes/lib/remotetab.py 2010-04-30 22:43:19 +0000
@@ -57,9 +57,9 @@
def load(self):
self.RemotePortSpinBox.setValue(
- QtCore.QSettings().value(self.settings_section + u'/remote port',
+ QtCore.QSettings().value(self.settingsSection + u'/remote port',
QtCore.QVariant(4316)).toInt()[0])
def save(self):
- QtCore.QSettings().setValue(self.settings_section + u'/remote port',
+ QtCore.QSettings().setValue(self.settingsSection + u'/remote port',
QtCore.QVariant(self.RemotePortSpinBox.value()))
=== modified file 'openlp/plugins/remotes/remoteplugin.py'
--- openlp/plugins/remotes/remoteplugin.py 2010-04-28 14:17:42 +0000
+++ openlp/plugins/remotes/remoteplugin.py 2010-04-30 22:43:19 +0000
@@ -46,7 +46,7 @@
self.insert_toolbox_item()
self.server = QtNetwork.QUdpSocket()
self.server.bind(
- QtCore.QSettings().value(self.settings_section + u'/remote port',
+ QtCore.QSettings().value(self.settingsSection + u'/remote port',
QtCore.QVariant(4316)).toInt()[0])
QtCore.QObject.connect(self.server,
QtCore.SIGNAL(u'readyRead()'), self.readData)
=== modified file 'openlp/plugins/songs/forms/editsongform.py'
--- openlp/plugins/songs/forms/editsongform.py 2010-04-20 22:12:04 +0000
+++ openlp/plugins/songs/forms/editsongform.py 2010-04-30 22:43:19 +0000
@@ -150,8 +150,7 @@
def loadBooks(self):
books = self.songmanager.get_books()
booksCompleter = QtGui.QCompleter(
- [book.name for book in books],
- self.SongbookCombo)
+ [book.name for book in books], self.SongbookCombo)
booksCompleter.setCaseSensitivity(QtCore.Qt.CaseInsensitive);
self.SongbookCombo.setCompleter(booksCompleter);
self.SongbookCombo.clear()
@@ -340,7 +339,7 @@
self.verse_form.setVerse(u'', self.VerseListWidget.count() + 1, True)
if self.verse_form.exec_():
afterText, verse, subVerse = self.verse_form.getVerse()
- data = u'%s:%s' %(verse, subVerse)
+ data = u'%s:%s' % (verse, subVerse)
item = QtGui.QListWidgetItem(afterText)
item.setData(QtCore.Qt.UserRole, QtCore.QVariant(data))
item.setText(afterText)
@@ -351,11 +350,11 @@
if item:
tempText = item.text()
verseId = unicode((item.data(QtCore.Qt.UserRole)).toString())
- self.verse_form.setVerse(tempText, \
- self.VerseListWidget.count(), True, verseId)
+ self.verse_form.setVerse(
+ tempText, self.VerseListWidget.count(), True, verseId)
if self.verse_form.exec_():
afterText, verse, subVerse = self.verse_form.getVerse()
- data = u'%s:%s' %(verse, subVerse)
+ data = u'%s:%s' % (verse, subVerse)
item.setData(QtCore.Qt.UserRole, QtCore.QVariant(data))
item.setText(afterText)
#number of lines has change so repaint the list moving the data
=== modified file 'openlp/plugins/songs/lib/mediaitem.py'
--- openlp/plugins/songs/lib/mediaitem.py 2010-04-30 01:31:41 +0000
+++ openlp/plugins/songs/lib/mediaitem.py 2010-04-30 22:43:19 +0000
@@ -133,7 +133,7 @@
def configUpdated(self):
self.searchAsYouType = QtCore.QSettings().value(
- self.settings_section + u'/search as type',
+ self.settingsSection + u'/search as type',
QtCore.QVariant(u'False')).toBool()
def retranslateUi(self):
=== modified file 'openlp/plugins/songs/lib/songstab.py'
--- openlp/plugins/songs/lib/songstab.py 2010-04-30 01:31:41 +0000
+++ openlp/plugins/songs/lib/songstab.py 2010-04-30 22:43:19 +0000
@@ -81,7 +81,7 @@
def load(self):
settings = QtCore.QSettings()
- settings.beginGroup(self.settings_section)
+ settings.beginGroup(self.settingsSection)
self.song_search = settings.value(
u'search as type', QtCore.QVariant(False)).toBool()
self.song_bar = settings.value(
@@ -92,7 +92,7 @@
def save(self):
settings = QtCore.QSettings()
- settings.beginGroup(self.settings_section)
+ settings.beginGroup(self.settingsSection)
settings.setValue(u'search as type', QtCore.QVariant(self.song_search))
settings.setValue(u'display songbar', QtCore.QVariant(self.song_bar))
settings.endGroup()
=== modified file 'openlp/plugins/songs/lib/songxml.py'
--- openlp/plugins/songs/lib/songxml.py 2010-03-21 23:58:01 +0000
+++ openlp/plugins/songs/lib/songxml.py 2010-04-30 22:43:19 +0000
@@ -137,7 +137,7 @@
newtag = "Pre-chorus"
else:
newtag = t
- s = (u'# %s %s'%(newtag, c)).rstrip()
+ s = (u'# %s %s' % (newtag, c)).rstrip()
res.append(s)
res.append(l[1:])
if (len(l) == 0) and (not tagPending):
=== modified file 'openlp/plugins/songusage/forms/songusagedetailform.py'
--- openlp/plugins/songusage/forms/songusagedetailform.py 2010-04-30 01:31:41 +0000
+++ openlp/plugins/songusage/forms/songusagedetailform.py 2010-04-30 22:43:19 +0000
@@ -56,15 +56,15 @@
self.FromDate.setSelectedDate(fromDate)
self.ToDate.setSelectedDate(toDate)
self.FileLineEdit.setText(
- SettingsManager.get_last_dir(self.parent.settings_section, 1))
+ SettingsManager.get_last_dir(self.parent.settingsSection, 1))
def defineOutputLocation(self):
path = QtGui.QFileDialog.getExistingDirectory(self,
self.trUtf8('Output File Location'),
- SettingsManager.get_last_dir(self.parent.settings_section, 1))
+ SettingsManager.get_last_dir(self.parent.settingsSection, 1))
path = unicode(path)
if path != u'':
- SettingsManager.set_last_dir(self.parent.settings_section, path, 1)
+ SettingsManager.set_last_dir(self.parent.settingsSection, path, 1)
self.FileLineEdit.setText(path)
def accept(self):
=== modified file 'openlp/plugins/songusage/songusageplugin.py'
--- openlp/plugins/songusage/songusageplugin.py 2010-04-28 14:17:42 +0000
+++ openlp/plugins/songusage/songusageplugin.py 2010-04-30 22:43:19 +0000
@@ -111,7 +111,7 @@
QtCore.SIGNAL(u'slidecontroller_live_started'),
self.onReceiveSongUsage)
self.SongUsageActive = QtCore.QSettings().value(
- self.settings_section + u'/active',
+ self.settingsSection + u'/active',
QtCore.QVariant(False)).toBool()
self.SongUsageStatus.setChecked(self.SongUsageActive)
if self.songusagemanager is None:
@@ -128,7 +128,7 @@
def toggleSongUsageState(self):
self.SongUsageActive = not self.SongUsageActive
- QtCore.QSettings().setValue(self.settings_section + u'/active',
+ QtCore.QSettings().setValue(self.settingsSection + u'/active',
QtCore.QVariant(self.SongUsageActive))
def onReceiveSongUsage(self, items):
=== modified file 'resources/pyinstaller/hook-lxml.objectify.py'
--- resources/pyinstaller/hook-lxml.objectify.py 2010-03-12 22:14:24 +0000
+++ resources/pyinstaller/hook-lxml.objectify.py 2010-04-30 22:43:19 +0000
@@ -1,1 +1,1 @@
-hiddenimports = ['lxml.etree']
+hiddenimports = ['lxml.etree']
Follow ups