Implement blank settings_have_changed in SettingsTab and TorSettingsTab

This commit is contained in:
Micah Lee 2021-10-24 19:53:37 -07:00
parent 20a0d7f25b
commit f784870c76
No known key found for this signature in database
GPG Key ID: 403C2657CD994F73
3 changed files with 13 additions and 5 deletions

View File

@ -304,6 +304,10 @@ class SettingsTab(QtWidgets.QWidget):
return settings return settings
def settings_have_changed(self):
# Global settings have changed
self.common.log("SettingsTab", "settings_have_changed")
def _update_autoupdate_timestamp(self, autoupdate_timestamp): def _update_autoupdate_timestamp(self, autoupdate_timestamp):
self.common.log("SettingsTab", "_update_autoupdate_timestamp") self.common.log("SettingsTab", "_update_autoupdate_timestamp")

View File

@ -271,20 +271,20 @@ class TorConnectionThread(QtCore.QThread):
canceled_connecting_to_tor = QtCore.Signal() canceled_connecting_to_tor = QtCore.Signal()
error_connecting_to_tor = QtCore.Signal(str) error_connecting_to_tor = QtCore.Signal(str)
def __init__(self, common, settings, dialog): def __init__(self, common, settings, parent):
super(TorConnectionThread, self).__init__() super(TorConnectionThread, self).__init__()
self.common = common self.common = common
self.common.log("TorConnectionThread", "__init__") self.common.log("TorConnectionThread", "__init__")
self.settings = settings self.settings = settings
self.dialog = dialog self.parent = parent
def run(self): def run(self):
self.common.log("TorConnectionThread", "run") self.common.log("TorConnectionThread", "run")
# Connect to the Onion # Connect to the Onion
try: try:
self.dialog.onion.connect(self.settings, False, self._tor_status_update) self.parent.onion.connect(self.settings, False, self._tor_status_update)
if self.dialog.onion.connected_to_tor: if self.parent.onion.connected_to_tor:
self.connected_to_tor.emit() self.connected_to_tor.emit()
else: else:
self.canceled_connecting_to_tor.emit() self.canceled_connecting_to_tor.emit()
@ -320,4 +320,4 @@ class TorConnectionThread(QtCore.QThread):
self.tor_status_update.emit(progress, summary) self.tor_status_update.emit(progress, summary)
# Return False if the dialog was canceled # Return False if the dialog was canceled
return not self.dialog.wasCanceled() return not self.parent.wasCanceled()

View File

@ -872,3 +872,7 @@ class TorSettingsTab(QtWidgets.QWidget):
# Wait 1ms for the event loop to finish, then quit # Wait 1ms for the event loop to finish, then quit
QtCore.QTimer.singleShot(1, self.common.gui.qtapp.quit) QtCore.QTimer.singleShot(1, self.common.gui.qtapp.quit)
def settings_have_changed(self):
# Global settings have changed
self.common.log("TorSettingsTab", "settings_have_changed")