mirror of
https://github.com/onionshare/onionshare.git
synced 2024-12-29 01:06:16 -05:00
"Stop sharing automatically" checkbox respected in GUI when toggled before the server is started (fixes #223)
This commit is contained in:
parent
76d65c678b
commit
ce79633eec
@ -106,7 +106,7 @@ class OnionShareGui(QtGui.QWidget):
|
|||||||
self.downloads = Downloads()
|
self.downloads = Downloads()
|
||||||
|
|
||||||
# options
|
# options
|
||||||
self.options = Options(web)
|
self.options = Options(web, self.app)
|
||||||
|
|
||||||
# status bar
|
# status bar
|
||||||
self.status_bar = QtGui.QStatusBar()
|
self.status_bar = QtGui.QStatusBar()
|
||||||
|
@ -27,10 +27,11 @@ class Options(QtGui.QHBoxLayout):
|
|||||||
"""
|
"""
|
||||||
The extra onionshare options in the GUI.
|
The extra onionshare options in the GUI.
|
||||||
"""
|
"""
|
||||||
def __init__(self, web):
|
def __init__(self, web, app):
|
||||||
super(Options, self).__init__()
|
super(Options, self).__init__()
|
||||||
|
|
||||||
self.web = web
|
self.web = web
|
||||||
|
self.app = app
|
||||||
|
|
||||||
# close automatically
|
# close automatically
|
||||||
self.close_automatically = QtGui.QCheckBox()
|
self.close_automatically = QtGui.QCheckBox()
|
||||||
@ -50,5 +51,7 @@ class Options(QtGui.QHBoxLayout):
|
|||||||
"""
|
"""
|
||||||
if state > 0:
|
if state > 0:
|
||||||
self.web.set_stay_open(False)
|
self.web.set_stay_open(False)
|
||||||
|
self.app.stay_open = False
|
||||||
else:
|
else:
|
||||||
self.web.set_stay_open(True)
|
self.web.set_stay_open(True)
|
||||||
|
self.app.stay_open = True
|
||||||
|
Loading…
Reference in New Issue
Block a user