diff options
author | Micah Lee <micah@micahflee.com> | 2018-11-26 18:03:52 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-11-26 18:03:52 -0800 |
commit | 6bfe9d4476b894e7d0dbb54f4bb689637ead0ad0 (patch) | |
tree | beb135d1eca802a9111d4176b6a7d156987379f2 /onionshare_gui | |
parent | 4a765e0768ca42109a7748f5686f4fd4e86259f2 (diff) | |
parent | 86b537a4a6376a4280f30912ab9b2e313083c058 (diff) | |
download | onionshare-6bfe9d4476b894e7d0dbb54f4bb689637ead0ad0.tar.gz onionshare-6bfe9d4476b894e7d0dbb54f4bb689637ead0ad0.zip |
Merge pull request #763 from mig5/open_folder_uploads_macos_windows
Open folder containing uploads with the file selected, in macOS and Windows
Diffstat (limited to 'onionshare_gui')
-rw-r--r-- | onionshare_gui/mode/history.py | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/onionshare_gui/mode/history.py b/onionshare_gui/mode/history.py index 38e0fed3..e72a3838 100644 --- a/onionshare_gui/mode/history.py +++ b/onionshare_gui/mode/history.py @@ -184,16 +184,11 @@ class UploadHistoryItemFile(QtWidgets.QWidget): # macOS elif self.common.platform == 'Darwin': - # TODO: Implement opening folder with file selected in macOS - # This seems helpful: https://stackoverflow.com/questions/3520493/python-show-in-finder - self.common.log('UploadHistoryItemFile', 'open_folder', 'not implemented for Darwin yet') + subprocess.call(['open', '-R', abs_filename]) # Windows elif self.common.platform == 'Windows': - # TODO: Implement opening folder with file selected in Windows - # This seems helpful: https://stackoverflow.com/questions/6631299/python-opening-a-folder-in-explorer-nautilus-mac-thingie - self.common.log('UploadHistoryItemFile', 'open_folder', 'not implemented for Windows yet') - + subprocess.Popen(['explorer', '/select,{}'.format(abs_filename)]) class UploadHistoryItem(HistoryItem): def __init__(self, common, id, content_length): |