openlp-core team mailing list archive
-
openlp-core team
-
Mailing list archive
-
Message #01128
[Merge] lp:~trb143/openlp/futures into lp:openlp
Tim Bentley has proposed merging lp:~trb143/openlp/futures into lp:openlp.
Requested reviews:
OpenLP Core (openlp-core)
Service Manager fixes
--
https://code.launchpad.net/~trb143/openlp/futures/+merge/20989
Your team OpenLP Core is subscribed to branch lp:openlp.
=== modified file 'openlp/core/ui/servicemanager.py'
--- openlp/core/ui/servicemanager.py 2010-03-07 20:45:27 +0000
+++ openlp/core/ui/servicemanager.py 2010-03-09 18:53:14 +0000
@@ -158,20 +158,20 @@
# Add the bottom toolbar
self.OrderToolbar = OpenLPToolbar(self)
self.OrderToolbar.addToolbarButton(
- self.trUtf8('Move to top'), u':/services/service_top.png',
+ self.trUtf8('Move to &top'), u':/services/service_top.png',
self.trUtf8('Move to top'), self.onServiceTop)
self.OrderToolbar.addToolbarButton(
- self.trUtf8('Move up'), u':/services/service_up.png',
+ self.trUtf8('Move &up'), u':/services/service_up.png',
self.trUtf8('Move up order'), self.onServiceUp)
self.OrderToolbar.addToolbarButton(
- self.trUtf8('Move down'), u':/services/service_down.png',
+ self.trUtf8('Move &down'), u':/services/service_down.png',
self.trUtf8('Move down order'), self.onServiceDown)
self.OrderToolbar.addToolbarButton(
- self.trUtf8('Move to bottom'), u':/services/service_bottom.png',
+ self.trUtf8('Move to &bottom'), u':/services/service_bottom.png',
self.trUtf8('Move to end'), self.onServiceEnd)
self.OrderToolbar.addSeparator()
self.OrderToolbar.addToolbarButton(
- self.trUtf8('Delete From Service'), u':/services/service_delete.png',
+ self.trUtf8('&Delete From Service'), u':/services/service_delete.png',
self.trUtf8('Delete From Service'), self.onDeleteFromService)
self.Layout.addWidget(self.OrderToolbar)
# Connect up our signals and slots
@@ -199,18 +199,20 @@
#build the context menu
self.menu = QtGui.QMenu()
self.editAction = self.menu.addAction(self.trUtf8('&Edit Item'))
- self.editAction.setIcon(build_icon(':/services/service_edit.png'))
+ self.editAction.setIcon(build_icon(u':/services/service_edit.png'))
self.notesAction = self.menu.addAction(self.trUtf8('&Notes'))
- self.notesAction.setIcon(build_icon(':/services/service_notes.png'))
+ self.notesAction.setIcon(build_icon(u':/services/service_notes.png'))
+ self.deleteAction = self.menu.addAction(self.trUtf8('&Delete From Service'))
+ self.deleteAction.setIcon(build_icon(u':/services/service_delete.png'))
self.sep1 = self.menu.addAction(u'')
self.sep1.setSeparator(True)
self.previewAction = self.menu.addAction(self.trUtf8('&Preview Verse'))
- self.previewAction.setIcon(build_icon(':/system/system_preview.png'))
+ self.previewAction.setIcon(build_icon(u':/system/system_preview.png'))
self.liveAction = self.menu.addAction(self.trUtf8('&Live Verse'))
- self.liveAction.setIcon(build_icon(':/system/system_live.png'))
+ self.liveAction.setIcon(build_icon(u':/system/system_live.png'))
self.sep2 = self.menu.addAction(u'')
self.sep2.setSeparator(True)
- self.themeMenu = QtGui.QMenu(self.trUtf8('&Change Item Theme'))
+ self.themeMenu = QtGui.QMenu(self.trUtf8(u'&Change Item Theme'))
self.menu.addMenu(self.themeMenu)
def contextMenu(self, point):
@@ -232,6 +234,8 @@
action = self.menu.exec_(self.ServiceManagerList.mapToGlobal(point))
if action == self.editAction:
self.remoteEdit()
+ if action == self.deleteAction:
+ self.onDeleteFromService()
if action == self.notesAction:
self.onServiceItemNoteForm()
if action == self.previewAction:
@@ -433,7 +437,6 @@
icon = QtGui.QImage(serviceitem.icon)
icon = icon.scaled(80, 80, QtCore.Qt.KeepAspectRatio,
QtCore.Qt.SmoothTransformation)
-
overlay = QtGui.QImage(':/services/service_item_notes.png')
overlay = overlay.scaled(80, 80, QtCore.Qt.KeepAspectRatio,
QtCore.Qt.SmoothTransformation)
@@ -447,7 +450,6 @@
treewidgetitem.setToolTip(0, serviceitem.notes)
treewidgetitem.setData(0, QtCore.Qt.UserRole,
QtCore.QVariant(item[u'order']))
- treewidgetitem.setExpanded(item[u'expanded'])
for count, frame in enumerate(serviceitem.get_frames()):
treewidgetitem1 = QtGui.QTreeWidgetItem(treewidgetitem)
text = frame[u'title']
@@ -455,7 +457,11 @@
treewidgetitem1.setData(0, QtCore.Qt.UserRole,
QtCore.QVariant(count))
if serviceItem == itemcount and serviceItemCount == count:
- self.ServiceManagerList.setCurrentItem(treewidgetitem1)
+ #preserve expanding status as setCurrentItem sets it to True
+ temp = item[u'expanded']
+ self.ServiceManagerList.setCurrentItem(treewidgetitem1)
+ item[u'expanded'] = temp
+ treewidgetitem.setExpanded(item[u'expanded'])
def onSaveService(self, quick=False):
"""
=== modified file 'openlp/plugins/alerts/alertsplugin.py'
--- openlp/plugins/alerts/alertsplugin.py 2010-02-27 15:31:23 +0000
+++ openlp/plugins/alerts/alertsplugin.py 2010-03-09 18:53:14 +0000
@@ -66,7 +66,7 @@
self.toolsAlertItem.setObjectName(u'toolsAlertItem')
self.toolsAlertItem.setText(self.trUtf8('&Alert'))
self.toolsAlertItem.setStatusTip(self.trUtf8('Show an alert message'))
- self.toolsAlertItem.setShortcut(self.trUtf8('F7'))
+ self.toolsAlertItem.setShortcut(u'F7')
self.service_manager.parent.ToolsMenu.addAction(self.toolsAlertItem)
QtCore.QObject.connect(self.toolsAlertItem,
QtCore.SIGNAL(u'triggered()'), self.onAlertsTrigger)
Follow ups