diff --git a/openlp/plugins/presentations/lib/impresscontroller.py b/openlp/plugins/presentations/lib/impresscontroller.py index aef32dabc..37890eb37 100644 --- a/openlp/plugins/presentations/lib/impresscontroller.py +++ b/openlp/plugins/presentations/lib/impresscontroller.py @@ -44,6 +44,7 @@ import time if os.name == u'nt': from win32com.client import Dispatch import pywintypes + # Declare an empty exception to match the exception imported from UNO class ErrorCodeIOException(Exception): pass @@ -63,6 +64,7 @@ from presentationcontroller import PresentationController, PresentationDocument log = logging.getLogger(__name__) + class ImpressController(PresentationController): """ Class to control interactions with Impress presentations. @@ -79,7 +81,7 @@ class ImpressController(PresentationController): PresentationController.__init__(self, plugin, u'Impress', ImpressDocument) self.supports = [u'odp'] - self.alsosupports = [u'ppt', u'pps', u'pptx', u'ppsx'] + self.alsosupports = [u'ppt', u'pps', u'pptx', u'ppsx', u'pptm'] self.process = None self.desktop = None self.manager = None diff --git a/openlp/plugins/presentations/lib/mediaitem.py b/openlp/plugins/presentations/lib/mediaitem.py index b307eebb3..2f944810f 100644 --- a/openlp/plugins/presentations/lib/mediaitem.py +++ b/openlp/plugins/presentations/lib/mediaitem.py @@ -45,6 +45,7 @@ log = logging.getLogger(__name__) ERROR = QtGui.QImage(u':/general/general_delete.png') + class PresentationMediaItem(MediaManagerItem): """ This is the Presentation media manager item for Presentation Items. @@ -88,10 +89,10 @@ class PresentationMediaItem(MediaManagerItem): if self.controllers[controller].enabled(): types = self.controllers[controller].supports + \ self.controllers[controller].alsosupports - for type in types: - if fileType.find(type) == -1: - fileType += u'*.%s ' % type - self.plugin.serviceManager.supportedSuffixes(type) + for type_ in types: + if fileType.find(type_) == -1: + fileType += u'*.%s ' % type_ + self.plugin.serviceManager.supportedSuffixes(type_) self.onNewFileMasks = unicode(translate('PresentationPlugin.MediaItem', 'Presentations (%s)')) % fileType diff --git a/openlp/plugins/presentations/lib/powerpointcontroller.py b/openlp/plugins/presentations/lib/powerpointcontroller.py index fac11a2b6..4f078f928 100644 --- a/openlp/plugins/presentations/lib/powerpointcontroller.py +++ b/openlp/plugins/presentations/lib/powerpointcontroller.py @@ -43,6 +43,7 @@ log = logging.getLogger(__name__) # PPT API documentation: # http://msdn.microsoft.com/en-us/library/aa269321(office.10).aspx + class PowerpointController(PresentationController): """ Class to control interactions with PowerPoint Presentations @@ -58,7 +59,7 @@ class PowerpointController(PresentationController): log.debug(u'Initialising') PresentationController.__init__(self, plugin, u'Powerpoint', PowerpointDocument) - self.supports = [u'ppt', u'pps', u'pptx', u'ppsx'] + self.supports = [u'ppt', u'pps', u'pptx', u'ppsx', u'pptm'] self.process = None def check_available(self): diff --git a/openlp/plugins/presentations/lib/pptviewcontroller.py b/openlp/plugins/presentations/lib/pptviewcontroller.py index a568985de..0242f0597 100644 --- a/openlp/plugins/presentations/lib/pptviewcontroller.py +++ b/openlp/plugins/presentations/lib/pptviewcontroller.py @@ -38,6 +38,7 @@ from presentationcontroller import PresentationController, PresentationDocument log = logging.getLogger(__name__) + class PptviewController(PresentationController): """ Class to control interactions with PowerPOint Viewer Presentations @@ -54,7 +55,7 @@ class PptviewController(PresentationController): self.process = None PresentationController.__init__(self, plugin, u'Powerpoint Viewer', PptviewDocument) - self.supports = [u'ppt', u'pps', u'pptx', u'ppsx'] + self.supports = [u'ppt', u'pps', u'pptx', u'ppsx', u'pptm'] def check_available(self): """