mirror of
https://github.com/onionshare/onionshare.git
synced 2025-07-26 08:05:49 -04:00
Reflects the autoconnect status on toggle checkbox on opening
This commit is contained in:
parent
2cc8cf59f3
commit
1e03dd0df9
2 changed files with 1 additions and 4 deletions
|
@ -73,9 +73,6 @@ class AutoConnectTab(QtWidgets.QWidget):
|
||||||
strings._("gui_enable_autoconnect_checkbox")
|
strings._("gui_enable_autoconnect_checkbox")
|
||||||
)
|
)
|
||||||
self.enable_autoconnect_checkbox.clicked.connect(self.toggle_auto_connect)
|
self.enable_autoconnect_checkbox.clicked.connect(self.toggle_auto_connect)
|
||||||
# self.enable_autoconnect_checkbox.setText(
|
|
||||||
# strings._("gui_enable_autoconnect_checkbox")
|
|
||||||
# )
|
|
||||||
self.enable_autoconnect_checkbox.setFixedWidth(400)
|
self.enable_autoconnect_checkbox.setFixedWidth(400)
|
||||||
self.enable_autoconnect_checkbox.setStyleSheet(
|
self.enable_autoconnect_checkbox.setStyleSheet(
|
||||||
common.gui.css["enable_autoconnect"]
|
common.gui.css["enable_autoconnect"]
|
||||||
|
@ -136,6 +133,7 @@ class AutoConnectTab(QtWidgets.QWidget):
|
||||||
self.setLayout(self.layout)
|
self.setLayout(self.layout)
|
||||||
|
|
||||||
if self.auto_connect_enabled:
|
if self.auto_connect_enabled:
|
||||||
|
self.enable_autoconnect_checkbox.setCheckState(QtCore.Qt.Checked)
|
||||||
self.connect_clicked()
|
self.connect_clicked()
|
||||||
|
|
||||||
def toggle_auto_connect(self):
|
def toggle_auto_connect(self):
|
||||||
|
|
|
@ -541,7 +541,6 @@ class GuiCommon:
|
||||||
class ToggleCheckbox(QtWidgets.QCheckBox):
|
class ToggleCheckbox(QtWidgets.QCheckBox):
|
||||||
def __init__(self, text):
|
def __init__(self, text):
|
||||||
super(ToggleCheckbox, self).__init__(text)
|
super(ToggleCheckbox, self).__init__(text)
|
||||||
print(text)
|
|
||||||
# Set default parameters
|
# Set default parameters
|
||||||
self.setCursor(QtCore.Qt.PointingHandCursor)
|
self.setCursor(QtCore.Qt.PointingHandCursor)
|
||||||
self.w = 50
|
self.w = 50
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue