Fix indentations

This commit is contained in:
Jon Tibble 2010-05-24 23:37:20 +01:00
parent f6d7743905
commit 122756eca5
8 changed files with 38 additions and 32 deletions

View File

@ -15,3 +15,4 @@ OpenLP.egg-info
build
resources/innosetup/Output
_eric4project
.pylint.d

View File

@ -43,12 +43,12 @@ class ServiceItemType(object):
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):
"""

View File

@ -136,12 +136,15 @@ class Theme(object):
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):

View File

@ -810,8 +810,8 @@ class ServiceManager(QtGui.QWidget):
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 @@ class ServiceManager(QtGui.QWidget):
#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)

View File

@ -426,11 +426,12 @@ class SlideController(QtGui.QWidget):
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):
"""

View File

@ -354,10 +354,10 @@ class ImpressDocument(PresentationDocument):
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):
"""

View File

@ -73,7 +73,7 @@ class PptviewController(PresentationController):
self.start_process()
return self.process.CheckInstalled()
except:
return False
return False
def start_process(self):
"""

View File

@ -151,7 +151,7 @@ class PresentationController(object):
if doc is None:
return
if doc in self.docs:
self.docs.remove(doc)
self.docs.remove(doc)
def close_presentation(self):
pass