update: fixed systemwide profile backgrounds
This commit is contained in:
parent
5d6157b2a0
commit
69dce75b19
2 changed files with 22 additions and 23 deletions
|
|
@ -1473,13 +1473,16 @@ class MenuPage(Page):
|
|||
self.eliminacion()
|
||||
|
||||
def show_disconnect_button(self, toggle, profile_type, target_button):
|
||||
if target_button.isChecked():
|
||||
if profile_type == 1:
|
||||
self.disconnect_button.setVisible(toggle)
|
||||
self.boton_just_session.setVisible(not toggle)
|
||||
else:
|
||||
self.disconnect_system_wide_button.setVisible(toggle)
|
||||
self.boton_just.setVisible(not toggle)
|
||||
try:
|
||||
if target_button.isChecked():
|
||||
if profile_type == 1:
|
||||
self.disconnect_button.setVisible(toggle)
|
||||
self.boton_just_session.setVisible(not toggle)
|
||||
else:
|
||||
self.disconnect_system_wide_button.setVisible(toggle)
|
||||
self.boton_just.setVisible(not toggle)
|
||||
except RuntimeError:
|
||||
pass
|
||||
|
||||
def match_core_profiles(self, profiles_dict):
|
||||
new_dict = {}
|
||||
|
|
@ -1560,7 +1563,6 @@ class MenuPage(Page):
|
|||
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)
|
||||
|
|
@ -2191,16 +2193,7 @@ class MenuPage(Page):
|
|||
self.main_window.on_label.setParent(None)
|
||||
self.main_window.off_label.setParent(None)
|
||||
|
||||
for widget in self.scroll_widget.findChildren(QLabel):
|
||||
widget.setParent(None)
|
||||
|
||||
for widget in self.scroll_widget.findChildren(QPushButton):
|
||||
widget.setParent(None)
|
||||
|
||||
self.profile_info.clear()
|
||||
self.profile_button_map.clear()
|
||||
self.button_states.clear()
|
||||
self.buttons.clear()
|
||||
self.refresh_menu_buttons()
|
||||
|
||||
self.main_window.toggle_bg.setParent(self.main_window.toggle_button)
|
||||
self.main_window.toggle_handle.setParent(self.main_window.toggle_button)
|
||||
|
|
@ -2337,11 +2330,17 @@ class MenuPage(Page):
|
|||
if profile_type == 1:
|
||||
if target_button:
|
||||
icon_path = self.connected_tor_profile if profile_connection == 'tor' else self.connected_profile
|
||||
target_button.setIcon(QIcon(icon_path))
|
||||
try:
|
||||
target_button.setIcon(QIcon(icon_path))
|
||||
except RuntimeError:
|
||||
pass
|
||||
self.button_states[profile_id] = icon_path
|
||||
else:
|
||||
if target_button:
|
||||
target_button.setIcon(QIcon(self.system_wide_connected_profile))
|
||||
try:
|
||||
target_button.setIcon(QIcon(self.system_wide_connected_profile))
|
||||
except RuntimeError:
|
||||
pass
|
||||
self.update_status.update_image(appearance_value='background_connected')
|
||||
self.button_states[profile_id] = self.system_wide_connected_profile
|
||||
self.IsSystem += 1
|
||||
|
|
@ -2368,10 +2367,10 @@ class MenuPage(Page):
|
|||
|
||||
self.boton_edit.setEnabled(True)
|
||||
|
||||
self.refresh_menu_buttons()
|
||||
|
||||
if profile_id == self.reverse_id:
|
||||
self.print_profile_details(f"Profile_{profile_id}")
|
||||
|
||||
self.refresh_menu_buttons()
|
||||
except IndexError:
|
||||
self.update_status.update_status('An error occurred while updating profile state.')
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
[project]
|
||||
name = "sp-hydra-veil-gui"
|
||||
version = "2.0.0"
|
||||
version = "2.0.1"
|
||||
authors = [
|
||||
{ name = "Simplified Privacy" },
|
||||
]
|
||||
|
|
|
|||
Loading…
Reference in a new issue