From 7adb4bbdb582e3289d7326301a3040a66e5a37f3 Mon Sep 17 00:00:00 2001 From: Andreas Preikschat Date: Thu, 7 Mar 2013 13:59:35 +0100 Subject: [PATCH] do not override build-ins, clean ups --- openlp/core/__init__.py | 8 +++----- openlp/core/lib/htmlbuilder.py | 4 ++-- openlp/core/ui/media/mediacontroller.py | 2 +- openlp/core/ui/slidecontroller.py | 4 ++-- openlp/core/ui/themeform.py | 6 +++--- 5 files changed, 11 insertions(+), 13 deletions(-) diff --git a/openlp/core/__init__.py b/openlp/core/__init__.py index c9634b095..41b6f1622 100644 --- a/openlp/core/__init__.py +++ b/openlp/core/__init__.py @@ -102,11 +102,9 @@ class OpenLP(QtGui.QApplication): Run the OpenLP application. """ self.is_event_loop_active = False - # On Windows, the args passed into the constructor are ignored. Not - # very handy, so set the ones we want to use. On Linux and FreeBSD, in - # order to set the WM_CLASS property for X11, we pass "OpenLP" in as a - # command line argument. This interferes with files being passed in as - # command line arguments, so we remove it from the list. + # On Windows, the args passed into the constructor are ignored. Not very handy, so set the ones we want to use. + # On Linux and FreeBSD, in order to set the WM_CLASS property for X11, we pass "OpenLP" in as a command line + # argument. This interferes with files being passed in as command line arguments, so we remove it from the list. if 'OpenLP' in args: args.remove('OpenLP') self.args.extend(args) diff --git a/openlp/core/lib/htmlbuilder.py b/openlp/core/lib/htmlbuilder.py index 1d2b113a1..35b7bd9e2 100644 --- a/openlp/core/lib/htmlbuilder.py +++ b/openlp/core/lib/htmlbuilder.py @@ -244,7 +244,7 @@ def build_html(item, screen, is_live, background, image=None, plugins=None): js_additions += plugin.getDisplayJavaScript() html_additions += plugin.getDisplayHtml() html = HTMLSRC % ( - build_background_css(item, width, height), + build_background_css(item, width), css_additions, build_footer_css(item, height), build_lyrics_css(item, webkit_ver), @@ -269,7 +269,7 @@ def webkit_version(): return webkit_ver -def build_background_css(item, width, height): +def build_background_css(item, width): """ Build the background css diff --git a/openlp/core/ui/media/mediacontroller.py b/openlp/core/ui/media/mediacontroller.py index b0a0b73a0..cc39cb5f8 100644 --- a/openlp/core/ui/media/mediacontroller.py +++ b/openlp/core/ui/media/mediacontroller.py @@ -49,7 +49,7 @@ class MediaSlider(QtGui.QSlider): """ Allows the mouse events of a slider to be overridden and extra functionality added """ - def __init__(self, direction, manager, controller, parent=None): + def __init__(self, direction, manager, controller): """ Constructor """ diff --git a/openlp/core/ui/slidecontroller.py b/openlp/core/ui/slidecontroller.py index 7f5c3d0c6..c209f7b3e 100644 --- a/openlp/core/ui/slidecontroller.py +++ b/openlp/core/ui/slidecontroller.py @@ -578,9 +578,9 @@ class SlideController(DisplayController): width = self.main_window.controlSplitter.sizes()[self.split] for framenumber in range(len(self.service_item.get_frames())): self.preview_list_widget.setRowHeight(framenumber, width / self.ratio) - self.onControllerSizeChanged(self.controller.width(), self.controller.height()) + self.onControllerSizeChanged(self.controller.width()) - def onControllerSizeChanged(self, width, height): + def onControllerSizeChanged(self, width): """ Change layout of display control buttons on controller size change """ diff --git a/openlp/core/ui/themeform.py b/openlp/core/ui/themeform.py index 4631c1d3b..68d8cc216 100644 --- a/openlp/core/ui/themeform.py +++ b/openlp/core/ui/themeform.py @@ -274,12 +274,12 @@ class ThemeForm(QtGui.QWizard, Ui_ThemeWizard): self.setWindowTitle(UiStrings().NewTheme) return QtGui.QWizard.exec_(self) - def initializePage(self, id): + def initializePage(self, page_id): """ Set up the pages for Initial run through dialog """ - log.debug(u'initializePage %s' % id) - wizardPage = self.page(id) + log.debug(u'initializePage %s' % page_id) + wizardPage = self.page(page_id) if wizardPage == self.backgroundPage: self.setBackgroundPageValues() elif wizardPage == self.mainAreaPage: