openlp-core team mailing list archive
-
openlp-core team
-
Mailing list archive
-
Message #07725
[Merge] lp:~j-corwin/openlp/general into lp:openlp
Jonathan Corwin has proposed merging lp:~j-corwin/openlp/general into lp:openlp.
Requested reviews:
OpenLP Core (openlp-core)
Related bugs:
Bug #634771 in OpenLP: "OpenLP 1.9.2+bzr1016-0ubuntu1~lucid1 does not start"
https://bugs.launchpad.net/openlp/+bug/634771
Bug #646718 in OpenLP: "Songbook, Number will not loaded, Title will not be saved"
https://bugs.launchpad.net/openlp/+bug/646718
Bug #696013 in OpenLP: "song import from powerpoint crashes every second time"
https://bugs.launchpad.net/openlp/+bug/696013
Bug #696021 in OpenLP: "presentation loader does not work fine in Windows using Powerpoint Viewer 2007"
https://bugs.launchpad.net/openlp/+bug/696021
Bug #696637 in OpenLP: "Alert not positioned correctly in single screen"
https://bugs.launchpad.net/openlp/+bug/696637
Bug #727732 in OpenLP: "Openlp 1.9.?? crashes on start"
https://bugs.launchpad.net/openlp/+bug/727732
Bug #735039 in OpenLP: "Cannot import PowerPoint Presentations with PowerPoint 2010"
https://bugs.launchpad.net/openlp/+bug/735039
For more details, see:
https://code.launchpad.net/~j-corwin/openlp/general/+merge/56036
Fix bug when click go-live button in Service Manager, but there is nothing to go live.
Add new advanced option, allowing to preview immediately in the Media Manager. Songs, Custom, Bible and Images. (Probably not recommended for slower machines, but works OK on mine)
Add keyboard shortcuts for media manager:
Delete : Deletes item
+ : Adds item to service
Enter : Previews item
Shift-Enter : Goes live on item
--
https://code.launchpad.net/~j-corwin/openlp/general/+merge/56036
Your team OpenLP Core is requested to review the proposed merge of lp:~j-corwin/openlp/general into lp:openlp.
=== modified file 'openlp/core/lib/__init__.py'
--- openlp/core/lib/__init__.py 2011-03-28 20:18:55 +0000
+++ openlp/core/lib/__init__.py 2011-04-02 10:01:28 +0000
@@ -166,7 +166,7 @@
QtGui.QIcon.Normal, QtGui.QIcon.Off)
return button_icon
-def context_menu_action(base, icon, text, slot):
+def context_menu_action(base, icon, text, slot, shortcuts=None):
"""
Utility method to help build context menus for plugins
@@ -186,6 +186,8 @@
if icon:
action.setIcon(build_icon(icon))
QtCore.QObject.connect(action, QtCore.SIGNAL(u'triggered()'), slot)
+ if shortcuts:
+ action.setShortcuts(shortcuts)
return action
def context_menu(base, icon, text):
=== modified file 'openlp/core/lib/mediamanageritem.py'
--- openlp/core/lib/mediamanageritem.py 2011-03-24 19:04:02 +0000
+++ openlp/core/lib/mediamanageritem.py 2011-04-02 10:01:28 +0000
@@ -101,6 +101,7 @@
self.toolbar = None
self.remoteTriggered = None
self.singleServiceItem = True
+ self.quickPreviewAllowed = False
self.pageLayout = QtGui.QVBoxLayout(self)
self.pageLayout.setSpacing(0)
self.pageLayout.setMargin(0)
@@ -266,23 +267,25 @@
context_menu_action(
self.listView, u':/general/general_delete.png',
self.plugin.getString(StringContent.Delete)[u'title'],
- self.onDeleteClick))
+ self.onDeleteClick, [QtCore.Qt.Key_Delete]))
self.listView.addAction(context_menu_separator(self.listView))
self.listView.addAction(
context_menu_action(
self.listView, u':/general/general_preview.png',
self.plugin.getString(StringContent.Preview)[u'title'],
- self.onPreviewClick))
+ self.onPreviewClick, [QtCore.Qt.Key_Enter]))
self.listView.addAction(
context_menu_action(
self.listView, u':/general/general_live.png',
self.plugin.getString(StringContent.Live)[u'title'],
- self.onLiveClick))
+ self.onLiveClick, [QtCore.Qt.ShiftModifier + \
+ QtCore.Qt.Key_Enter, QtCore.Qt.ShiftModifier + \
+ QtCore.Qt.Key_Return]))
self.listView.addAction(
context_menu_action(
self.listView, u':/general/general_add.png',
self.plugin.getString(StringContent.Service)[u'title'],
- self.onAddClick))
+ self.onAddClick, [QtCore.Qt.Key_Plus, QtCore.Qt.Key_Equal]))
if self.addToServiceItem:
self.listView.addAction(
context_menu_action(
@@ -293,6 +296,9 @@
QtCore.QObject.connect(self.listView,
QtCore.SIGNAL(u'doubleClicked(QModelIndex)'),
self.onClickPressed)
+ QtCore.QObject.connect(self.listView,
+ QtCore.SIGNAL(u'itemSelectionChanged()'),
+ self.onSelectionChange)
def initialise(self):
"""
@@ -411,7 +417,16 @@
else:
self.onPreviewClick()
- def onPreviewClick(self):
+ def onSelectionChange(self):
+ """
+ Allows the change of current item in the list to be actioned
+ """
+ if QtCore.QSettings().value(u'advanced/single click preview',
+ QtCore.QVariant(False)).toBool() and self.quickPreviewAllowed \
+ and self.listView.selectedIndexes():
+ self.onPreviewClick(True)
+
+ def onPreviewClick(self, keepFocus=False):
"""
Preview an item by building a service item then adding that service
item to the preview slide controller.
@@ -426,6 +441,8 @@
if serviceItem:
serviceItem.from_plugin = True
self.parent.previewController.addServiceItem(serviceItem)
+ if keepFocus:
+ self.listView.setFocus()
def onLiveClick(self):
"""
=== modified file 'openlp/core/ui/advancedtab.py'
--- openlp/core/ui/advancedtab.py 2011-03-24 19:04:02 +0000
+++ openlp/core/ui/advancedtab.py 2011-04-02 10:01:28 +0000
@@ -67,6 +67,10 @@
self.doubleClickLiveCheckBox = QtGui.QCheckBox(self.uiGroupBox)
self.doubleClickLiveCheckBox.setObjectName(u'doubleClickLiveCheckBox')
self.uiLayout.addRow(self.doubleClickLiveCheckBox)
+ self.singleClickPreviewCheckBox = QtGui.QCheckBox(self.uiGroupBox)
+ self.singleClickPreviewCheckBox.setObjectName(
+ u'singleClickPreviewCheckBox')
+ self.uiLayout.addRow(self.singleClickPreviewCheckBox)
self.expandServiceItemCheckBox = QtGui.QCheckBox(self.uiGroupBox)
self.expandServiceItemCheckBox.setObjectName(
u'expandServiceItemCheckBox')
@@ -130,6 +134,8 @@
'Remember active media manager tab on startup'))
self.doubleClickLiveCheckBox.setText(translate('OpenLP.AdvancedTab',
'Double-click to send items straight to live'))
+ self.singleClickPreviewCheckBox.setText(translate('OpenLP.AdvancedTab',
+ 'Preview items when clicked in Media Manager'))
self.expandServiceItemCheckBox.setText(translate('OpenLP.AdvancedTab',
'Expand new service items on creation'))
self.enableAutoCloseCheckBox.setText(translate('OpenLP.AdvancedTab',
@@ -164,6 +170,9 @@
self.doubleClickLiveCheckBox.setChecked(
settings.value(u'double click live',
QtCore.QVariant(False)).toBool())
+ self.singleClickPreviewCheckBox.setChecked(
+ settings.value(u'single click preview',
+ QtCore.QVariant(False)).toBool())
self.expandServiceItemCheckBox.setChecked(
settings.value(u'expand service item',
QtCore.QVariant(False)).toBool())
@@ -193,6 +202,8 @@
QtCore.QVariant(self.mediaPluginCheckBox.isChecked()))
settings.setValue(u'double click live',
QtCore.QVariant(self.doubleClickLiveCheckBox.isChecked()))
+ settings.setValue(u'single click preview',
+ QtCore.QVariant(self.singleClickPreviewCheckBox.isChecked()))
settings.setValue(u'expand service item',
QtCore.QVariant(self.expandServiceItemCheckBox.isChecked()))
settings.setValue(u'enable exit confirmation',
=== modified file 'openlp/core/ui/servicemanager.py'
--- openlp/core/ui/servicemanager.py 2011-03-31 07:31:08 +0000
+++ openlp/core/ui/servicemanager.py 2011-04-02 10:01:28 +0000
@@ -1125,6 +1125,9 @@
-1 is passed if the value is not set
"""
item, child = self.findServiceItem()
+ # No items in service
+ if item == -1:
+ return
if row != -1:
child = row
if self.serviceItems[item][u'service_item'].is_valid:
=== modified file 'openlp/plugins/custom/lib/mediaitem.py'
--- openlp/plugins/custom/lib/mediaitem.py 2011-03-24 19:04:02 +0000
+++ openlp/plugins/custom/lib/mediaitem.py 2011-04-02 10:01:28 +0000
@@ -46,6 +46,7 @@
self.IconPath = u'custom/custom'
MediaManagerItem.__init__(self, parent, self, icon)
self.singleServiceItem = False
+ self.quickPreviewAllowed = True
# Holds information about whether the edit is remotly triggered and
# which Custom is required.
self.remoteCustom = -1
=== modified file 'openlp/plugins/images/lib/mediaitem.py'
--- openlp/plugins/images/lib/mediaitem.py 2011-03-24 19:04:02 +0000
+++ openlp/plugins/images/lib/mediaitem.py 2011-04-02 10:01:28 +0000
@@ -46,6 +46,7 @@
def __init__(self, parent, plugin, icon):
self.IconPath = u'images/image'
MediaManagerItem.__init__(self, parent, self, icon)
+ self.quickPreviewAllowed = True
QtCore.QObject.connect(Receiver.get_receiver(),
QtCore.SIGNAL(u'live_theme_changed'), self.liveThemeChanged)
=== modified file 'openlp/plugins/songs/lib/mediaitem.py'
--- openlp/plugins/songs/lib/mediaitem.py 2011-03-24 19:04:02 +0000
+++ openlp/plugins/songs/lib/mediaitem.py 2011-04-02 10:01:28 +0000
@@ -73,6 +73,7 @@
self.remoteSong = -1
self.editItem = None
self.whitespace = re.compile(r'\W+', re.UNICODE)
+ self.quickPreviewAllowed = True
def addEndHeaderBar(self):
self.addToolbarSeparator()
Follow ups