update: fixed systemwide profile backgrounds

This commit is contained in:
Your Name 2025-12-18 19:25:21 +01:00
parent 5d6157b2a0
commit 69dce75b19
2 changed files with 22 additions and 23 deletions

View file

@ -1473,13 +1473,16 @@ class MenuPage(Page):
self.eliminacion() self.eliminacion()
def show_disconnect_button(self, toggle, profile_type, target_button): def show_disconnect_button(self, toggle, profile_type, target_button):
if target_button.isChecked(): try:
if profile_type == 1: if target_button.isChecked():
self.disconnect_button.setVisible(toggle) if profile_type == 1:
self.boton_just_session.setVisible(not toggle) self.disconnect_button.setVisible(toggle)
else: self.boton_just_session.setVisible(not toggle)
self.disconnect_system_wide_button.setVisible(toggle) else:
self.boton_just.setVisible(not toggle) self.disconnect_system_wide_button.setVisible(toggle)
self.boton_just.setVisible(not toggle)
except RuntimeError:
pass
def match_core_profiles(self, profiles_dict): def match_core_profiles(self, profiles_dict):
new_dict = {} new_dict = {}
@ -1560,7 +1563,6 @@ class MenuPage(Page):
self.button_states.clear() self.button_states.clear()
self.connection_manager._connected_profiles.clear() self.connection_manager._connected_profiles.clear()
self.IsSystem = 0 self.IsSystem = 0
for profile_id, profile in profiles.items(): for profile_id, profile in profiles.items():
if ProfileController.is_enabled(profile): if ProfileController.is_enabled(profile):
self.connection_manager.add_connected_profile(profile_id) 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.on_label.setParent(None)
self.main_window.off_label.setParent(None) self.main_window.off_label.setParent(None)
for widget in self.scroll_widget.findChildren(QLabel): self.refresh_menu_buttons()
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.main_window.toggle_bg.setParent(self.main_window.toggle_button) self.main_window.toggle_bg.setParent(self.main_window.toggle_button)
self.main_window.toggle_handle.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 profile_type == 1:
if target_button: if target_button:
icon_path = self.connected_tor_profile if profile_connection == 'tor' else self.connected_profile 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 self.button_states[profile_id] = icon_path
else: else:
if target_button: 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.update_status.update_image(appearance_value='background_connected')
self.button_states[profile_id] = self.system_wide_connected_profile self.button_states[profile_id] = self.system_wide_connected_profile
self.IsSystem += 1 self.IsSystem += 1
@ -2368,10 +2367,10 @@ class MenuPage(Page):
self.boton_edit.setEnabled(True) self.boton_edit.setEnabled(True)
self.refresh_menu_buttons()
if profile_id == self.reverse_id: if profile_id == self.reverse_id:
self.print_profile_details(f"Profile_{profile_id}") self.print_profile_details(f"Profile_{profile_id}")
self.refresh_menu_buttons()
except IndexError: except IndexError:
self.update_status.update_status('An error occurred while updating profile state.') self.update_status.update_status('An error occurred while updating profile state.')

View file

@ -1,6 +1,6 @@
[project] [project]
name = "sp-hydra-veil-gui" name = "sp-hydra-veil-gui"
version = "2.0.0" version = "2.0.1"
authors = [ authors = [
{ name = "Simplified Privacy" }, { name = "Simplified Privacy" },
] ]