mirror of
https://github.com/onionshare/onionshare.git
synced 2025-01-25 02:32:58 -03:00
Disable drag and drop in flatpak
This commit is contained in:
parent
94c588d0ce
commit
bfce4b005c
2 changed files with 8 additions and 0 deletions
|
@ -10,6 +10,7 @@
|
|||
"gui_add_files": "Add Files",
|
||||
"gui_add_folder": "Add Folder",
|
||||
"gui_remove": "Remove",
|
||||
"gui_dragdrop_sandbox_flatpak": "To make the Flatpak sandbox more secure, drag and drop is not supported. Use the Add Files and Add Folder buttons to browse for files instead.",
|
||||
"gui_file_selection_remove_all": "Remove All",
|
||||
"gui_choose_items": "Choose",
|
||||
"gui_share_start_server": "Start sharing",
|
||||
|
|
|
@ -243,6 +243,13 @@ class FileList(QtWidgets.QListWidget):
|
|||
"""
|
||||
Add a file or directory to this widget.
|
||||
"""
|
||||
# Drag and drop doesn't work in Flatpak, because of the sandbox
|
||||
if self.common.platform == "Linux" and os.path.exists("/app/manifest.json"):
|
||||
Alert(
|
||||
self.common, strings._("gui_dragdrop_sandbox_flatpak").format(filename)
|
||||
)
|
||||
return
|
||||
|
||||
filenames = []
|
||||
for index in range(self.count()):
|
||||
filenames.append(self.item(index).filename)
|
||||
|
|
Loading…
Add table
Reference in a new issue