forked from openlp/openlp
Fixes and cleanups
This commit is contained in:
parent
49ecc162ad
commit
92e90b91e5
@ -114,7 +114,7 @@ class MediaManagerItem(QtGui.QWidget):
|
|||||||
self.Toolbar = None
|
self.Toolbar = None
|
||||||
self.remoteTriggered = None
|
self.remoteTriggered = None
|
||||||
self.ServiceItemIconName = None
|
self.ServiceItemIconName = None
|
||||||
self.addToServiceItem = True
|
self.addToServiceItem = False
|
||||||
self.PageLayout = QtGui.QVBoxLayout(self)
|
self.PageLayout = QtGui.QVBoxLayout(self)
|
||||||
self.PageLayout.setSpacing(0)
|
self.PageLayout.setSpacing(0)
|
||||||
self.PageLayout.setContentsMargins(4, 0, 4, 0)
|
self.PageLayout.setContentsMargins(4, 0, 4, 0)
|
||||||
@ -303,7 +303,7 @@ class MediaManagerItem(QtGui.QWidget):
|
|||||||
if self.addToServiceItem:
|
if self.addToServiceItem:
|
||||||
self.ListView.addAction(
|
self.ListView.addAction(
|
||||||
contextMenuAction(
|
contextMenuAction(
|
||||||
self.ListView, u':/system/system_add.png',
|
self.ListView, u':/general/general_add.png',
|
||||||
self.trUtf8('&Add to selected Service Item'),
|
self.trUtf8('&Add to selected Service Item'),
|
||||||
self.onAddEditClick))
|
self.onAddEditClick))
|
||||||
QtCore.QObject.connect(
|
QtCore.QObject.connect(
|
||||||
|
@ -581,7 +581,7 @@ class SlideController(QtGui.QWidget):
|
|||||||
if force:
|
if force:
|
||||||
self.themeButton.setChecked(True)
|
self.themeButton.setChecked(True)
|
||||||
if self.hideButton.isChecked():
|
if self.hideButton.isChecked():
|
||||||
self.parent.mainDisplay.hide1Display()
|
self.parent.mainDisplay.hideDisplay()
|
||||||
else:
|
else:
|
||||||
self.parent.mainDisplay.showDisplay()
|
self.parent.mainDisplay.showDisplay()
|
||||||
|
|
||||||
|
@ -81,6 +81,7 @@ class BibleMediaItem(MediaManagerItem):
|
|||||||
self.hasNewIcon = False
|
self.hasNewIcon = False
|
||||||
self.hasEditIcon = False
|
self.hasEditIcon = False
|
||||||
self.hasDeleteIcon = False
|
self.hasDeleteIcon = False
|
||||||
|
self.addToServiceItem = True
|
||||||
|
|
||||||
def addEndHeaderBar(self):
|
def addEndHeaderBar(self):
|
||||||
self.SearchTabWidget = QtGui.QTabWidget(self)
|
self.SearchTabWidget = QtGui.QTabWidget(self)
|
||||||
|
@ -27,7 +27,8 @@ import logging
|
|||||||
import os
|
import os
|
||||||
|
|
||||||
from PyQt4 import QtCore, QtGui
|
from PyQt4 import QtCore, QtGui
|
||||||
from openlp.core.lib import MediaManagerItem, BaseListWithDnD, build_icon
|
from openlp.core.lib import MediaManagerItem, BaseListWithDnD, build_icon, \
|
||||||
|
contextMenuAction, contextMenuSeparator
|
||||||
|
|
||||||
log = logging.getLogger(__name__)
|
log = logging.getLogger(__name__)
|
||||||
|
|
||||||
@ -52,7 +53,6 @@ class ImageMediaItem(MediaManagerItem):
|
|||||||
# be instanced by the base MediaManagerItem
|
# be instanced by the base MediaManagerItem
|
||||||
self.ListViewWithDnD_class = ImageListView
|
self.ListViewWithDnD_class = ImageListView
|
||||||
self.servicePath = None
|
self.servicePath = None
|
||||||
self.addToServiceItem = True
|
|
||||||
MediaManagerItem.__init__(self, parent, icon, title)
|
MediaManagerItem.__init__(self, parent, icon, title)
|
||||||
|
|
||||||
def initPluginNameVisible(self):
|
def initPluginNameVisible(self):
|
||||||
@ -68,6 +68,7 @@ class ImageMediaItem(MediaManagerItem):
|
|||||||
self.hasFileIcon = True
|
self.hasFileIcon = True
|
||||||
self.hasNewIcon = False
|
self.hasNewIcon = False
|
||||||
self.hasEditIcon = False
|
self.hasEditIcon = False
|
||||||
|
self.addToServiceItem = True
|
||||||
|
|
||||||
def initialise(self):
|
def initialise(self):
|
||||||
log.debug(u'initialise')
|
log.debug(u'initialise')
|
||||||
@ -81,6 +82,15 @@ class ImageMediaItem(MediaManagerItem):
|
|||||||
os.mkdir(self.servicePath)
|
os.mkdir(self.servicePath)
|
||||||
self.loadList(self.parent.config.load_list(self.ConfigSection))
|
self.loadList(self.parent.config.load_list(self.ConfigSection))
|
||||||
|
|
||||||
|
def addListViewToToolBar(self):
|
||||||
|
MediaManagerItem.addListViewToToolBar(self)
|
||||||
|
self.ListView.setContextMenuPolicy(QtCore.Qt.ActionsContextMenu)
|
||||||
|
self.ListView.addAction(
|
||||||
|
contextMenuAction(
|
||||||
|
self.ListView, u':/slides/slide_blank.png',
|
||||||
|
self.trUtf8('Replace Live Background'),
|
||||||
|
self.onReplaceClick))
|
||||||
|
|
||||||
def addEndHeaderBar(self):
|
def addEndHeaderBar(self):
|
||||||
self.ImageWidget = QtGui.QWidget(self)
|
self.ImageWidget = QtGui.QWidget(self)
|
||||||
sizePolicy = QtGui.QSizePolicy(
|
sizePolicy = QtGui.QSizePolicy(
|
||||||
@ -93,7 +103,7 @@ class ImageMediaItem(MediaManagerItem):
|
|||||||
self.ImageWidget.setObjectName(u'ImageWidget')
|
self.ImageWidget.setObjectName(u'ImageWidget')
|
||||||
self.blankButton = self.Toolbar.addToolbarButton(
|
self.blankButton = self.Toolbar.addToolbarButton(
|
||||||
u'Replace Background', u':/slides/slide_blank.png',
|
u'Replace Background', u':/slides/slide_blank.png',
|
||||||
self.trUtf8('Replace Background'), self.onReplaceClick, False)
|
self.trUtf8('Replace Live Background'), self.onReplaceClick, False)
|
||||||
# Add the song widget to the page layout
|
# Add the song widget to the page layout
|
||||||
self.PageLayout.addWidget(self.ImageWidget)
|
self.PageLayout.addWidget(self.ImageWidget)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user