diff --git a/gui/resources/images/icon_GB_COV.png b/gui/resources/images/icon_GB_COV.png new file mode 100644 index 0000000..0a98848 Binary files /dev/null and b/gui/resources/images/icon_GB_COV.png differ diff --git a/gui/resources/images/icon_mini_GB_COV.png b/gui/resources/images/icon_mini_GB_COV.png new file mode 100644 index 0000000..1bc9d43 Binary files /dev/null and b/gui/resources/images/icon_mini_GB_COV.png differ diff --git a/gui/v2/actions/error_handlers.py b/gui/v2/actions/error_handlers.py index 8a69c1e..89dc5cc 100644 --- a/gui/v2/actions/error_handlers.py +++ b/gui/v2/actions/error_handlers.py @@ -5,28 +5,27 @@ from core.errors.logger import logger from gui.v2.infrastructure.setup_observers import connection_observer -from gui.v2.infrastructure.ThreadSafetyTool import ThreadSafetyTool -mainthread = ThreadSafetyTool() +# from gui.v2.infrastructure.ThreadSafetyTool import ThreadSafetyTool +# mainthread = ThreadSafetyTool() from gui.v2.infrastructure.take_plumbing_action import take_action -@mainthread + def post_state_evaluation(result: Result): """Success path for initial state evaluation""" print("Initial State evaluation complete.") - if not result.valid and result.error_type == ResultError.ZOMBIE_SESSION and result.data: - active_session_profiles = result.data - logger.info("Removing Zombie Session profiles on the main thread.") - for each_profile in active_session_profiles: - logger.info(f"Removing this profile {active_session_profiles} from session since it's a fresh restart.") - SessionStateController.remove(each_profile.id) + # if not result.valid and result.error_type == ResultError.ZOMBIE_SESSION and result.data: + # active_session_profiles = result.data + # logger.info("Removing Zombie Session profiles on the main thread.") + # for each_profile in active_session_profiles: + # logger.info(f"Removing this profile {active_session_profiles} from session since it's a fresh restart.") + # SessionStateController.remove(each_profile.id) + -@mainthread @register_action(ResultError.ZOMBIE_SYSTEM) def evaluate_bad_state(): """Start core's evaluation of state with a GUI observer.""" - # return coordinate_evaluation(connection_observer=connection_observer) take_action( action=coordinate_evaluation, ui_caller=post_state_evaluation, diff --git a/gui/v2/actions/menu_coordinator.py b/gui/v2/actions/menu_coordinator.py index 1b08278..e4bc4b5 100644 --- a/gui/v2/actions/menu_coordinator.py +++ b/gui/v2/actions/menu_coordinator.py @@ -346,3 +346,4 @@ def sync_now(ui_caller: Callable): client_observer=client_observer, connection_observer=connection_observer ) + diff --git a/gui/v2/actions/profile_operations.py b/gui/v2/actions/profile_operations.py index 4f34f32..0995d68 100755 --- a/gui/v2/actions/profile_operations.py +++ b/gui/v2/actions/profile_operations.py @@ -288,7 +288,8 @@ def _delete(request: dict[str, Any]) -> MenuResult: def _navigate(request: dict[str, Any], emit: MenuCallback) -> MenuResult: """Keep fast-registration and edit synchronization policy out of page signal handlers.""" - fast = is_fast_registration_enabled(request.get("gui_config_file")) + fast = True + # is_fast_registration_enabled(request.get("gui_config_file")) auto = is_auto_sync_enabled(request.get("gui_config_file")) create = request["task"] == "create" synced = request.get("is_synced", False) diff --git a/gui/v2/ui/pages/fast_registration_page.py b/gui/v2/ui/pages/fast_registration_page.py index f624e3a..31b40ff 100755 --- a/gui/v2/ui/pages/fast_registration_page.py +++ b/gui/v2/ui/pages/fast_registration_page.py @@ -300,6 +300,7 @@ class FastRegistrationPage(Page): self.selected_values['location'], fallback_path, provider) else: if locations and hasattr(locations, 'country_name'): + print(f'Fetching image for {locations.country_code}_{locations.code}') location_image = LocationPage.create_location_button_image( f'{locations.country_code}_{locations.code}', fallback_path, provider, image_path) else: diff --git a/gui/v2/ui/pages/menu_page.py b/gui/v2/ui/pages/menu_page.py index 5ef87ff..750892a 100755 --- a/gui/v2/ui/pages/menu_page.py +++ b/gui/v2/ui/pages/menu_page.py @@ -566,9 +566,6 @@ class MenuPage(Page): print(f"location code for mini is {location}") - import time - time.sleep(20) - location_pixmap = QPixmap(os.path.join( self.btn_path, f"icon_mini_{location}.png")) if location_pixmap.isNull(): diff --git a/gui/v2/ui/pages/sync_screen.py b/gui/v2/ui/pages/sync_screen.py index a1cf827..9da14b8 100755 --- a/gui/v2/ui/pages/sync_screen.py +++ b/gui/v2/ui/pages/sync_screen.py @@ -4,9 +4,13 @@ from PyQt6.QtWidgets import QLabel, QPushButton from PyQt6.QtGui import QPixmap from core.controllers.ClientController import ClientController +from core.models.Result import Result +from gui.v2.actions.menu_coordinator import sync_now from gui.v2.ui.pages.Page import Page from gui.v2.workers.worker_thread import WorkerThread +from gui.v2.infrastructure.ThreadSafetyTool import ThreadSafetyTool +mainthread = ThreadSafetyTool() class SyncScreen(Page): @@ -72,9 +76,7 @@ class SyncScreen(Page): self.update_status('Sync failed. Please try again later.') return - self.perform_update_check() - - self.update_status.update_status('Sync complete') + self.connection_manager.set_synced(True) update_available = ClientController.can_be_updated()