forked from openlp/openlp
Add maintain menu item
This commit is contained in:
parent
de8d0f4d9c
commit
c1182aa9cc
@ -69,6 +69,7 @@ class ServiceItem(object):
|
||||
self.service_item_path = None
|
||||
self.service_item_type = None
|
||||
self.edit_enabled = False
|
||||
self.maintain_allowed = False
|
||||
self._raw_frames = []
|
||||
self._display_frames = []
|
||||
self._uuid = unicode(uuid.uuid1())
|
||||
|
@ -202,6 +202,8 @@ class ServiceManager(QtGui.QWidget):
|
||||
self.menu = QtGui.QMenu()
|
||||
self.editAction = self.menu.addAction(self.trUtf8('&Edit Item'))
|
||||
self.editAction.setIcon(build_icon(u':/services/service_edit.png'))
|
||||
self.maintainAction = self.menu.addAction(self.trUtf8('&Maintain Item'))
|
||||
self.maintainAction.setIcon(build_icon(u':/services/service_edit.png'))
|
||||
self.notesAction = self.menu.addAction(self.trUtf8('&Notes'))
|
||||
self.notesAction.setIcon(build_icon(u':/services/service_notes.png'))
|
||||
self.deleteAction = self.menu.addAction(self.trUtf8('&Delete From Service'))
|
||||
@ -227,9 +229,12 @@ class ServiceManager(QtGui.QWidget):
|
||||
pos = item.parent().data(0, QtCore.Qt.UserRole).toInt()[0]
|
||||
serviceItem = self.serviceItems[pos - 1]
|
||||
self.editAction.setVisible(False)
|
||||
self.maintainAction.setVisible(False)
|
||||
self.notesAction.setVisible(False)
|
||||
if serviceItem[u'service_item'].edit_enabled:
|
||||
self.editAction.setVisible(True)
|
||||
if serviceItem[u'service_item'].maintain_allowed:
|
||||
self.maintainAction.setVisible(True)
|
||||
if item.parent() is None:
|
||||
self.notesAction.setVisible(True)
|
||||
self.themeMenu.menuAction().setVisible(False)
|
||||
|
@ -146,6 +146,7 @@ class ImageMediaItem(MediaManagerItem):
|
||||
if items:
|
||||
service_item.title = self.trUtf8('Image(s)')
|
||||
service_item.autoPreviewAllowed = True
|
||||
service_item.maintain_allowed = True
|
||||
for item in items:
|
||||
bitem = self.ListView.item(item.row())
|
||||
filename = unicode((bitem.data(QtCore.Qt.UserRole)).toString())
|
||||
|
Loading…
Reference in New Issue
Block a user