mirror of
https://github.com/onionshare/onionshare.git
synced 2024-12-24 23:09:42 -05:00
Implement blank settings_have_changed in SettingsTab and TorSettingsTab
This commit is contained in:
parent
20a0d7f25b
commit
f784870c76
@ -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")
|
||||||
|
|
||||||
|
@ -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()
|
||||||
|
@ -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")
|
||||||
|
Loading…
Reference in New Issue
Block a user