forked from openlp/openlp
Fix up Presentations so Impress works!
This commit is contained in:
parent
ca919b74c3
commit
1ef543253c
@ -519,7 +519,7 @@ class Renderer(object):
|
|||||||
self.footerFont = QtGui.QFont(self._theme.font_footer_name,
|
self.footerFont = QtGui.QFont(self._theme.font_footer_name,
|
||||||
int(self._theme.font_footer_proportion), # size
|
int(self._theme.font_footer_proportion), # size
|
||||||
int(footer_weight), # weight
|
int(footer_weight), # weight
|
||||||
self._theme.font_footer_italics)# italic
|
self._theme.font_footer_italics) # italic
|
||||||
self.footerFont.setPixelSize(int(self._theme.font_footer_proportion))
|
self.footerFont.setPixelSize(int(self._theme.font_footer_proportion))
|
||||||
main_weight = 50
|
main_weight = 50
|
||||||
if self._theme.font_main_weight == u'Bold':
|
if self._theme.font_main_weight == u'Bold':
|
||||||
|
@ -88,13 +88,13 @@ class ServiceItem(object):
|
|||||||
The render method is what renders the frames for the screen.
|
The render method is what renders the frames for the screen.
|
||||||
"""
|
"""
|
||||||
log.debug(u'Render called')
|
log.debug(u'Render called')
|
||||||
if self.theme == None:
|
|
||||||
self.RenderManager.set_override_theme(None)
|
|
||||||
else:
|
|
||||||
self.RenderManager.set_override_theme(self.theme)
|
|
||||||
log.debug(u'Formatting slides')
|
|
||||||
self.frames = []
|
self.frames = []
|
||||||
if self.service_item_type == ServiceType.Text:
|
if self.service_item_type == ServiceType.Text:
|
||||||
|
log.debug(u'Formatting slides')
|
||||||
|
if self.theme == None:
|
||||||
|
self.RenderManager.set_override_theme(None)
|
||||||
|
else:
|
||||||
|
self.RenderManager.set_override_theme(self.theme)
|
||||||
for slide in self.service_frames:
|
for slide in self.service_frames:
|
||||||
formated = self.RenderManager.format_slide(slide[u'raw_slide'])
|
formated = self.RenderManager.format_slide(slide[u'raw_slide'])
|
||||||
for format in formated:
|
for format in formated:
|
||||||
|
@ -277,7 +277,7 @@ class AmendThemeForm(QtGui.QDialog, Ui_AmendThemeDialog):
|
|||||||
self.previewTheme(self.theme)
|
self.previewTheme(self.theme)
|
||||||
|
|
||||||
def onFontMainDefaultCheckBoxChanged(self, value):
|
def onFontMainDefaultCheckBoxChanged(self, value):
|
||||||
if value == 2: # checked
|
if value == QtCore.Qt.Checked: # checked
|
||||||
self.theme.font_main_override = False
|
self.theme.font_main_override = False
|
||||||
else:
|
else:
|
||||||
self.theme.font_main_override = True
|
self.theme.font_main_override = True
|
||||||
@ -356,7 +356,7 @@ class AmendThemeForm(QtGui.QDialog, Ui_AmendThemeDialog):
|
|||||||
self.previewTheme(self.theme)
|
self.previewTheme(self.theme)
|
||||||
|
|
||||||
def onFontFooterDefaultCheckBoxChanged(self, value):
|
def onFontFooterDefaultCheckBoxChanged(self, value):
|
||||||
if value == 2: # checked
|
if value == QtCore.Qt.Checked: # checked
|
||||||
self.theme.font_footer_override = False
|
self.theme.font_footer_override = False
|
||||||
else:
|
else:
|
||||||
self.theme.font_footer_override = True
|
self.theme.font_footer_override = True
|
||||||
@ -466,7 +466,7 @@ class AmendThemeForm(QtGui.QDialog, Ui_AmendThemeDialog):
|
|||||||
#Other Tab
|
#Other Tab
|
||||||
#
|
#
|
||||||
def onOutlineCheckBoxChanged(self, value):
|
def onOutlineCheckBoxChanged(self, value):
|
||||||
if value == 2: # checked
|
if value == QtCore.Qt.Checked: # checked
|
||||||
self.theme.display_outline = True
|
self.theme.display_outline = True
|
||||||
else:
|
else:
|
||||||
self.theme.display_outline = False
|
self.theme.display_outline = False
|
||||||
@ -481,7 +481,7 @@ class AmendThemeForm(QtGui.QDialog, Ui_AmendThemeDialog):
|
|||||||
self.previewTheme(self.theme)
|
self.previewTheme(self.theme)
|
||||||
|
|
||||||
def onShadowCheckBoxChanged(self, value):
|
def onShadowCheckBoxChanged(self, value):
|
||||||
if value == 2: # checked
|
if value == QtCore.Qt.Checked: # checked
|
||||||
self.theme.display_shadow = True
|
self.theme.display_shadow = True
|
||||||
else:
|
else:
|
||||||
self.theme.display_shadow = False
|
self.theme.display_shadow = False
|
||||||
|
@ -184,14 +184,14 @@ class BiblesTab(SettingsTab):
|
|||||||
check_state = self.NewChaptersCheckBox.checkState()
|
check_state = self.NewChaptersCheckBox.checkState()
|
||||||
self.show_new_chapters = False
|
self.show_new_chapters = False
|
||||||
# we have a set value convert to True/False
|
# we have a set value convert to True/False
|
||||||
if check_state == 2:
|
if check_state == QtCore.Qt.Checked:
|
||||||
self.show_new_chapters = True
|
self.show_new_chapters = True
|
||||||
|
|
||||||
def onBibleSearchCheckBoxChanged(self):
|
def onBibleSearchCheckBoxChanged(self):
|
||||||
check_state = self.BibleSearchCheckBox.checkState()
|
check_state = self.BibleSearchCheckBox.checkState()
|
||||||
self.bible_search = False
|
self.bible_search = False
|
||||||
# we have a set value convert to True/False
|
# we have a set value convert to True/False
|
||||||
if check_state == 2:
|
if check_state == QtCore.Qt.Checked:
|
||||||
self.bible_search = True
|
self.bible_search = True
|
||||||
|
|
||||||
def load(self):
|
def load(self):
|
||||||
|
@ -23,7 +23,7 @@
|
|||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
from impresscontroller import ImpressController
|
from impresscontroller import ImpressController
|
||||||
from powerpointcontroller import PowerpointController
|
#from powerpointcontroller import PowerpointController
|
||||||
from messagelistener import MessageListener
|
from messagelistener import MessageListener
|
||||||
from mediaitem import PresentationMediaItem
|
from mediaitem import PresentationMediaItem
|
||||||
from presentationtab import PresentationTab
|
from presentationtab import PresentationTab
|
||||||
|
@ -21,8 +21,10 @@
|
|||||||
# with this program; if not, write to the Free Software Foundation, Inc., 59 #
|
# with this program; if not, write to the Free Software Foundation, Inc., 59 #
|
||||||
# Temple Place, Suite 330, Boston, MA 02111-1307 USA #
|
# Temple Place, Suite 330, Boston, MA 02111-1307 USA #
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
try:
|
||||||
from win32com.client import Dispatch
|
from win32com.client import Dispatch
|
||||||
|
except:
|
||||||
|
pass
|
||||||
|
|
||||||
# PPT API documentation:
|
# PPT API documentation:
|
||||||
# http://msdn.microsoft.com/en-us/library/aa269321(office.10).aspx
|
# http://msdn.microsoft.com/en-us/library/aa269321(office.10).aspx
|
||||||
|
@ -30,7 +30,12 @@ from PyQt4 import QtCore, QtGui
|
|||||||
|
|
||||||
from openlp.core.lib import Plugin, MediaManagerItem
|
from openlp.core.lib import Plugin, MediaManagerItem
|
||||||
from openlp.plugins.presentations.lib import PresentationMediaItem, PresentationTab, \
|
from openlp.plugins.presentations.lib import PresentationMediaItem, PresentationTab, \
|
||||||
ImpressController, PowerpointController
|
ImpressController
|
||||||
|
try:
|
||||||
|
from openlp.plugins.presentations.lib import PowerpointController
|
||||||
|
except:
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
class PresentationPlugin(Plugin):
|
class PresentationPlugin(Plugin):
|
||||||
|
|
||||||
@ -72,7 +77,7 @@ class PresentationPlugin(Plugin):
|
|||||||
"""
|
"""
|
||||||
log.debug('check_pre_conditions')
|
log.debug('check_pre_conditions')
|
||||||
#Lets see if Impress is required (Default is Not wanted)
|
#Lets see if Impress is required (Default is Not wanted)
|
||||||
if int(self.config.get_config(u'Impress', 0)) == QtCore.Qt.Checked:
|
if int(self.config.get_config(u'Impress', QtCore.Qt.Unchecked)) == QtCore.Qt.Checked:
|
||||||
try:
|
try:
|
||||||
#Check to see if we have uno installed
|
#Check to see if we have uno installed
|
||||||
import uno
|
import uno
|
||||||
@ -80,8 +85,8 @@ class PresentationPlugin(Plugin):
|
|||||||
self.registerControllers(u'Impress', openoffice)
|
self.registerControllers(u'Impress', openoffice)
|
||||||
except:
|
except:
|
||||||
log.error(u'Reason : %s', sys.exc_info())
|
log.error(u'Reason : %s', sys.exc_info())
|
||||||
#Lets see if Impress is required (Default is Not wanted)
|
#Lets see if Powerpoint is required (Default is Not wanted)
|
||||||
if int(self.config.get_config(u'Powerpoint', 0)) == QtCore.Qt.Checked:
|
if int(self.config.get_config(u'Powerpoint', QtCore.Qt.Unchecked)) == QtCore.Qt.Checked:
|
||||||
try:
|
try:
|
||||||
#Check to see if we are Win32
|
#Check to see if we are Win32
|
||||||
from win32com.client import Dispatch
|
from win32com.client import Dispatch
|
||||||
@ -89,8 +94,8 @@ class PresentationPlugin(Plugin):
|
|||||||
self.registerControllers(u'Powerpoint', powerpoint)
|
self.registerControllers(u'Powerpoint', powerpoint)
|
||||||
except:
|
except:
|
||||||
log.error(u'Reason : %s', sys.exc_info())
|
log.error(u'Reason : %s', sys.exc_info())
|
||||||
#Lets see if Impress is required (Default is Not wanted)
|
#Lets see if Powerpoint Viewer is required (Default is Not wanted)
|
||||||
if int(self.config.get_config(u'Powerpoint Viewer', 0)) == QtCore.Qt.Checked:
|
if int(self.config.get_config(u'Powerpoint Viewer', QtCore.Qt.Unchecked)) == QtCore.Qt.Checked:
|
||||||
try:
|
try:
|
||||||
#Check to see if we are Win32
|
#Check to see if we are Win32
|
||||||
from win32com.client import Dispatch
|
from win32com.client import Dispatch
|
||||||
|
@ -42,7 +42,7 @@ class RemotesPlugin(Plugin):
|
|||||||
"""
|
"""
|
||||||
log.debug('check_pre_conditions')
|
log.debug('check_pre_conditions')
|
||||||
#Lets see if Remote is required
|
#Lets see if Remote is required
|
||||||
if int(self.config.get_config(u'startup', 0)) == 2:
|
if int(self.config.get_config(u'startup', 0)) == QtCore.Qt.Checked:
|
||||||
return True
|
return True
|
||||||
else:
|
else:
|
||||||
return False
|
return False
|
||||||
|
Loading…
Reference in New Issue
Block a user