fix ok presses
This commit is contained in:
parent
c0561af6af
commit
6e8f476b02
22
components/FailureDialog.xml
Normal file
22
components/FailureDialog.xml
Normal file
|
@ -0,0 +1,22 @@
|
|||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<!-- A Failure Dialog is a regular dialog, except it takes key releases -->
|
||||
<!-- instead of presses so we don't unintentionally trigger playback -->
|
||||
<component name="FailureDialog" extends="Dialog">
|
||||
<interface>
|
||||
<field id="Title" type="string" onchange="setTitle" />
|
||||
<field id="Overview" type="string" onChange="setOverview" />
|
||||
</interface>
|
||||
<script type="text/brightscript">
|
||||
<![CDATA[
|
||||
function onKeyEvent(key as string, press as boolean) as boolean
|
||||
if press = true then return false
|
||||
|
||||
if key = "OK"
|
||||
m.top.close = true
|
||||
end if
|
||||
|
||||
return true
|
||||
end function
|
||||
]]>
|
||||
</script>
|
||||
</component>
|
|
@ -112,8 +112,9 @@ sub onState(msg)
|
|||
m.top.retryWithTranscoding = true ' If playback was not reported, retry with transcoding
|
||||
else
|
||||
' If an error was encountered, Display dialog
|
||||
dialog = createObject("roSGNode", "Dialog")
|
||||
dialog = createObject("roSGNode", "FailureDialog")
|
||||
dialog.title = tr("Error During Playback")
|
||||
dialog.buttons = [tr("OK")]
|
||||
dialog.message = tr("An error was encountered while playing this item.")
|
||||
m.top.getScene().dialog = dialog
|
||||
end if
|
||||
|
@ -195,8 +196,9 @@ sub bufferCheck(msg)
|
|||
m.top.callFunc("refresh")
|
||||
else
|
||||
' If buffering has stopped Display dialog
|
||||
dialog = createObject("roSGNode", "Dialog")
|
||||
dialog = createObject("roSGNode", "FailureDialog")
|
||||
dialog.title = tr("Error Retrieving Content")
|
||||
dialog.buttons = [tr("OK")]
|
||||
dialog.message = tr("There was an error retrieving the data for this item from the server.")
|
||||
m.top.getScene().dialog = dialog
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user