forked from openlp/openlp
Remove not needed var and fix 195 strings
This commit is contained in:
parent
15bca1628a
commit
54a3dd8412
@ -124,6 +124,7 @@ class UiStrings(object):
|
|||||||
self.Themes = translate('OpenLP.Ui', 'Themes', 'Plural')
|
self.Themes = translate('OpenLP.Ui', 'Themes', 'Plural')
|
||||||
self.Tools = translate('OpenLP.Ui', 'Tools')
|
self.Tools = translate('OpenLP.Ui', 'Tools')
|
||||||
self.Top = translate('OpenLP.Ui', 'Top')
|
self.Top = translate('OpenLP.Ui', 'Top')
|
||||||
|
self.UnsupportedFile = translate('OpenLP.Ui', 'Unsupported File')
|
||||||
self.VersePerSlide = translate('OpenLP.Ui', 'Verse Per Slide')
|
self.VersePerSlide = translate('OpenLP.Ui', 'Verse Per Slide')
|
||||||
self.VersePerLine = translate('OpenLP.Ui', 'Verse Per Line')
|
self.VersePerLine = translate('OpenLP.Ui', 'Verse Per Line')
|
||||||
self.Version = translate('OpenLP.Ui', 'Version')
|
self.Version = translate('OpenLP.Ui', 'Version')
|
||||||
|
@ -138,10 +138,8 @@ class MediaMediaItem(MediaManagerItem):
|
|||||||
if not self.mediaStateWait(Phonon.StoppedState):
|
if not self.mediaStateWait(Phonon.StoppedState):
|
||||||
# Due to string freeze, borrow a message from presentations
|
# Due to string freeze, borrow a message from presentations
|
||||||
# This will be corrected in 1.9.6
|
# This will be corrected in 1.9.6
|
||||||
critical_error_message_box(
|
critical_error_message_box(UiStrings().UnsupportedFile,
|
||||||
translate('PresentationPlugin.MediaItem', 'Unsupported File'),
|
UiStrings().UnsupportedFile)
|
||||||
unicode(translate('PresentationPlugin.MediaItem',
|
|
||||||
'Unsupported File')))
|
|
||||||
return False
|
return False
|
||||||
# File too big for processing
|
# File too big for processing
|
||||||
if os.path.getsize(filename) <= 52428800: # 50MiB
|
if os.path.getsize(filename) <= 52428800: # 50MiB
|
||||||
@ -152,15 +150,12 @@ class MediaMediaItem(MediaManagerItem):
|
|||||||
# Due to string freeze, borrow a message from presentations
|
# Due to string freeze, borrow a message from presentations
|
||||||
# This will be corrected in 1.9.6
|
# This will be corrected in 1.9.6
|
||||||
self.mediaObject.stop()
|
self.mediaObject.stop()
|
||||||
critical_error_message_box(
|
critical_error_message_box(UiStrings().UnsupportedFile,
|
||||||
translate('PresentationPlugin.MediaItem',
|
UiStrings().UnsupportedFile)
|
||||||
'Unsupported File'),
|
|
||||||
unicode(translate('PresentationPlugin.MediaItem',
|
|
||||||
'Unsupported File')))
|
|
||||||
return False
|
return False
|
||||||
self.mediaLength = self.mediaObject.totalTime() / 1000
|
#self.mediaLength = self.mediaObject.totalTime() / 1000
|
||||||
self.mediaObject.stop()
|
self.mediaObject.stop()
|
||||||
service_item.media_length = self.mediaLength
|
service_item.media_length = self.mediaObject.totalTime() / 1000
|
||||||
service_item.add_capability(
|
service_item.add_capability(
|
||||||
ItemCapabilities.AllowsVariableStartTime)
|
ItemCapabilities.AllowsVariableStartTime)
|
||||||
service_item.title = unicode(self.plugin.nameStrings[u'singular'])
|
service_item.title = unicode(self.plugin.nameStrings[u'singular'])
|
||||||
|
@ -193,9 +193,7 @@ class PresentationMediaItem(MediaManagerItem):
|
|||||||
if initialLoad:
|
if initialLoad:
|
||||||
icon = build_icon(u':/general/general_delete.png')
|
icon = build_icon(u':/general/general_delete.png')
|
||||||
else:
|
else:
|
||||||
critical_error_message_box(
|
critical_error_message_box(UiStrings().UnsupportedFile,
|
||||||
translate('PresentationPlugin.MediaItem',
|
|
||||||
'Unsupported File'),
|
|
||||||
translate('PresentationPlugin.MediaItem',
|
translate('PresentationPlugin.MediaItem',
|
||||||
'This type of presentation is not supported.'))
|
'This type of presentation is not supported.'))
|
||||||
continue
|
continue
|
||||||
|
Loading…
Reference in New Issue
Block a user