more clean ups + fix error message shown when remote is being used

This commit is contained in:
Andreas Preikschat 2012-04-20 21:33:43 +02:00
parent 0038f4fa31
commit e8cbf8e3f0
2 changed files with 7 additions and 12 deletions

View File

@ -339,7 +339,6 @@ class ImpressDocument(PresentationDocument):
Returns true if a presentation is loaded
"""
log.debug(u'is loaded OpenOffice')
#print "is_loaded "
if self.presentation is None or self.document is None:
log.debug("is_loaded: no presentation or document")
return False
@ -357,14 +356,9 @@ class ImpressDocument(PresentationDocument):
Returns true if a presentation is active and running
"""
log.debug(u'is active OpenOffice')
#print "is_active "
if not self.is_loaded():
#print "False "
return False
#print "self.con ", self.control
if self.control is None:
return False
return True
return self.control is not None
def unblank_screen(self):
"""

View File

@ -299,11 +299,12 @@ class PresentationMediaItem(MediaManagerItem):
return False
else:
# File is no longer present
critical_error_message_box(
translate('PresentationPlugin.MediaItem',
'Missing Presentation'),
unicode(translate('PresentationPlugin.MediaItem',
'The presentation %s no longer exists.')) % filename)
if not remote:
critical_error_message_box(
translate('PresentationPlugin.MediaItem',
'Missing Presentation'),
unicode(translate('PresentationPlugin.MediaItem',
'The presentation %s no longer exists.')) % filename)
return False
def findControllerByType(self, filename):