diff --git a/desktop/src/onionshare/connection_tab.py b/desktop/src/onionshare/connection_tab.py index f066c6ed..4c06b713 100644 --- a/desktop/src/onionshare/connection_tab.py +++ b/desktop/src/onionshare/connection_tab.py @@ -36,13 +36,14 @@ class AutoConnectTab(QtWidgets.QWidget): close_this_tab = QtCore.Signal() tor_is_connected = QtCore.Signal() tor_is_disconnected = QtCore.Signal() - def __init__(self, common, tab_id, status_bar): + def __init__(self, common, tab_id, status_bar, parent=None): super(AutoConnectTab, self).__init__() self.common = common self.common.log("AutoConnectTab", "__init__") self.status_bar = status_bar self.tab_id = tab_id + self.parent = parent # Was auto connected? self.curr_settings = Settings(common) @@ -145,6 +146,9 @@ class AutoConnectTab(QtWidgets.QWidget): ) self.curr_settings.save() + def open_tor_settings(self): + self.parent.open_tor_settings_tab() + def connect_clicked(self): """ Connect button clicked. Try to connect to tor. diff --git a/desktop/src/onionshare/tab_widget.py b/desktop/src/onionshare/tab_widget.py index d26947e4..b5c18023 100644 --- a/desktop/src/onionshare/tab_widget.py +++ b/desktop/src/onionshare/tab_widget.py @@ -214,7 +214,7 @@ class TabWidget(QtWidgets.QTabWidget): self.setCurrentIndex(self.indexOf(self.tabs[tab_id])) return - connection_tab = AutoConnectTab(self.common, self.current_tab_id, self.status_bar) + connection_tab = AutoConnectTab(self.common, self.current_tab_id, self.status_bar, parent=self) connection_tab.close_this_tab.connect(self.close_connection_tab) self.tabs[self.current_tab_id] = connection_tab self.current_tab_id += 1