mirror of
https://github.com/codex-storage/deluge.git
synced 2025-01-28 04:04:47 +00:00
window tweak for torrentfiles
This commit is contained in:
parent
da60769933
commit
491e7ea0d6
@ -84,7 +84,7 @@ class FilesTabManager(FilesBaseManager):
|
|||||||
def open_file(self, widget=None):
|
def open_file(self, widget=None):
|
||||||
import os
|
import os
|
||||||
|
|
||||||
from deluge.common import exec_command
|
from deluge.common import exec_command, windows_check
|
||||||
|
|
||||||
save_dir = self.manager.unique_IDs[self.file_unique_id].save_dir
|
save_dir = self.manager.unique_IDs[self.file_unique_id].save_dir
|
||||||
selected_paths = self.file_view.get_selection().get_selected_rows()[1]
|
selected_paths = self.file_view.get_selection().get_selected_rows()[1]
|
||||||
@ -94,8 +94,7 @@ class FilesTabManager(FilesBaseManager):
|
|||||||
convert_path_to_child_path(path)
|
convert_path_to_child_path(path)
|
||||||
file_name = self.file_store.get_value(
|
file_name = self.file_store.get_value(
|
||||||
self.file_store.get_iter(child_path), 0)
|
self.file_store.get_iter(child_path), 0)
|
||||||
import platform
|
if windows_check():
|
||||||
if platform.system() in ('Windows', 'Microsoft'):
|
|
||||||
os.startfile(os.path.join(save_dir, file_name))
|
os.startfile(os.path.join(save_dir, file_name))
|
||||||
else:
|
else:
|
||||||
exec_command(self.file_viewer,
|
exec_command(self.file_viewer,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user