mirror of
https://github.com/onionshare/onionshare.git
synced 2025-01-26 11:13:00 -03:00
Opens TorSettingsTab when clicked on network settings
This commit is contained in:
parent
1cde115f6e
commit
e2dbe6089a
2 changed files with 6 additions and 2 deletions
|
@ -36,13 +36,14 @@ class AutoConnectTab(QtWidgets.QWidget):
|
||||||
close_this_tab = QtCore.Signal()
|
close_this_tab = QtCore.Signal()
|
||||||
tor_is_connected = QtCore.Signal()
|
tor_is_connected = QtCore.Signal()
|
||||||
tor_is_disconnected = 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__()
|
super(AutoConnectTab, self).__init__()
|
||||||
self.common = common
|
self.common = common
|
||||||
self.common.log("AutoConnectTab", "__init__")
|
self.common.log("AutoConnectTab", "__init__")
|
||||||
|
|
||||||
self.status_bar = status_bar
|
self.status_bar = status_bar
|
||||||
self.tab_id = tab_id
|
self.tab_id = tab_id
|
||||||
|
self.parent = parent
|
||||||
|
|
||||||
# Was auto connected?
|
# Was auto connected?
|
||||||
self.curr_settings = Settings(common)
|
self.curr_settings = Settings(common)
|
||||||
|
@ -145,6 +146,9 @@ class AutoConnectTab(QtWidgets.QWidget):
|
||||||
)
|
)
|
||||||
self.curr_settings.save()
|
self.curr_settings.save()
|
||||||
|
|
||||||
|
def open_tor_settings(self):
|
||||||
|
self.parent.open_tor_settings_tab()
|
||||||
|
|
||||||
def connect_clicked(self):
|
def connect_clicked(self):
|
||||||
"""
|
"""
|
||||||
Connect button clicked. Try to connect to tor.
|
Connect button clicked. Try to connect to tor.
|
||||||
|
|
|
@ -214,7 +214,7 @@ class TabWidget(QtWidgets.QTabWidget):
|
||||||
self.setCurrentIndex(self.indexOf(self.tabs[tab_id]))
|
self.setCurrentIndex(self.indexOf(self.tabs[tab_id]))
|
||||||
return
|
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)
|
connection_tab.close_this_tab.connect(self.close_connection_tab)
|
||||||
self.tabs[self.current_tab_id] = connection_tab
|
self.tabs[self.current_tab_id] = connection_tab
|
||||||
self.current_tab_id += 1
|
self.current_tab_id += 1
|
||||||
|
|
Loading…
Add table
Reference in a new issue