forked from openlp/openlp
UiStrings
This commit is contained in:
parent
321269b11b
commit
816b17c245
@ -87,6 +87,7 @@ class UiStrings(object):
|
|||||||
SaveType = unicode(translate('OpenLP.Ui', 'Save %s'))
|
SaveType = unicode(translate('OpenLP.Ui', 'Save %s'))
|
||||||
Search = translate('OpenLP.Ui', 'Search')
|
Search = translate('OpenLP.Ui', 'Search')
|
||||||
SelectDelete = translate('OpenLP.Ui', 'You must select an item to delete.')
|
SelectDelete = translate('OpenLP.Ui', 'You must select an item to delete.')
|
||||||
|
SelectEdit = translate('OpenLP.Ui', 'You must select an item to edit.')
|
||||||
SendSelectLive = unicode(translate('OpenLP.Ui',
|
SendSelectLive = unicode(translate('OpenLP.Ui',
|
||||||
'Send the selected %s live.'))
|
'Send the selected %s live.'))
|
||||||
Service = translate('OpenLP.Ui', 'Service')
|
Service = translate('OpenLP.Ui', 'Service')
|
||||||
|
@ -30,6 +30,7 @@ from PyQt4 import QtCore, QtGui
|
|||||||
|
|
||||||
from openlp.core.lib import MediaManagerItem, Receiver, ItemCapabilities, \
|
from openlp.core.lib import MediaManagerItem, Receiver, ItemCapabilities, \
|
||||||
translate, check_item_selected
|
translate, check_item_selected
|
||||||
|
from openlp.core.lib.ui import UiStrings
|
||||||
from openlp.plugins.custom.lib import CustomXMLParser
|
from openlp.plugins.custom.lib import CustomXMLParser
|
||||||
from openlp.plugins.custom.lib.db import CustomSlide
|
from openlp.plugins.custom.lib.db import CustomSlide
|
||||||
|
|
||||||
@ -108,9 +109,7 @@ class CustomMediaItem(MediaManagerItem):
|
|||||||
"""
|
"""
|
||||||
Edit a custom item
|
Edit a custom item
|
||||||
"""
|
"""
|
||||||
if check_item_selected(self.listView,
|
if check_item_selected(self.listView, UiStrings.SelectEdit):
|
||||||
translate('CustomPlugin.MediaItem',
|
|
||||||
'You haven\'t selected an item to edit.')):
|
|
||||||
item = self.listView.currentItem()
|
item = self.listView.currentItem()
|
||||||
item_id = (item.data(QtCore.Qt.UserRole)).toInt()[0]
|
item_id = (item.data(QtCore.Qt.UserRole)).toInt()[0]
|
||||||
self.parent.edit_custom_form.loadCustom(item_id, False)
|
self.parent.edit_custom_form.loadCustom(item_id, False)
|
||||||
@ -121,9 +120,7 @@ class CustomMediaItem(MediaManagerItem):
|
|||||||
"""
|
"""
|
||||||
Remove a custom item from the list and database
|
Remove a custom item from the list and database
|
||||||
"""
|
"""
|
||||||
if check_item_selected(self.listView,
|
if check_item_selected(self.listView, UiStrings.SelectDelete):
|
||||||
translate('CustomPlugin.MediaItem',
|
|
||||||
'You haven\'t selected an item to delete.')):
|
|
||||||
row_list = [item.row() for item in self.listView.selectedIndexes()]
|
row_list = [item.row() for item in self.listView.selectedIndexes()]
|
||||||
row_list.sort(reverse=True)
|
row_list.sort(reverse=True)
|
||||||
id_list = [(item.data(QtCore.Qt.UserRole)).toInt()[0]
|
id_list = [(item.data(QtCore.Qt.UserRole)).toInt()[0]
|
||||||
|
@ -306,9 +306,7 @@ class SongMediaItem(MediaManagerItem):
|
|||||||
Edit a song
|
Edit a song
|
||||||
"""
|
"""
|
||||||
log.debug(u'onEditClick')
|
log.debug(u'onEditClick')
|
||||||
if check_item_selected(self.listView,
|
if check_item_selected(self.listView, UiStrings.SelectEdit):
|
||||||
translate('SongsPlugin.MediaItem',
|
|
||||||
'You must select an item to edit.')):
|
|
||||||
self.editItem = self.listView.currentItem()
|
self.editItem = self.listView.currentItem()
|
||||||
item_id = (self.editItem.data(QtCore.Qt.UserRole)).toInt()[0]
|
item_id = (self.editItem.data(QtCore.Qt.UserRole)).toInt()[0]
|
||||||
self.edit_song_form.loadSong(item_id, False)
|
self.edit_song_form.loadSong(item_id, False)
|
||||||
|
Loading…
Reference in New Issue
Block a user