diff options
author | Nao Pross <np@0hm.ch> | 2020-11-06 23:16:54 +0100 |
---|---|---|
committer | Nao Pross <np@0hm.ch> | 2020-11-06 23:16:54 +0100 |
commit | 968eb54a486cd19aeb0ddac8f43410541d99032a (patch) | |
tree | c121b3c4ef3ea2afd4d42d558fcf4673cd04a2d0 /gui.py | |
parent | Add double-click download/open of files (diff) | |
download | Muddle-968eb54a486cd19aeb0ddac8f43410541d99032a.tar.gz Muddle-968eb54a486cd19aeb0ddac8f43410541d99032a.zip |
Make double-click open non-blocking
Diffstat (limited to '')
-rw-r--r-- | gui.py | 5 |
1 files changed, 2 insertions, 3 deletions
@@ -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)) |