From 56cc97effa7b9f2d6a95f213587ced72a9ee3f7c Mon Sep 17 00:00:00 2001 From: Patrick Totzke Date: Wed, 19 Oct 2011 14:48:10 +0100 Subject: introduced option global.editor_in_thread if set to True, alot will call your editor in a separate thread, making the ui non-blocking in case your editor uses its own x11 window. --- alot/commands/globals.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'alot/commands/globals.py') diff --git a/alot/commands/globals.py b/alot/commands/globals.py index 4d825b78..807bee69 100644 --- a/alot/commands/globals.py +++ b/alot/commands/globals.py @@ -167,16 +167,20 @@ class ExternalCommand(Command): #) class EditCommand(ExternalCommand): """opens editor""" - def __init__(self, path, spawn=None, **kwargs): + def __init__(self, path, spawn=None, thread=None, **kwargs): self.path = path if spawn != None: self.spawn = spawn else: self.spawn = settings.config.getboolean('general', 'spawn_editor') + if thread != None: + self.thread = thread + else: + self.thread = settings.config.getboolean('general', 'editor_in_thread') editor_cmd = settings.config.get('general', 'editor_cmd') ExternalCommand.__init__(self, editor_cmd, path=self.path, - spawn=self.spawn, thread=self.spawn, + spawn=self.spawn, thread=self.thread, **kwargs) -- cgit v1.2.3