clean ups

This commit is contained in:
Andreas Preikschat 2012-05-05 14:24:25 +02:00
parent ccc5c20984
commit baf1c792e5
4 changed files with 9 additions and 16 deletions

View File

@ -53,8 +53,7 @@ class OpenLPDockWidget(QtGui.QDockWidget):
self.setWindowIcon(build_icon(icon))
# Sort out the minimum width.
screens = ScreenList.get_instance()
screen_width = screens.current[u'size'].width()
mainwindow_docbars = screen_width / 5
mainwindow_docbars = screens.current[u'size'].width() / 5
if mainwindow_docbars > 300:
self.setMinimumWidth(300)
else:

View File

@ -125,7 +125,7 @@ class Renderer(object):
Set the appropriate theme depending on the theme level.
Called by the service item when building a display frame
``theme``
``override_theme``
The name of the song-level theme. None means the service
item wants to use the given value.

View File

@ -313,17 +313,12 @@ class ServiceItem(object):
self.from_plugin = header[u'from_plugin']
self.capabilities = header[u'capabilities']
# Added later so may not be present in older services.
if u'search' in header:
self.search_string = header[u'search']
self.data_string = header[u'data']
if u'xml_version' in header:
self.xml_version = header[u'xml_version']
if u'start_time' in header:
self.start_time = header[u'start_time']
if u'end_time' in header:
self.end_time = header[u'end_time']
if u'media_length' in header:
self.media_length = header[u'media_length']
self.search_string = header.get(u'search', u'')
self.data_string = header.get(u'data', u'')
self.xml_version = header.get(u'xml_version')
self.start_time = header.get(u'start_time', 0)
self.end_time = header.get(u'end_time', 0)
self.media_length = header.get(u'media_length', 0)
if u'background_audio' in header:
self.background_audio = []
for filename in header[u'background_audio']:

View File

@ -51,7 +51,7 @@ class ServiceManagerList(QtGui.QTreeWidget):
"""
Set up key bindings and mouse behaviour for the service list
"""
def __init__(self, serviceManager, parent=None, name=None):
def __init__(self, serviceManager, parent=None):
QtGui.QTreeWidget.__init__(self, parent)
self.serviceManager = serviceManager
@ -101,7 +101,6 @@ class ServiceManager(QtGui.QWidget):
QtGui.QWidget.__init__(self, parent)
self.mainwindow = mainwindow
self.serviceItems = []
self.serviceName = u''
self.suffixes = []
self.dropPosition = 0
self.expandTabs = False