fix qutes

This commit is contained in:
chrys 2017-09-12 01:20:08 +02:00
parent 994700568e
commit 0f2606f19f

View File

@ -39,14 +39,16 @@ class command():
self.env['runtime']['outputManager'].presentText(_('clipboard empty'), interrupt=True)
return
for display in range(10):
p = Popen('su ' + self.env['general']['currUser'] + ' -c "echo -n \"' + self.env['commandBuffer']['clipboard'][currClipboard] +'\" | xclip -d :' + str(display) + ' -selection c"' , stdout=PIPE, stderr=PIPE, shell=True)
p = Popen('su ' + self.env['general']['currUser'] + ' -c "echo -n \\\"' + self.env['commandBuffer']['clipboard'][currClipboard] +'\\\" | xclip -d :' + str(display) + ' -selection c"' , stdout=PIPE, stderr=PIPE, shell=True)
stdout, stderr = p.communicate()
self.env['runtime']['outputManager'].interruptOutput()
#screenEncoding = self.env['runtime']['settingsManager'].getSetting('screen', 'encoding')
stderr = stderr.decode('utf-8')
stdout = stdout.decode('utf-8')
if (stderr == ''):
break
break
else:
print(stderr)
#stderr = stderr.decode(screenEncoding, "replace").encode('utf-8').decode('utf-8')
#stdout = stdout.decode(screenEncoding, "replace").encode('utf-8').decode('utf-8')
if stderr != '':
@ -54,7 +56,8 @@ class command():
else:
self.env['runtime']['outputManager'].presentText('export clipboard', soundIcon='PasteClipboardOnScreen', interrupt=True)
except Exception as e:
self.env['runtime']['outputManager'].presentText(e , soundIcon='', interrupt=False)
print(e)
self.env['runtime']['outputManager'].presentText(e , soundIcon='', interrupt=False)
def setCallback(self, callback):
pass