mirror of
https://github.com/onionshare/onionshare.git
synced 2025-06-24 06:24:19 -04:00
Merge branch '910_flatpak' into 1111_snap
This commit is contained in:
commit
2dc5f24498
5 changed files with 15 additions and 4 deletions
|
@ -37,6 +37,9 @@ class GuiCommon:
|
||||||
self.qtapp = qtapp
|
self.qtapp = qtapp
|
||||||
self.local_only = local_only
|
self.local_only = local_only
|
||||||
|
|
||||||
|
# Are we running in a flatpak package?
|
||||||
|
self.is_flatpak = os.path.exists("/.flatpak-info")
|
||||||
|
|
||||||
# Load settings
|
# Load settings
|
||||||
self.common.load_settings()
|
self.common.load_settings()
|
||||||
|
|
||||||
|
|
|
@ -17,6 +17,7 @@ GNU General Public License for more details.
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
"""
|
"""
|
||||||
|
import os
|
||||||
from PyQt5 import QtCore, QtWidgets, QtGui
|
from PyQt5 import QtCore, QtWidgets, QtGui
|
||||||
|
|
||||||
from onionshare import strings
|
from onionshare import strings
|
||||||
|
@ -24,7 +25,7 @@ from onionshare.web import Web
|
||||||
|
|
||||||
from ..history import History, ToggleHistory, ReceiveHistoryItem
|
from ..history import History, ToggleHistory, ReceiveHistoryItem
|
||||||
from .. import Mode
|
from .. import Mode
|
||||||
from ....widgets import MinimumWidthWidget
|
from ....widgets import MinimumWidthWidget, Alert
|
||||||
|
|
||||||
|
|
||||||
class ReceiveMode(Mode):
|
class ReceiveMode(Mode):
|
||||||
|
@ -135,6 +136,12 @@ class ReceiveMode(Mode):
|
||||||
)
|
)
|
||||||
|
|
||||||
if selected_dir:
|
if selected_dir:
|
||||||
|
# If we're running inside a flatpak package, the data dir must be inside ~/OnionShare
|
||||||
|
if self.common.gui.is_flatpak:
|
||||||
|
if not selected_dir.startswith(os.path.expanduser("~/OnionShare")):
|
||||||
|
Alert(self.common, strings._("gui_receive_flatpak_data_dir"))
|
||||||
|
break
|
||||||
|
|
||||||
self.common.log(
|
self.common.log(
|
||||||
"ReceiveMode",
|
"ReceiveMode",
|
||||||
"data_dir_button_clicked",
|
"data_dir_button_clicked",
|
||||||
|
|
2
poetry.lock
generated
2
poetry.lock
generated
|
@ -440,7 +440,7 @@ docs = ["sphinx", "jaraco.packaging (>=3.2)", "rst.linker (>=1.9)"]
|
||||||
testing = ["jaraco.itertools", "func-timeout"]
|
testing = ["jaraco.itertools", "func-timeout"]
|
||||||
|
|
||||||
[metadata]
|
[metadata]
|
||||||
content-hash = "974866ba15b5dd7ce72394ff778fab36b4fb47e4cd60eea175c847279211355f"
|
content-hash = "51f613f53d242cdb3aa8d028c2cba34debbfa3fed6f9f267a25159dc1e287667"
|
||||||
python-versions = "^3.6"
|
python-versions = "^3.6"
|
||||||
|
|
||||||
[metadata.files]
|
[metadata.files]
|
||||||
|
|
|
@ -33,8 +33,8 @@ pytest-faulthandler = "*"
|
||||||
pytest-qt = "*"
|
pytest-qt = "*"
|
||||||
six = "*"
|
six = "*"
|
||||||
urllib3 = "*"
|
urllib3 = "*"
|
||||||
|
setuptools = "*"
|
||||||
pyinstaller = {version = "*", platform = "darwin"}
|
pyinstaller = {version = "*", platform = "darwin"}
|
||||||
setuptools = {version = "*", platform = "windows"}
|
|
||||||
|
|
||||||
[build-system]
|
[build-system]
|
||||||
requires = ["poetry>=0.12"]
|
requires = ["poetry>=0.12"]
|
||||||
|
|
|
@ -22,6 +22,7 @@
|
||||||
"gui_receive_start_server": "Start Receive Mode",
|
"gui_receive_start_server": "Start Receive Mode",
|
||||||
"gui_receive_stop_server": "Stop Receive Mode",
|
"gui_receive_stop_server": "Stop Receive Mode",
|
||||||
"gui_receive_stop_server_autostop_timer": "Stop Receive Mode ({} remaining)",
|
"gui_receive_stop_server_autostop_timer": "Stop Receive Mode ({} remaining)",
|
||||||
|
"gui_receive_flatpak_data_dir": "Because you installed OnionShare using flatpak, you must save files to a folder in ~/OnionShare.",
|
||||||
"gui_copy_url": "Copy Address",
|
"gui_copy_url": "Copy Address",
|
||||||
"gui_copy_hidservauth": "Copy HidServAuth",
|
"gui_copy_hidservauth": "Copy HidServAuth",
|
||||||
"gui_canceled": "Canceled",
|
"gui_canceled": "Canceled",
|
||||||
|
@ -209,4 +210,4 @@
|
||||||
"mode_settings_receive_data_dir_label": "Save files to",
|
"mode_settings_receive_data_dir_label": "Save files to",
|
||||||
"mode_settings_receive_data_dir_browse_button": "Browse",
|
"mode_settings_receive_data_dir_browse_button": "Browse",
|
||||||
"mode_settings_website_disable_csp_checkbox": "Disable Content Security Policy header (allows your website to use third-party resources)"
|
"mode_settings_website_disable_csp_checkbox": "Disable Content Security Policy header (allows your website to use third-party resources)"
|
||||||
}
|
}
|
Loading…
Add table
Add a link
Reference in a new issue