Clean up after TRB143's attempts to outclean Meths

Fix pptview plugin when running as exe
This commit is contained in:
Jonathan Corwin 2010-07-02 23:18:54 +01:00
parent 3705410d5d
commit db961c76db
4 changed files with 7 additions and 4 deletions

View File

@ -131,6 +131,7 @@ class Plugin(QtCore.QObject):
self.settingsForm = plugin_helpers[u'settings form'] self.settingsForm = plugin_helpers[u'settings form']
self.mediadock = plugin_helpers[u'toolbox'] self.mediadock = plugin_helpers[u'toolbox']
self.displayManager = plugin_helpers[u'displaymanager'] self.displayManager = plugin_helpers[u'displaymanager']
self.pluginManager = plugin_helpers[u'pluginmanager']
QtCore.QObject.connect(Receiver.get_receiver(), QtCore.QObject.connect(Receiver.get_receiver(),
QtCore.SIGNAL(u'%s_add_service_item' % self.name), QtCore.SIGNAL(u'%s_add_service_item' % self.name),
self.process_add_service_event) self.process_add_service_event)

View File

@ -581,6 +581,7 @@ class MainWindow(QtGui.QMainWindow, Ui_MainWindow):
self.plugin_helpers[u'settings form'] = self.settingsForm self.plugin_helpers[u'settings form'] = self.settingsForm
self.plugin_helpers[u'toolbox'] = self.mediaDockManager self.plugin_helpers[u'toolbox'] = self.mediaDockManager
self.plugin_helpers[u'displaymanager'] = self.displayManager self.plugin_helpers[u'displaymanager'] = self.displayManager
self.plugin_helpers[u'pluginmanager'] = self.plugin_manager
self.plugin_manager.find_plugins(pluginpath, self.plugin_helpers) self.plugin_manager.find_plugins(pluginpath, self.plugin_helpers)
# hook methods have to happen after find_plugins. Find plugins needs # hook methods have to happen after find_plugins. Find plugins needs
# the controllers hence the hooks have moved from setupUI() to here # the controllers hence the hooks have moved from setupUI() to here

View File

@ -77,7 +77,7 @@ class PresentationMediaItem(MediaManagerItem):
for type in types: for type in types:
if fileType.find(type) == -1: if fileType.find(type) == -1:
fileType += u'*%s ' % type fileType += u'*%s ' % type
self.parent.service_manager.supportedSuffixes(type) self.parent.serviceManager.supportedSuffixes(type)
self.OnNewFileMasks = translate('PresentationPlugin.MediaItem', self.OnNewFileMasks = translate('PresentationPlugin.MediaItem',
'Presentations (%s)' % fileType) 'Presentations (%s)' % fileType)

View File

@ -79,8 +79,9 @@ class PptviewController(PresentationController):
if self.process: if self.process:
return return
log.debug(u'start PPTView') log.debug(u'start PPTView')
self.process = cdll.LoadLibrary( dllpath = os.path.join(self.plugin.pluginManager.basepath,
r'openlp\plugins\presentations\lib\pptviewlib\pptviewlib.dll') u'presentations', u'lib', u'pptviewlib', u'pptviewlib.dll')
self.process = cdll.LoadLibrary(dllpath)
#self.process.SetDebug(1) #self.process.SetDebug(1)
def kill(self): def kill(self):
@ -118,7 +119,7 @@ class PptviewDocument(PresentationDocument):
log.debug(u'LoadPresentation') log.debug(u'LoadPresentation')
#if self.pptid >= 0: #if self.pptid >= 0:
# self.close_presentation() # self.close_presentation()
rendermanager = self.controller.plugin.render_manager rendermanager = self.controller.plugin.renderManager
rect = rendermanager.screens.current[u'size'] rect = rendermanager.screens.current[u'size']
rect = RECT(rect.x(), rect.y(), rect.right(), rect.bottom()) rect = RECT(rect.x(), rect.y(), rect.right(), rect.bottom())
filepath = str(self.filepath.replace(u'/', u'\\')) filepath = str(self.filepath.replace(u'/', u'\\'))