Removed extra line

Made PowerpontController class compatible with Linux
This commit is contained in:
Felipe Polo-Wood 2013-10-31 22:53:52 -04:00
parent e958e17889
commit fecd56106d
2 changed files with 28 additions and 15 deletions

View File

@ -1037,7 +1037,6 @@ class SlideController(DisplayController):
Registry().execute('%s_next' % self.service_item.name.lower(), [self.service_item, self.is_live])
if self.service_item.is_command() and self.is_live:
self.update_preview()
else:
row = self.preview_widget.current_slide_number() + 1
if row == self.preview_widget.slide_count():

View File

@ -32,13 +32,14 @@ This modul is for controlling powerpiont. PPT API documentation:
"""
import os
import logging
if os.name == 'nt':
from win32com.client import Dispatch
from .ppt import *
import win32com
import winreg
import win32ui
import pywintypes
from .ppt import constants
from openlp.core.lib import ScreenList, Registry
from .presentationcontroller import PresentationController, PresentationDocument
@ -356,19 +357,32 @@ def _get_text_from_shapes(shapes):
text += shape.TextFrame.TextRange.Text + '\n'
return text
ppE = win32com.client.getevents("PowerPoint.Application")
if os.name == "nt":
ppE = win32com.client.getevents("PowerPoint.Application")
class PowerpointEvents(ppE):
def OnSlideShowBegin(self, hwnd ):
print("SS Begin")
def OnSlideShowEnd(self, pres):
print("SS End")
class PowerpointEvents(ppE):
def OnSlideShowBegin(self, hwnd ):
#print("SS Begin")
return
def OnSlideShowNextSlide( self, hwnd ):
Registry().execute('slidecontroller_live_change', hwnd.View.CurrentShowPosition - 1)
print('Slide change:',hwnd.View.CurrentShowPosition)
def OnSlideShowOnNext(self, hwnd ):
print("SS Advance")
def OnSlideShowOnPrevious(self, hwnd):
print("SS GoBack")
def OnSlideShowEnd(self, pres):
#print("SS End")
return
def OnSlideShowNextSlide( self, hwnd ):
Registry().execute('slidecontroller_live_change', hwnd.View.CurrentShowPosition - 1)
#print('Slide change:',hwnd.View.CurrentShowPosition)
return
def OnSlideShowOnNext(self, hwnd ):
#print("SS Advance")
return
def OnSlideShowOnPrevious(self, hwnd):
#print("SS GoBack")
return
else:
class constants():
ppPlaceholderBody = 2