Opens connect tab if persistent tab is there

This commit is contained in:
Saptak S 2021-12-09 03:43:19 +05:30
parent 8d1d395d11
commit 7e982f2223
No known key found for this signature in database
GPG Key ID: 7B7F1772C0C6FCBF
2 changed files with 5 additions and 0 deletions

View File

@ -147,6 +147,9 @@ class MainWindow(QtWidgets.QMainWindow):
if len(self.common.settings.get("persistent_tabs")) > 0:
for mode_settings_id in self.common.settings.get("persistent_tabs"):
self.tabs.load_tab(mode_settings_id)
# If not connected to tor in beginning, show autoconnect tab
if not self.common.gui.onion.connected_to_tor:
self.tabs.new_tab_clicked()
else:
# Start with opening the first tab
self.tabs.new_tab_clicked()

View File

@ -220,6 +220,8 @@ class TabWidget(QtWidgets.QTabWidget):
connection_tab = AutoConnectTab(self.common, self.current_tab_id, self.status_bar, parent=self)
connection_tab.close_this_tab.connect(self.close_connection_tab)
connection_tab.tor_is_connected.connect(self.tor_is_connected)
connection_tab.tor_is_disconnected.connect(self.tor_is_disconnected)
self.tabs[self.current_tab_id] = connection_tab
self.current_tab_id += 1
index = self.addTab(connection_tab, strings._("gui_autoconnect_start"))