Merge lp:~j-corwin/openlp/presentations into lp:openlp

Proposed by Jonathan Corwin
Status: Superseded
Proposed branch: lp:~j-corwin/openlp/presentations
Merge into: lp:openlp
Diff against target: 172 lines
2 files modified
openlp/plugins/presentations/lib/__init__.py (+1/-0)
openlp/plugins/presentations/lib/pptviewcontroller.py (+68/-37)
To merge this branch: bzr merge lp:~j-corwin/openlp/presentations
Reviewer Review Type Date Requested Status
OpenLP Core Pending
Review via email: mp+12383@code.launchpad.net

This proposal has been superseded by a proposal from 2009-09-24.

To post a comment you must log in.
Revision history for this message
Jonathan Corwin (j-corwin) wrote :

Got powerpoint viewer working!

lp:~j-corwin/openlp/presentations updated
570. By Jon Tibble

PPTViewer fixes

571. By Jon Tibble

Imports clean up

572. By Tim Bentley

Plugin changes to Audit, Song and Custom

573. By Jon Tibble

None testing and clean ups

574. By Tim Bentley

Plugin updates

575. By Jonathan Corwin

Jons Presentation merge with hack to fix conflicts

576. By Tim Bentley

Audit changes and cleanups

577. By Jonathan Corwin

Presentation merge with gotos

578. By Jon Tibble

Fix presentation starting

579. By Jonathan Corwin

Controllers are now completely self contained.

580. By Jonathan Corwin

Reinstate lost import

Unmerged revisions

580. By Jonathan Corwin

Reinstate lost import

579. By Jonathan Corwin

Controllers are now completely self contained.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'openlp/plugins/presentations/lib/__init__.py'
2--- openlp/plugins/presentations/lib/__init__.py 2009-09-24 18:46:16 +0000
3+++ openlp/plugins/presentations/lib/__init__.py 2009-09-24 21:48:12 +0000
4@@ -21,6 +21,7 @@
5 # with this program; if not, write to the Free Software Foundation, Inc., 59 #
6 # Temple Place, Suite 330, Boston, MA 02111-1307 USA #
7 ###############################################################################
8+
9 import os
10
11 from impresscontroller import ImpressController
12
13=== modified file 'openlp/plugins/presentations/lib/pptviewcontroller.py'
14--- openlp/plugins/presentations/lib/pptviewcontroller.py 2009-09-24 07:35:30 +0000
15+++ openlp/plugins/presentations/lib/pptviewcontroller.py 2009-09-24 21:48:12 +0000
16@@ -27,6 +27,7 @@
17 import time
18 import sys
19 import win32api
20+
21 from ctypes import *
22 from ctypes.wintypes import RECT
23
24@@ -72,19 +73,16 @@
25 and started.
26
27 ``presentation``
28- The file name of the presentatios to the run.
29+ The file name of the presentations to run.
30 """
31 log.debug(u'LoadPresentation')
32- if(self.pptid>=0):
33- self.CloseClick()
34- rect = RECT()
35- rect.left = 0
36- rect.top = 0
37- rect.width = 0
38- rect.hight = 0
39+ if self.pptid >= 0:
40+ self.closePresentation()
41+ rect = RECT(0, 0, 800, 600) # until such time I can get screen info
42+ filename = str(presentation.replace(u'/', u'\\'));
43 try:
44- tempfolder = None #r'c:\temp\pptviewlib\' + presentation
45- self.pptid = self.presentation.OpenPPT(presentation, None, rect, tempfolder)
46+ tempfolder = None #r'c:\temp\pptviewlib\' + filename.split('u\\')[-1]
47+ self.pptid = self.presentation.OpenPPT(filename, None, rect, tempfolder)
48 except:
49 log.exception(u'Failed to load presentation')
50 #self.slidecount = pptdll.GetSlideCount(self.pptid)
51@@ -95,62 +93,95 @@
52 Triggerent by new object being added to SlideController orOpenLP
53 being shut down
54 """
55- if(self.pptid<0): return
56- self.presentation.Close(self.pptid)
57+ if self.pptid < 0:
58+ return
59+ self.presentation.ClosePPT(self.pptid)
60 self.pptid = -1
61
62+ def nextStep(self):
63+ """
64+ Triggers the next effect of slide on the running presentation
65+ """
66+ if self.pptid < 0:
67+ return
68+ self.presentation.NextStep(self.pptid)
69+
70+ def previousStep(self):
71+ """
72+ Triggers the previous slide on the running presentation
73+ """
74+ if self.pptid < 0:
75+ return
76+ self.presentation.PrevStep(self.pptid)
77+
78 def isActive(self):
79+ """
80+ Returns true if a presentation is currently active
81+ """
82 return self.pptid >= 0
83
84 def resume(self):
85- if(self.pptid<0): return
86+ """
87+ Resumes a previously paused presentation
88+ """
89+ if self.pptid < 0:
90+ return
91 self.presentation.Resume(self.pptid)
92
93 def pause(self):
94+ """
95+ Not implemented (pauses a presentation)
96+ """
97 return
98
99 def blankScreen(self):
100- if(self.pptid<0): return
101+ """
102+ Blanks the screen
103+ """
104+ if self.pptid < 0:
105+ return
106 self.presentation.Blank(self.pptid)
107
108 def unblankScreen(self):
109- if(self.pptid<0): return
110+ """
111+ Unblanks (restores) the presentationn
112+ """
113+ if self.pptid < 0:
114+ return
115 self.presentation.Unblank(self.pptid)
116
117 def stop(self):
118- if(self.pptid<0): return
119+ """
120+ Stops the current presentation and hides the output
121+ """
122+ if self.pptid < 0:
123+ return
124 self.presentation.Stop(self.pptid)
125
126 def go(self):
127- if(self.pptid<0): return
128+ """
129+ Starts a presentation from the beginning
130+ """
131+ if self.pptid < 0:
132+ return
133 self.presentation.RestartShow(self.pptid)
134
135 def getSlideNumber(self):
136- if(self.pptid<0): return -1
137+ """
138+ Returns the current slide number
139+ """
140+ if self.pptid < 0:
141+ return -1
142 return self.presentation.GetCurrentSlide(self.pptid)
143
144 def setSlideNumber(self, slideno):
145- if(self.pptid<0): return
146+ """
147+ Moves to a specific slide in the presentation
148+ """
149+ if self.pptid < 0:
150+ return
151 self.presentation.GotoSlide(self.pptid, slideno)
152
153 slideNumber = property(getSlideNumber, setSlideNumber)
154
155- def nextStep(self):
156- """
157- Triggers the next effect of slide on the running presentation
158- """
159- if(self.pptid<0): return
160- self.presentation.NextStep(self.pptid)
161-
162- def previousStep(self):
163- """
164- Triggers the previous slide on the running presentation
165- """
166- if self.pptid<0: return
167- self.presentation.PrevStep(self.pptid)
168-
169- def NextClick(self):
170- if(self.pptid<0): return
171- pptdll.NextStep(self.pptid)
172- self.slideEdit.setText(pptdll.GetCurrentSlide(self.pptid))
173