mirror of
https://github.com/onionshare/onionshare.git
synced 2024-10-01 01:35:40 -04:00
Opens connect tab if persistent tab is there
This commit is contained in:
parent
8d1d395d11
commit
7e982f2223
@ -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()
|
||||
|
@ -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"))
|
||||
|
Loading…
Reference in New Issue
Block a user