diff --git a/config/sound/default-wav/soundicons.conf b/config/sound/default-wav/soundicons.conf index 3f0c4d55..4e34285a 100644 --- a/config/sound/default-wav/soundicons.conf +++ b/config/sound/default-wav/soundicons.conf @@ -35,7 +35,7 @@ PlaceEndMark='PlaceEndMark.wav' # Copied to clipboard CopyToClipboard='CopyToClipboard.wav' # Pasted on the screen -PasedClipboardOnScreen='PasedClipboardOnScreen.wav' +PasteClipboardOnScreen='PasteClipboardOnScreen.wav' # An error accoured while speech or braille output or reading the screen ErrorSpeech='ErrorSpeech.wav' ErrorBraille='ErrorBraille.wav' diff --git a/config/sound/default-wav/tmp.wav b/config/sound/default-wav/tmp.wav deleted file mode 100644 index 8f83509d..00000000 Binary files a/config/sound/default-wav/tmp.wav and /dev/null differ diff --git a/config/sound/default/soundicons.conf b/config/sound/default/soundicons.conf index 3b2fb522..53a4068e 100644 --- a/config/sound/default/soundicons.conf +++ b/config/sound/default/soundicons.conf @@ -35,7 +35,7 @@ PlaceEndMark='PlaceEndMark.opus' # Copied to clipboard CopyToClipboard='CopyToClipboard.opus' # Pasted on the screen -PasedClipboardOnScreen='PasedClipboardOnScreen.opus' +PasteClipboardOnScreen='PasteClipboardOnScreen.opus' # An error accoured while speech or braille output or reading the screen ErrorSpeech='ErrorSpeech.opus' ErrorBraille='ErrorBraille.opus' diff --git a/config/sound/default/tmp.opus b/config/sound/default/tmp.opus deleted file mode 100644 index 242fbabe..00000000 Binary files a/config/sound/default/tmp.opus and /dev/null differ diff --git a/src/fenrir/commands/commands/linux_paste_clipboard.py b/src/fenrir/commands/commands/linux_paste_clipboard.py index d5777397..ebbb4768 100644 --- a/src/fenrir/commands/commands/linux_paste_clipboard.py +++ b/src/fenrir/commands/commands/linux_paste_clipboard.py @@ -19,12 +19,22 @@ class command(): def getDescription(self): return 'pastes the text from the currently selected clipboard' - def run(self): + def run(self): currClipboard = self.env['commandBuffer']['currClipboard'] if currClipboard < 0: self.env['runtime']['outputManager'].presentText('clipboard empty', interrupt=True) return - self.env['runtime']['outputManager'].presentText('paste clipboard', soundIcon='PasedClipboardOnScreen', interrupt=True) + if not self.env['commandBuffer']['clipboard']: + self.env['runtime']['outputManager'].presentText('clipboard empty', interrupt=True) + return + if self.env['commandBuffer']['clipboard'][currClipboard]: + self.env['runtime']['outputManager'].presentText('clipboard empty', interrupt=True) + return + if self.env['commandBuffer']['clipboard'][currClipboard] == '': + self.env['runtime']['outputManager'].presentText('clipboard empty', interrupt=True) + return + self.env['runtime']['outputManager'].presentText('paste clipboard', soundIcon='PasteClipboardOnScreen', interrupt=True) + time.sleep(0.02) with open("/dev/tty" + self.env['screenData']['newTTY'], 'w') as fd: for c in self.env['commandBuffer']['clipboard'][currClipboard]: fcntl.ioctl(fd, termios.TIOCSTI, c)