diff --git a/onionshare_gui/onionshare_gui.py b/onionshare_gui/onionshare_gui.py index c7956bc6..5d0cae07 100644 --- a/onionshare_gui/onionshare_gui.py +++ b/onionshare_gui/onionshare_gui.py @@ -48,7 +48,7 @@ class OnionShareGui(QtGui.QWidget): downloads = Downloads() # options - options = Options() + options = Options(web.stay_open) # main layout self.layout = QtGui.QVBoxLayout() diff --git a/onionshare_gui/options.py b/onionshare_gui/options.py index 6e3a30a6..16e8a858 100644 --- a/onionshare_gui/options.py +++ b/onionshare_gui/options.py @@ -4,13 +4,16 @@ import common from onionshare import strings, helpers class Options(QtGui.QHBoxLayout): - def __init__(self): + def __init__(self, stay_open=False): super(Options, self).__init__() self.addSpacing(10) # close automatically self.close_automatically = QtGui.QCheckBox() - self.close_automatically.setCheckState(QtCore.Qt.Checked) + if stay_open: + self.close_automatically.setCheckState(QtCore.Qt.Unchecked) + else: + self.close_automatically.setCheckState(QtCore.Qt.Checked) self.close_automatically.setText(strings._("close_on_finish")) # add the widgets