Reload Settings whenever the settings get saved in SettingsDialog

This commit is contained in:
Micah Lee 2017-05-22 17:08:05 -07:00
parent e626a410f3
commit 5846b06478
No known key found for this signature in database
GPG key ID: 403C2657CD994F73
2 changed files with 13 additions and 4 deletions

View file

@ -206,7 +206,15 @@ class OnionShareGui(QtWidgets.QMainWindow):
"""
Open the SettingsDialog.
"""
SettingsDialog(self.onion, self.qtapp)
common.log('OnionShareGui', 'open_settings')
def reload_settings():
common.log('OnionShareGui', 'open_settings', 'settings have changed, reloading')
self.settings.load()
d = SettingsDialog(self.onion, self.qtapp)
d.settings_saved.connect(reload_settings)
d.exec_()
def start_server(self):
"""