forked from openlp/openlp
yet another go at minimizing ppt 2013
This commit is contained in:
parent
b0081a68b0
commit
f74413ebe0
@ -136,15 +136,9 @@ class PowerpointDocument(PresentationDocument):
|
|||||||
# Powerpoint 2013 pops up when loading a file, so we minimize it again
|
# Powerpoint 2013 pops up when loading a file, so we minimize it again
|
||||||
if self.presentation.Application.Version == u'15.0':
|
if self.presentation.Application.Version == u'15.0':
|
||||||
try:
|
try:
|
||||||
self.presentation.Application.ActiveWindow.WindowState = 2
|
self.presentation.Application.WindowState = 2
|
||||||
except:
|
except:
|
||||||
log.error(u'this failed: "self.presentation.Application.ActiveWindow.WindowState = 2", trying option 2...')
|
log.error(u'Failed to minimize main powerpoint window')
|
||||||
log.error(sys.exc_info())
|
|
||||||
try:
|
|
||||||
self.presentation.Application.WindowState = 2
|
|
||||||
except:
|
|
||||||
log.error(u'option 2 failed as well')
|
|
||||||
log.error(sys.exc_info())
|
|
||||||
|
|
||||||
return True
|
return True
|
||||||
except pywintypes.com_error as e:
|
except pywintypes.com_error as e:
|
||||||
@ -308,15 +302,9 @@ class PowerpointDocument(PresentationDocument):
|
|||||||
# Powerpoint 2013 pops up when starting a file, so we minimize it again
|
# Powerpoint 2013 pops up when starting a file, so we minimize it again
|
||||||
if self.presentation.Application.Version == u'15.0':
|
if self.presentation.Application.Version == u'15.0':
|
||||||
try:
|
try:
|
||||||
self.presentation.Application.ActiveWindow.WindowState = 2
|
self.presentation.Application.WindowState = 2
|
||||||
except:
|
except:
|
||||||
log.error(u'this failed: "self.presentation.Application.ActiveWindow.WindowState = 2", trying option 2...')
|
log.error(u'Failed to minimize main powerpoint window')
|
||||||
log.error(sys.exc_info())
|
|
||||||
try:
|
|
||||||
self.presentation.Application.WindowState = 2
|
|
||||||
except:
|
|
||||||
log.error(u'option 2 failed as well')
|
|
||||||
log.error(sys.exc_info())
|
|
||||||
|
|
||||||
def get_slide_number(self):
|
def get_slide_number(self):
|
||||||
"""
|
"""
|
||||||
|
Loading…
Reference in New Issue
Block a user