mirror of
https://github.com/onionshare/onionshare.git
synced 2024-12-17 19:54:48 -05:00
Opens TorSettingsTab when clicked on network settings
This commit is contained in:
parent
1cde115f6e
commit
e2dbe6089a
@ -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.
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user