mirror of
https://github.com/onionshare/onionshare.git
synced 2024-10-01 01:35:40 -04:00
Merge branch '528_disable_check_for_updates_if_disconnected' of https://github.com/mig5/onionshare into mig5-528_disable_check_for_updates_if_disconnected
This commit is contained in:
commit
c29259cdea
@ -114,6 +114,9 @@ class SettingsDialog(QtWidgets.QDialog):
|
|||||||
# Check for updates button
|
# Check for updates button
|
||||||
self.check_for_updates_button = QtWidgets.QPushButton(strings._('gui_settings_autoupdate_check_button', True))
|
self.check_for_updates_button = QtWidgets.QPushButton(strings._('gui_settings_autoupdate_check_button', True))
|
||||||
self.check_for_updates_button.clicked.connect(self.check_for_updates)
|
self.check_for_updates_button.clicked.connect(self.check_for_updates)
|
||||||
|
# We can't check for updates if not connected to Tor
|
||||||
|
if not self.onion.connected_to_tor:
|
||||||
|
self.check_for_updates_button.setEnabled(False)
|
||||||
|
|
||||||
# Autoupdate options layout
|
# Autoupdate options layout
|
||||||
autoupdate_group_layout = QtWidgets.QVBoxLayout()
|
autoupdate_group_layout = QtWidgets.QVBoxLayout()
|
||||||
@ -645,8 +648,11 @@ class SettingsDialog(QtWidgets.QDialog):
|
|||||||
|
|
||||||
def _enable_buttons(self):
|
def _enable_buttons(self):
|
||||||
common.log('SettingsDialog', '_enable_buttons')
|
common.log('SettingsDialog', '_enable_buttons')
|
||||||
|
# We can't check for updates if we're still not connected to Tor
|
||||||
self.check_for_updates_button.setEnabled(True)
|
if not self.onion.connected_to_tor:
|
||||||
|
self.check_for_updates_button.setEnabled(False)
|
||||||
|
else:
|
||||||
|
self.check_for_updates_button.setEnabled(True)
|
||||||
self.connection_type_test_button.setEnabled(True)
|
self.connection_type_test_button.setEnabled(True)
|
||||||
self.save_button.setEnabled(True)
|
self.save_button.setEnabled(True)
|
||||||
self.cancel_button.setEnabled(True)
|
self.cancel_button.setEnabled(True)
|
||||||
|
Loading…
Reference in New Issue
Block a user