forked from openlp/openlp
Head r896
This commit is contained in:
commit
6235140868
@ -136,11 +136,14 @@ class CustomMediaItem(MediaManagerItem):
|
||||
if check_item_selected(self.ListView,
|
||||
translate('CustomPlugin.MediaItem',
|
||||
'You must select an item to delete.')):
|
||||
item = self.ListView.currentItem()
|
||||
item_id = (item.data(QtCore.Qt.UserRole)).toInt()[0]
|
||||
self.parent.custommanager.delete_object(CustomSlide, item_id)
|
||||
row = self.ListView.row(item)
|
||||
self.ListView.takeItem(row)
|
||||
row_list = [item.row() for item in self.ListView.selectedIndexes()]
|
||||
row_list.sort(reverse=True)
|
||||
id_list = [(item.data(QtCore.Qt.UserRole)).toInt()[0]
|
||||
for item in self.ListView.selectedIndexes()]
|
||||
for id in id_list:
|
||||
self.parent.custommanager.delete_custom(id)
|
||||
for row in row_list:
|
||||
self.ListView.takeItem(row)
|
||||
|
||||
def generateSlideData(self, service_item, item=None):
|
||||
raw_slides = []
|
||||
|
@ -119,9 +119,10 @@ class ImageMediaItem(MediaManagerItem):
|
||||
"""
|
||||
if check_item_selected(self.ListView, translate('ImagePlugin.MediaItem',
|
||||
'You must select an item to delete.')):
|
||||
items = self.ListView.selectedIndexes()
|
||||
for item in items:
|
||||
text = self.ListView.item(item.row())
|
||||
row_list = [item.row() for item in self.ListView.selectedIndexes()]
|
||||
row_list.sort(reverse=True)
|
||||
for row in row_list:
|
||||
text = self.ListView.item(row)
|
||||
if text:
|
||||
try:
|
||||
os.remove(os.path.join(self.servicePath,
|
||||
@ -129,9 +130,9 @@ class ImageMediaItem(MediaManagerItem):
|
||||
except OSError:
|
||||
#if not present do not worry
|
||||
pass
|
||||
self.ListView.takeItem(item.row())
|
||||
SettingsManager.set_list(self.settingsSection,
|
||||
self.settingsSection, self.getFileList())
|
||||
self.ListView.takeItem(row)
|
||||
SettingsManager.set_list(self.settingsSection,
|
||||
self.settingsSection, self.getFileList())
|
||||
|
||||
def loadList(self, list):
|
||||
for file in list:
|
||||
|
@ -143,9 +143,10 @@ class MediaMediaItem(MediaManagerItem):
|
||||
"""
|
||||
if check_item_selected(self.ListView, translate('MediaPlugin.MediaItem',
|
||||
'You must select an item to delete.')):
|
||||
item = self.ListView.currentItem()
|
||||
row = self.ListView.row(item)
|
||||
self.ListView.takeItem(row)
|
||||
row_list = [item.row() for item in self.ListView.selectedIndexes()]
|
||||
row_list.sort(reverse=True)
|
||||
for row in row_list:
|
||||
self.ListView.takeItem(row)
|
||||
SettingsManager.set_list(self.settingsSection,
|
||||
self.settingsSection, self.getFileList())
|
||||
|
||||
|
@ -180,18 +180,22 @@ class PresentationMediaItem(MediaManagerItem):
|
||||
if check_item_selected(self.ListView,
|
||||
translate('PresentationPlugin.MediaItem',
|
||||
'You must select an item to delete.')):
|
||||
item = self.ListView.currentItem()
|
||||
row = self.ListView.row(item)
|
||||
self.ListView.takeItem(row)
|
||||
items = self.ListView.selectedIndexes()
|
||||
row_list = [item.row() for item in items]
|
||||
row_list.sort(reverse=True)
|
||||
for item in items:
|
||||
filepath = unicode(item.data(
|
||||
QtCore.Qt.UserRole).toString())
|
||||
#not sure of this has errors
|
||||
#John please can you look at .
|
||||
for cidx in self.controllers:
|
||||
doc = self.controllers[cidx].add_doc(filepath)
|
||||
doc.presentation_deleted()
|
||||
doc.close_presentation()
|
||||
for row in row_list:
|
||||
self.ListView.takeItem(row)
|
||||
SettingsManager.set_list(self.settingsSection,
|
||||
self.settingsSection, self.getFileList())
|
||||
filepath = unicode(item.data(QtCore.Qt.UserRole).toString())
|
||||
#not sure of this has errors
|
||||
#John please can you look at .
|
||||
for cidx in self.controllers:
|
||||
doc = self.controllers[cidx].add_doc(filepath)
|
||||
doc.presentation_deleted()
|
||||
doc.close_presentation()
|
||||
|
||||
def generateSlideData(self, service_item, item=None):
|
||||
items = self.ListView.selectedIndexes()
|
||||
|
Loading…
Reference in New Issue
Block a user