forked from openlp/openlp
More usability fixes
This commit is contained in:
parent
5cc0276dd4
commit
7767746f7a
@ -358,6 +358,10 @@ class MediaManagerItem(QtGui.QWidget):
|
||||
u'to be defined by the plugin')
|
||||
|
||||
def onPreviewClick(self):
|
||||
if not self.ListView.selectedIndexes():
|
||||
QtGui.QMessageBox.information(self,
|
||||
self.trUtf8(u'No items selected...'),
|
||||
self.trUtf8(u'You must select one or more items'))
|
||||
log.debug(self.PluginNameShort + u' Preview Requested')
|
||||
service_item = self.buildServiceItem()
|
||||
if service_item is not None:
|
||||
@ -365,6 +369,10 @@ class MediaManagerItem(QtGui.QWidget):
|
||||
self.parent.preview_controller.addServiceItem(service_item)
|
||||
|
||||
def onLiveClick(self):
|
||||
if not self.ListView.selectedIndexes():
|
||||
QtGui.QMessageBox.information(self,
|
||||
self.trUtf8(u'No items selected...'),
|
||||
self.trUtf8(u'You must select one or more items'))
|
||||
log.debug(self.PluginNameShort + u' Live Requested')
|
||||
service_item = self.buildServiceItem()
|
||||
if service_item is not None:
|
||||
@ -373,10 +381,10 @@ class MediaManagerItem(QtGui.QWidget):
|
||||
self.parent.live_controller.addServiceItem(service_item)
|
||||
|
||||
def onAddClick(self):
|
||||
if not self.ListView.SelectedIndexes():
|
||||
QtGui.QMessageBox.Information(self,
|
||||
if not self.ListView.selectedIndexes():
|
||||
QtGui.QMessageBox.information(self,
|
||||
self.trUtf8(u'No items selected...'),
|
||||
self.trUTf8(u'You must select one or more items'))
|
||||
self.trUtf8(u'You must select one or more items'))
|
||||
log.debug(self.PluginNameShort + u' Add Requested')
|
||||
service_item = self.buildServiceItem()
|
||||
if service_item is not None:
|
||||
|
@ -76,7 +76,6 @@ class Renderer(object):
|
||||
self.theme_name = theme.theme_name
|
||||
self._set_theme_font()
|
||||
if theme.background_type == u'image':
|
||||
print theme.background_filename
|
||||
if theme.background_filename is not None:
|
||||
self.set_bg_image(theme.background_filename)
|
||||
|
||||
|
@ -160,9 +160,11 @@ class ImageMediaItem(MediaManagerItem):
|
||||
|
||||
def onPreviewClick(self):
|
||||
if self.overrideActive:
|
||||
if not self.ListView.selectedIndexes():
|
||||
QtGui.QMessageBox.information(self,
|
||||
self.trUtf8(u'No items selected...'),
|
||||
self.trUtf8(u'You must select one or more items'))
|
||||
items = self.ListView.selectedIndexes()
|
||||
if len(items) == 0:
|
||||
return False
|
||||
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