update: revert back version to 2.0.0
This commit is contained in:
parent
01d271b12e
commit
ea221bae93
1 changed files with 22 additions and 0 deletions
|
|
@ -1556,6 +1556,28 @@ class MenuPage(Page):
|
||||||
self.update_scroll_widget_size()
|
self.update_scroll_widget_size()
|
||||||
|
|
||||||
def refresh_menu_buttons(self):
|
def refresh_menu_buttons(self):
|
||||||
|
profiles = ProfileController.get_all()
|
||||||
|
self.button_states.clear()
|
||||||
|
self.connection_manager._connected_profiles.clear()
|
||||||
|
self.IsSystem = 0
|
||||||
|
|
||||||
|
for profile_id, profile in profiles.items():
|
||||||
|
if ProfileController.is_enabled(profile):
|
||||||
|
self.connection_manager.add_connected_profile(profile_id)
|
||||||
|
if isinstance(profile, SessionProfile):
|
||||||
|
if profile.connection and profile.connection.code == 'tor':
|
||||||
|
self.button_states[profile_id] = self.connected_tor_profile
|
||||||
|
else:
|
||||||
|
self.button_states[profile_id] = self.connected_profile
|
||||||
|
elif isinstance(profile, SystemProfile):
|
||||||
|
self.button_states[profile_id] = self.system_wide_connected_profile
|
||||||
|
self.IsSystem += 1
|
||||||
|
|
||||||
|
if self.IsSystem > 0:
|
||||||
|
self.update_status.update_image(appearance_value='background_connected')
|
||||||
|
else:
|
||||||
|
self.update_status.update_image()
|
||||||
|
|
||||||
for widget in self.scroll_widget.findChildren(QLabel):
|
for widget in self.scroll_widget.findChildren(QLabel):
|
||||||
widget.setParent(None)
|
widget.setParent(None)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue