summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMicah Lee <micah@micahflee.com>2017-05-22 17:11:41 -0700
committerMicah Lee <micah@micahflee.com>2017-05-22 17:11:41 -0700
commit444f50868dbfb78f1cacafe032a05c1f945ea8ef (patch)
tree224f34a55c5f10820cc64920cf7bf7b8003aaf2a
parent5846b06478994caa71b1fffe43574a27ef064563 (diff)
downloadonionshare-444f50868dbfb78f1cacafe032a05c1f945ea8ef.tar.gz
onionshare-444f50868dbfb78f1cacafe032a05c1f945ea8ef.zip
Remove the extra instances of the Settings object, and only use OnionShareGui.settings
-rw-r--r--onionshare_gui/onionshare_gui.py11
1 files changed, 4 insertions, 7 deletions
diff --git a/onionshare_gui/onionshare_gui.py b/onionshare_gui/onionshare_gui.py
index 46356e2b..166700e1 100644
--- a/onionshare_gui/onionshare_gui.py
+++ b/onionshare_gui/onionshare_gui.py
@@ -225,10 +225,7 @@ class OnionShareGui(QtWidgets.QMainWindow):
self.set_server_active(True)
- # First, load settings and configure
- settings = Settings()
- settings.load()
- self.app.set_stealth(settings.get('use_stealth'))
+ self.app.set_stealth(self.settings.get('use_stealth'))
# Reset web counters
web.download_count = 0
@@ -245,10 +242,10 @@ class OnionShareGui(QtWidgets.QMainWindow):
self.starting_server_error.emit(e.args[0])
return
- # start onionshare http service in new thread
- # First, load settings and configure
+
self.app.stay_open = not self.settings.get('close_after_first_download')
- common.log('OnionShareGUI', 'stay_open', 'stay_open={}'.format(self.app.stay_open))
+
+ # start onionshare http service in new thread
t = threading.Thread(target=web.start, args=(self.app.port, self.app.stay_open))
t.daemon = True
t.start()