Automate Presentation filters

This commit is contained in:
Tim Bentley 2010-01-29 11:59:13 +00:00
parent dc6be31d1f
commit 04d7a9227e
5 changed files with 14 additions and 4 deletions

View File

@ -62,6 +62,7 @@ class ImpressController(PresentationController):
""" """
log.debug(u'Initialising') log.debug(u'Initialising')
PresentationController.__init__(self, plugin, u'Impress') PresentationController.__init__(self, plugin, u'Impress')
self.supports= [u'.odp', u'.ppt', u'.pps']
self.process = None self.process = None
self.document = None self.document = None
self.presentation = None self.presentation = None

View File

@ -63,7 +63,13 @@ class PresentationMediaItem(MediaManagerItem):
def retranslateUi(self): def retranslateUi(self):
self.OnNewPrompt = self.trUtf8('Select Presentation(s)') self.OnNewPrompt = self.trUtf8('Select Presentation(s)')
self.OnNewFileMasks = self.trUtf8('Presentations (*.ppt *.pps *.odp)') fileType = u''
for controller in self.controllers:
if self.controllers[controller].enabled:
for type in self.controllers[controller].supports:
if fileType.find(type) == -1:
fileType += type + u' '
self.OnNewFileMasks = self.trUtf8('Presentations (%s)' % fileType)
def requiredIcons(self): def requiredIcons(self):
MediaManagerItem.requiredIcons(self) MediaManagerItem.requiredIcons(self)

View File

@ -52,6 +52,7 @@ class PowerpointController(PresentationController):
""" """
log.debug(u'Initialising') log.debug(u'Initialising')
PresentationController.__init__(self, plugin, u'Powerpoint') PresentationController.__init__(self, plugin, u'Powerpoint')
self.supports= [u'.ppt', u'.pps']
self.process = None self.process = None
self.presentation = None self.presentation = None

View File

@ -49,6 +49,7 @@ class PptviewController(PresentationController):
log.debug(u'Initialising') log.debug(u'Initialising')
self.process = None self.process = None
PresentationController.__init__(self, plugin, u'Powerpoint Viewer') PresentationController.__init__(self, plugin, u'Powerpoint Viewer')
self.supports= [u'.ppt', u'.pps']
self.pptid = None self.pptid = None
def check_available(self): def check_available(self):

View File

@ -136,6 +136,7 @@ class PresentationController(object):
``name`` ``name``
Name of the application, to appear in the application Name of the application, to appear in the application
""" """
self.supports = []
self.plugin = plugin self.plugin = plugin
self.name = name self.name = name
self.available = self.check_available() self.available = self.check_available()