mirror of
https://github.com/onionshare/onionshare.git
synced 2025-08-13 08:35:46 -04:00
Make onionshare respect settings that come from the Settings object, instead of the options dialog
This commit is contained in:
parent
9c2e772205
commit
b515449498
1 changed files with 7 additions and 0 deletions
|
@ -24,6 +24,7 @@ from PyQt5.QtCore import pyqtSlot
|
||||||
|
|
||||||
import onionshare
|
import onionshare
|
||||||
from onionshare import strings, helpers, web
|
from onionshare import strings, helpers, web
|
||||||
|
from onionshare.settings import Settings
|
||||||
|
|
||||||
from .menu import Menu
|
from .menu import Menu
|
||||||
from .file_selection import FileSelection
|
from .file_selection import FileSelection
|
||||||
|
@ -147,6 +148,12 @@ class OnionShareGui(QtWidgets.QMainWindow):
|
||||||
Start the onionshare server. This uses multiple threads to start the Tor onion
|
Start the onionshare server. This uses multiple threads to start the Tor onion
|
||||||
server and the web app.
|
server and the web app.
|
||||||
"""
|
"""
|
||||||
|
# First, load settings and configure
|
||||||
|
settings = Settings()
|
||||||
|
settings.load()
|
||||||
|
self.app.set_stealth(settings.get('use_stealth'))
|
||||||
|
web.set_stay_open(not settings.get('close_after_first_download'))
|
||||||
|
|
||||||
# Reset web counters
|
# Reset web counters
|
||||||
web.download_count = 0
|
web.download_count = 0
|
||||||
web.error404_count = 0
|
web.error404_count = 0
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue