From 1de114748b3ee4d32db309882cd5b3c6b1d9647b Mon Sep 17 00:00:00 2001 From: chrys Date: Tue, 12 Feb 2019 16:06:08 +0100 Subject: [PATCH] Update remoteManager.py --- src/fenrirscreenreader/core/remoteManager.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/fenrirscreenreader/core/remoteManager.py b/src/fenrirscreenreader/core/remoteManager.py index 040d7687..eb5bc3ce 100644 --- a/src/fenrirscreenreader/core/remoteManager.py +++ b/src/fenrirscreenreader/core/remoteManager.py @@ -36,6 +36,7 @@ class remoteManager(): self.commandConst = 'COMMAND ' self.sayConst = 'SAY ' self.interruptConst = 'INTERRUPT' + self.quitAppConst = 'QUITAPPLICATION' self.defineWindowConst = 'WINDOW ' self.resetWindowConst = 'RESETWINDOW' self.setClipboardConst = 'CLIPBOARD ' @@ -80,6 +81,9 @@ class remoteManager(): # interrupt if upperCommandText.startswith(self.interruptConst): self.interruptSpeech() + # quit fenrir + if upperCommandText.startswith(self.quitAppConst): + self.quitFenrir() # define window if upperCommandText.startswith(self.defineWindowConst): parameterText = commandText[len(self.defineWindowConst):] @@ -93,6 +97,8 @@ class remoteManager(): self.setClipboard(parameterText) def setClipboard(self, text = ''): self.env['runtime']['memoryManager'].addValueToFirstIndex('clipboardHistory', text) + def quitFenrir(self): + self.env['runtime']['eventManager'].stopMainEventLoop() def defineWindow(self, windowText): start = {} end = {}