From 1e03dd0df9272f2ce35341393248ffe043a89640 Mon Sep 17 00:00:00 2001 From: Saptak S Date: Fri, 3 Dec 2021 18:34:53 +0530 Subject: [PATCH] Reflects the autoconnect status on toggle checkbox on opening --- desktop/src/onionshare/connection_tab.py | 4 +--- desktop/src/onionshare/gui_common.py | 1 - 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/desktop/src/onionshare/connection_tab.py b/desktop/src/onionshare/connection_tab.py index a0d7b78f..6cdba20d 100644 --- a/desktop/src/onionshare/connection_tab.py +++ b/desktop/src/onionshare/connection_tab.py @@ -73,9 +73,6 @@ class AutoConnectTab(QtWidgets.QWidget): strings._("gui_enable_autoconnect_checkbox") ) 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.setStyleSheet( common.gui.css["enable_autoconnect"] @@ -136,6 +133,7 @@ class AutoConnectTab(QtWidgets.QWidget): self.setLayout(self.layout) if self.auto_connect_enabled: + self.enable_autoconnect_checkbox.setCheckState(QtCore.Qt.Checked) self.connect_clicked() def toggle_auto_connect(self): diff --git a/desktop/src/onionshare/gui_common.py b/desktop/src/onionshare/gui_common.py index aa3a596e..dc9c74b6 100644 --- a/desktop/src/onionshare/gui_common.py +++ b/desktop/src/onionshare/gui_common.py @@ -541,7 +541,6 @@ class GuiCommon: class ToggleCheckbox(QtWidgets.QCheckBox): def __init__(self, text): super(ToggleCheckbox, self).__init__(text) - print(text) # Set default parameters self.setCursor(QtCore.Qt.PointingHandCursor) self.w = 50