mirror of
https://github.com/lutris/lutris
synced 2024-11-02 14:27:51 +00:00
Escape ampersand characters in error message dialogs
This commit is contained in:
parent
4c3627a7ae
commit
0361c9fcc2
1 changed files with 6 additions and 3 deletions
|
@ -19,15 +19,18 @@ from lutris.gui import dialogs
|
|||
def show_error_message(message):
|
||||
"""Display an error message based on the runner's output."""
|
||||
if "CUSTOM" == message['error']:
|
||||
dialogs.ErrorDialog(message['text'])
|
||||
message_text = message['file'].replace('&', '&')
|
||||
dialogs.ErrorDialog(message_text)
|
||||
elif "RUNNER_NOT_INSTALLED" == message['error']:
|
||||
dialogs.ErrorDialog('Error the runner is not installed')
|
||||
elif "NO_BIOS" == message['error']:
|
||||
dialogs.ErrorDialog("A bios file is required to run this game")
|
||||
elif "FILE_NOT_FOUND" == message['error']:
|
||||
dialogs.ErrorDialog("The file %s could not be found" % message['file'])
|
||||
message_text = message['file'].replace('&', '&')
|
||||
dialogs.ErrorDialog("The file %s could not be found" % message_text)
|
||||
elif "NOT_EXECUTABLE" == message['error']:
|
||||
dialogs.ErrorDialog("The file %s is not executable" % message['file'])
|
||||
message_text = message['file'].replace('&', '&')
|
||||
dialogs.ErrorDialog("The file %s is not executable" % message_text)
|
||||
|
||||
|
||||
class Game(object):
|
||||
|
|
Loading…
Reference in a new issue