Merge remote-tracking branch 'upstream/master'

Refactoring
This commit is contained in:
David Foucher
2016-07-24 01:27:11 +02:00
76 changed files with 62359 additions and 13645 deletions

View File

@@ -387,7 +387,7 @@ class Terminal(object):
try:
with self.suspend():
p = subprocess.Popen([pager], stdin=subprocess.PIPE)
p.stdin.write(self.clean(data))
p.stdin.write(data.encode('utf-8'))
p.stdin.close()
try:
p.wait()
@@ -456,15 +456,14 @@ class Terminal(object):
urlview = os.getenv('RTV_URLVIEWER') or 'urlview'
try:
with self.suspend():
p = subprocess.Popen([urlview],
stdin=subprocess.PIPE)
p = subprocess.Popen([urlview], stdin=subprocess.PIPE)
try:
p.communicate(input=six.b(data))
p.communicate(input=data.encode('utf-8'))
except KeyboardInterrupt:
p.terminate()
except OSError:
self.show_notification(
'Could not open urls with {}'.format(urlview))
'Failed to open {0}'.format(urlview))
def text_input(self, window, allow_resize=False):
"""