forked from openlp/openlp
Disable button for replacing live background if the webkit player is not available.
This commit is contained in:
parent
cd7c4f6197
commit
f8114d0b97
@ -121,6 +121,8 @@ class UiStrings(object):
|
|||||||
self.Projectors = translate('OpenLP.Ui', 'Projectors', 'Plural')
|
self.Projectors = translate('OpenLP.Ui', 'Projectors', 'Plural')
|
||||||
self.ReplaceBG = translate('OpenLP.Ui', 'Replace Background')
|
self.ReplaceBG = translate('OpenLP.Ui', 'Replace Background')
|
||||||
self.ReplaceLiveBG = translate('OpenLP.Ui', 'Replace live background.')
|
self.ReplaceLiveBG = translate('OpenLP.Ui', 'Replace live background.')
|
||||||
|
self.ReplaceLiveBGDisabled = translate('OpenLP.Ui', 'Replace live background is not available on this '
|
||||||
|
'platform in this version of OpenLP.')
|
||||||
self.ResetBG = translate('OpenLP.Ui', 'Reset Background')
|
self.ResetBG = translate('OpenLP.Ui', 'Reset Background')
|
||||||
self.ResetLiveBG = translate('OpenLP.Ui', 'Reset live background.')
|
self.ResetLiveBG = translate('OpenLP.Ui', 'Reset live background.')
|
||||||
self.Seconds = translate('OpenLP.Ui', 's', 'The abbreviated unit for seconds')
|
self.Seconds = translate('OpenLP.Ui', 's', 'The abbreviated unit for seconds')
|
||||||
|
@ -91,7 +91,10 @@ class MediaMediaItem(MediaManagerItem, RegistryProperties):
|
|||||||
"""
|
"""
|
||||||
self.on_new_prompt = translate('MediaPlugin.MediaItem', 'Select Media')
|
self.on_new_prompt = translate('MediaPlugin.MediaItem', 'Select Media')
|
||||||
self.replace_action.setText(UiStrings().ReplaceBG)
|
self.replace_action.setText(UiStrings().ReplaceBG)
|
||||||
|
if 'webkit' in get_media_players()[0]:
|
||||||
self.replace_action.setToolTip(UiStrings().ReplaceLiveBG)
|
self.replace_action.setToolTip(UiStrings().ReplaceLiveBG)
|
||||||
|
else:
|
||||||
|
self.replace_action.setToolTip(UiStrings().ReplaceLiveBGDisabled)
|
||||||
self.reset_action.setText(UiStrings().ResetBG)
|
self.reset_action.setText(UiStrings().ResetBG)
|
||||||
self.reset_action.setToolTip(UiStrings().ResetLiveBG)
|
self.reset_action.setToolTip(UiStrings().ResetLiveBG)
|
||||||
self.automatic = UiStrings().Automatic
|
self.automatic = UiStrings().Automatic
|
||||||
@ -139,6 +142,8 @@ class MediaMediaItem(MediaManagerItem, RegistryProperties):
|
|||||||
# Replace backgrounds do not work at present so remove functionality.
|
# Replace backgrounds do not work at present so remove functionality.
|
||||||
self.replace_action = self.toolbar.add_toolbar_action('replace_action', icon=':/slides/slide_blank.png',
|
self.replace_action = self.toolbar.add_toolbar_action('replace_action', icon=':/slides/slide_blank.png',
|
||||||
triggers=self.on_replace_click)
|
triggers=self.on_replace_click)
|
||||||
|
if 'webkit' not in get_media_players()[0]:
|
||||||
|
self.replace_action.setDisabled(True)
|
||||||
self.reset_action = self.toolbar.add_toolbar_action('reset_action', icon=':/system/system_close.png',
|
self.reset_action = self.toolbar.add_toolbar_action('reset_action', icon=':/system/system_close.png',
|
||||||
visible=False, triggers=self.on_reset_click)
|
visible=False, triggers=self.on_reset_click)
|
||||||
self.media_widget = QtGui.QWidget(self)
|
self.media_widget = QtGui.QWidget(self)
|
||||||
|
Loading…
Reference in New Issue
Block a user