Update missing checks

This commit is contained in:
Tim Bentley 2010-06-30 18:05:12 +01:00
parent 8b5931d50c
commit 9ebdc1e2d3
2 changed files with 13 additions and 22 deletions

View File

@ -170,12 +170,9 @@ class ImageMediaItem(MediaManagerItem):
return False
def onReplaceClick(self):
if not self.ListView.selectedIndexes():
QtGui.QMessageBox.information(self,
translate('ImagePlugin.MediaItem', 'No item selected'),
if check_item_selected(self.ListView,
translate('ImagePlugin.MediaItem',
'You must select one item'))
return
'You must select an item to process.')):
item = self.buildServiceItem()
item.render()
self.parent.live_controller.displayManager. \

View File

@ -106,17 +106,11 @@ class MediaMediaItem(MediaManagerItem):
# Receiver.send_message(u'videodisplay_stop')
# else:
# self.background = True
if not self.ListView.selectedIndexes():
QtGui.QMessageBox.information(self,
translate('MediaPlugin.MediaItem', 'No item selected'),
translate('MediaPlugin.MediaItem',
'You must select one item'))
return
if check_item_selected(self.ListView,
translate('ImagePlugin.MediaItem',
'You must select an item to process.')):
item = self.ListView.currentItem()
if item is None:
return False
filename = unicode(item.data(QtCore.Qt.UserRole).toString())
print filename
self.parent.live_controller.displayManager.displayVideo(filename)
# items = self.ListView.selectedIndexes()
# for item in items: