mirror of
https://github.com/onionshare/onionshare.git
synced 2025-02-02 09:35:33 -05:00
Disable drag and drop in flatpak
This commit is contained in:
parent
94c588d0ce
commit
bfce4b005c
@ -10,6 +10,7 @@
|
|||||||
"gui_add_files": "Add Files",
|
"gui_add_files": "Add Files",
|
||||||
"gui_add_folder": "Add Folder",
|
"gui_add_folder": "Add Folder",
|
||||||
"gui_remove": "Remove",
|
"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_file_selection_remove_all": "Remove All",
|
||||||
"gui_choose_items": "Choose",
|
"gui_choose_items": "Choose",
|
||||||
"gui_share_start_server": "Start sharing",
|
"gui_share_start_server": "Start sharing",
|
||||||
|
@ -243,6 +243,13 @@ class FileList(QtWidgets.QListWidget):
|
|||||||
"""
|
"""
|
||||||
Add a file or directory to this widget.
|
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 = []
|
filenames = []
|
||||||
for index in range(self.count()):
|
for index in range(self.count()):
|
||||||
filenames.append(self.item(index).filename)
|
filenames.append(self.item(index).filename)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user