forked from openlp/openlp
A couple of bug fixes and minor enhancements.
bzr-revno: 1305
This commit is contained in:
commit
739c540284
@ -36,7 +36,7 @@ class Ui_ShortcutListDialog(object):
|
|||||||
self.treeWidget = QtGui.QTreeWidget(shortcutListDialog)
|
self.treeWidget = QtGui.QTreeWidget(shortcutListDialog)
|
||||||
self.treeWidget.setAlternatingRowColors(True)
|
self.treeWidget.setAlternatingRowColors(True)
|
||||||
self.treeWidget.setObjectName(u'treeWidget')
|
self.treeWidget.setObjectName(u'treeWidget')
|
||||||
self.treeWidget.setColumnCount(2)
|
self.treeWidget.setColumnCount(3)
|
||||||
self.dialogLayout.addWidget(self.treeWidget)
|
self.dialogLayout.addWidget(self.treeWidget)
|
||||||
self.defaultButton = QtGui.QRadioButton(shortcutListDialog)
|
self.defaultButton = QtGui.QRadioButton(shortcutListDialog)
|
||||||
self.defaultButton.setChecked(True)
|
self.defaultButton.setChecked(True)
|
||||||
@ -78,7 +78,8 @@ class Ui_ShortcutListDialog(object):
|
|||||||
translate('OpenLP.ShortcutListDialog', 'Customize Shortcuts'))
|
translate('OpenLP.ShortcutListDialog', 'Customize Shortcuts'))
|
||||||
self.treeWidget.setHeaderLabels([
|
self.treeWidget.setHeaderLabels([
|
||||||
translate('OpenLP.ShortcutListDialog', 'Action'),
|
translate('OpenLP.ShortcutListDialog', 'Action'),
|
||||||
translate('OpenLP.ShortcutListDialog', 'Shortcut')])
|
translate('OpenLP.ShortcutListDialog', 'Shortcut'),
|
||||||
|
translate('OpenLP.ShortcutListDialog', 'Alternate')])
|
||||||
self.defaultButton.setText(
|
self.defaultButton.setText(
|
||||||
translate('OpenLP.ShortcutListDialog', 'Default: %s'))
|
translate('OpenLP.ShortcutListDialog', 'Default: %s'))
|
||||||
self.customButton.setText(
|
self.customButton.setText(
|
||||||
|
@ -95,8 +95,13 @@ class ShortcutListForm(QtGui.QDialog, Ui_ShortcutListDialog):
|
|||||||
item = QtGui.QTreeWidgetItem([category.name])
|
item = QtGui.QTreeWidgetItem([category.name])
|
||||||
for action in category.actions:
|
for action in category.actions:
|
||||||
actionText = REMOVE_AMPERSAND.sub('', unicode(action.text()))
|
actionText = REMOVE_AMPERSAND.sub('', unicode(action.text()))
|
||||||
shortcutText = action.shortcut().toString()
|
if (len(action.shortcuts()) == 2):
|
||||||
actionItem = QtGui.QTreeWidgetItem([actionText, shortcutText])
|
shortcutText = action.shortcuts()[0].toString()
|
||||||
|
alternateText = action.shortcuts()[1].toString()
|
||||||
|
else:
|
||||||
|
shortcutText = action.shortcut().toString()
|
||||||
|
alternateText = u''
|
||||||
|
actionItem = QtGui.QTreeWidgetItem([actionText, shortcutText, alternateText])
|
||||||
actionItem.setIcon(0, action.icon())
|
actionItem.setIcon(0, action.icon())
|
||||||
item.addChild(actionItem)
|
item.addChild(actionItem)
|
||||||
item.setExpanded(True)
|
item.setExpanded(True)
|
||||||
|
@ -380,7 +380,7 @@ class SlideController(QtGui.QWidget):
|
|||||||
self.previousItem.setShortcuts([QtCore.Qt.Key_Up, QtCore.Qt.Key_PageUp])
|
self.previousItem.setShortcuts([QtCore.Qt.Key_Up, QtCore.Qt.Key_PageUp])
|
||||||
self.previousItem.setShortcutContext(
|
self.previousItem.setShortcutContext(
|
||||||
QtCore.Qt.WidgetWithChildrenShortcut)
|
QtCore.Qt.WidgetWithChildrenShortcut)
|
||||||
actionList.add_action(self.nextItem, u'Live')
|
actionList.add_action(self.previousItem, u'Live')
|
||||||
self.nextItem.setShortcuts([QtCore.Qt.Key_Down, QtCore.Qt.Key_PageDown])
|
self.nextItem.setShortcuts([QtCore.Qt.Key_Down, QtCore.Qt.Key_PageDown])
|
||||||
self.nextItem.setShortcutContext(QtCore.Qt.WidgetWithChildrenShortcut)
|
self.nextItem.setShortcutContext(QtCore.Qt.WidgetWithChildrenShortcut)
|
||||||
actionList.add_action(self.nextItem, u'Live')
|
actionList.add_action(self.nextItem, u'Live')
|
||||||
|
@ -382,13 +382,13 @@ def get_uno_command():
|
|||||||
"""
|
"""
|
||||||
Returns the UNO command to launch an openoffice.org instance.
|
Returns the UNO command to launch an openoffice.org instance.
|
||||||
"""
|
"""
|
||||||
|
COMMAND = u'soffice'
|
||||||
|
OPTIONS = u'-nologo -norestore -minimized -invisible -nofirststartwizard'
|
||||||
if UNO_CONNECTION_TYPE == u'pipe':
|
if UNO_CONNECTION_TYPE == u'pipe':
|
||||||
return u'openoffice.org -nologo -norestore -minimized -invisible ' \
|
CONNECTION = u'"-accept=pipe,name=openlp_pipe;urp;"'
|
||||||
+ u'-nofirststartwizard -accept=pipe,name=openlp_pipe;urp;'
|
|
||||||
else:
|
else:
|
||||||
return u'openoffice.org -nologo -norestore -minimized ' \
|
CONNECTION = u'"-accept=socket,host=localhost,port=2002;urp;"'
|
||||||
+ u'-invisible -nofirststartwizard ' \
|
return u'%s %s %s' % (COMMAND, OPTIONS, CONNECTION)
|
||||||
+ u'-accept=socket,host=localhost,port=2002;urp;'
|
|
||||||
|
|
||||||
def get_uno_instance(resolver):
|
def get_uno_instance(resolver):
|
||||||
"""
|
"""
|
||||||
|
@ -147,8 +147,10 @@ class PowerpointDocument(PresentationDocument):
|
|||||||
"""
|
"""
|
||||||
if self.check_thumbnails():
|
if self.check_thumbnails():
|
||||||
return
|
return
|
||||||
self.presentation.Export(os.path.join(self.get_thumbnail_folder(), ''),
|
for num in range(0, self.presentation.Slides.Count):
|
||||||
'png', 320, 240)
|
self.presentation.Slides(num + 1).Export(os.path.join(
|
||||||
|
self.get_thumbnail_folder(), 'slide%d.png' % (num + 1)),
|
||||||
|
'png', 320, 240)
|
||||||
|
|
||||||
def close_presentation(self):
|
def close_presentation(self):
|
||||||
"""
|
"""
|
||||||
|
@ -154,8 +154,9 @@ class PptviewDocument(PresentationDocument):
|
|||||||
being shut down
|
being shut down
|
||||||
"""
|
"""
|
||||||
log.debug(u'ClosePresentation')
|
log.debug(u'ClosePresentation')
|
||||||
self.controller.process.ClosePPT(self.pptid)
|
if self.controller.process:
|
||||||
self.pptid = -1
|
self.controller.process.ClosePPT(self.pptid)
|
||||||
|
self.pptid = -1
|
||||||
self.controller.remove_doc(self)
|
self.controller.remove_doc(self)
|
||||||
|
|
||||||
def is_loaded(self):
|
def is_loaded(self):
|
||||||
|
Loading…
Reference in New Issue
Block a user