forked from openlp/openlp
clean up + fix
This commit is contained in:
parent
c36475f27e
commit
cb13f805e4
@ -352,8 +352,7 @@ class MediaController(object):
|
|||||||
if overriddenPlayer and overriddenPlayer != u'auto':
|
if overriddenPlayer and overriddenPlayer != u'auto':
|
||||||
usedPlayers = [overriddenPlayer]
|
usedPlayers = [overriddenPlayer]
|
||||||
if controller.media_info.file_info.isFile():
|
if controller.media_info.file_info.isFile():
|
||||||
suffix = u'*.%s' % \
|
suffix = u'*.%s' % controller.media_info.file_info.suffix().lower()
|
||||||
controller.media_info.file_info.suffix().toLower()
|
|
||||||
for title in usedPlayers:
|
for title in usedPlayers:
|
||||||
player = self.mediaPlayers[title]
|
player = self.mediaPlayers[title]
|
||||||
if suffix in player.video_extensions_list:
|
if suffix in player.video_extensions_list:
|
||||||
|
@ -738,10 +738,10 @@ class ServiceManager(QtGui.QWidget):
|
|||||||
item = self.serviceManagerList.itemAt(point)
|
item = self.serviceManagerList.itemAt(point)
|
||||||
if item is None:
|
if item is None:
|
||||||
return
|
return
|
||||||
if item.parent() is None:
|
if item.parent():
|
||||||
pos = item.data(0, QtCore.Qt.UserRole).toInt()[0]
|
|
||||||
else:
|
|
||||||
pos = item.parent().data(0, QtCore.Qt.UserRole).toInt()[0]
|
pos = item.parent().data(0, QtCore.Qt.UserRole).toInt()[0]
|
||||||
|
else:
|
||||||
|
pos = item.data(0, QtCore.Qt.UserRole).toInt()[0]
|
||||||
serviceItem = self.serviceItems[pos - 1]
|
serviceItem = self.serviceItems[pos - 1]
|
||||||
self.editAction.setVisible(False)
|
self.editAction.setVisible(False)
|
||||||
self.maintainAction.setVisible(False)
|
self.maintainAction.setVisible(False)
|
||||||
@ -750,13 +750,12 @@ class ServiceManager(QtGui.QWidget):
|
|||||||
if serviceItem[u'service_item'].is_capable(ItemCapabilities.CanEdit)\
|
if serviceItem[u'service_item'].is_capable(ItemCapabilities.CanEdit)\
|
||||||
and serviceItem[u'service_item'].edit_id:
|
and serviceItem[u'service_item'].edit_id:
|
||||||
self.editAction.setVisible(True)
|
self.editAction.setVisible(True)
|
||||||
if serviceItem[u'service_item']\
|
if serviceItem[u'service_item'].is_capable(
|
||||||
.is_capable(ItemCapabilities.CanMaintain):
|
ItemCapabilities.CanMaintain):
|
||||||
self.maintainAction.setVisible(True)
|
self.maintainAction.setVisible(True)
|
||||||
if item.parent() is None:
|
self.notesAction.setVisible(item.parent() is None)
|
||||||
self.notesAction.setVisible(True)
|
if serviceItem[u'service_item'].is_capable(
|
||||||
if serviceItem[u'service_item']\
|
ItemCapabilities.HasVariableStartTime):
|
||||||
.is_capable(ItemCapabilities.HasVariableStartTime):
|
|
||||||
self.timeAction.setVisible(True)
|
self.timeAction.setVisible(True)
|
||||||
self.themeMenu.menuAction().setVisible(False)
|
self.themeMenu.menuAction().setVisible(False)
|
||||||
# Set up the theme menu.
|
# Set up the theme menu.
|
||||||
|
Loading…
Reference in New Issue
Block a user