From 968eb54a486cd19aeb0ddac8f43410541d99032a Mon Sep 17 00:00:00 2001 From: Nao Pross Date: Fri, 6 Nov 2020 23:16:54 +0100 Subject: Make double-click open non-blocking --- gui.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/gui.py b/gui.py index cab60aa..03a608d 100644 --- a/gui.py +++ b/gui.py @@ -158,13 +158,12 @@ class MoodleTreeView(QTreeWidget): filepath = tempfile.gettempdir()+"/"+item.metadata.title self.worker.apihelper.get_file(item.metadata.url, filepath) - # TODO: Maybe extract in util function if platform.system() == 'Darwin': # macOS - subprocess.call(('open', )) + subprocess.Popen(('open', filepath)) elif platform.system() == 'Windows': # Windows os.startfile(filepath) else: # linux variants - subprocess.call(('xdg-open', filepath)) + subprocess.Popen(('xdg-open', filepath)) -- cgit v1.2.1