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 19e9cfbd2c
commit 83b2b9a025
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):
"""