aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNao Pross <np@0hm.ch>2020-11-06 23:16:54 +0100
committerNao Pross <np@0hm.ch>2020-11-06 23:16:54 +0100
commit968eb54a486cd19aeb0ddac8f43410541d99032a (patch)
treec121b3c4ef3ea2afd4d42d558fcf4673cd04a2d0
parentAdd double-click download/open of files (diff)
downloadMuddle-968eb54a486cd19aeb0ddac8f43410541d99032a.tar.gz
Muddle-968eb54a486cd19aeb0ddac8f43410541d99032a.zip
Make double-click open non-blocking
-rw-r--r--gui.py5
1 files 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))