From 9a85256780b97cedd42cadfd88e96de004ff8916 Mon Sep 17 00:00:00 2001 From: Ali Mirjamali Date: Mon, 11 Nov 2024 18:02:36 +0330 Subject: [PATCH] Show progress bar after loading CSS theme --- qubes_config/global_config/global_config.py | 6 +++--- qubes_config/new_qube/new_qube_app.py | 4 +--- qubes_config/widgets/gtk_widgets.py | 1 - 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/qubes_config/global_config/global_config.py b/qubes_config/global_config/global_config.py index b01e79f9..b3ed2b4c 100644 --- a/qubes_config/global_config/global_config.py +++ b/qubes_config/global_config/global_config.py @@ -248,9 +248,6 @@ def perform_setup(self): """ The function that performs actual widget realization and setup. """ - self.progress_bar_dialog.show() - self.progress_bar_dialog.update_progress(0) - self.builder = Gtk.Builder() glade_ref = (importlib.resources.files('qubes_config') / 'global_config.glade') @@ -266,6 +263,9 @@ def perform_setup(self): light_file_name='qubes-global-config-light.css', dark_file_name='qubes-global-config-dark.css') + self.progress_bar_dialog.show_all() + self.progress_bar_dialog.update_progress(0) + self.apply_button: Gtk.Button = self.builder.get_object('apply_button') self.cancel_button: Gtk.Button = \ self.builder.get_object('cancel_button') diff --git a/qubes_config/new_qube/new_qube_app.py b/qubes_config/new_qube/new_qube_app.py index 122beef0..360485f5 100644 --- a/qubes_config/new_qube/new_qube_app.py +++ b/qubes_config/new_qube/new_qube_app.py @@ -89,9 +89,6 @@ def perform_setup(self): The function that performs actual widget realization and setup. Should be only called once, in the main instance of this application. """ - self.progress_bar_dialog.show() - self.progress_bar_dialog.update_progress(0.1) - self.builder = Gtk.Builder() glade_ref = (importlib.resources.files('qubes_config') / 'new_qube.glade') @@ -108,6 +105,7 @@ def perform_setup(self): light_file_name='qubes-new-qube-light.css', dark_file_name='qubes-new-qube-dark.css') + self.progress_bar_dialog.show_all() self.progress_bar_dialog.update_progress(0.1) self.template_handler = TemplateHandler(self.builder, self.qapp) diff --git a/qubes_config/widgets/gtk_widgets.py b/qubes_config/widgets/gtk_widgets.py index 0e745cf6..005bda60 100644 --- a/qubes_config/widgets/gtk_widgets.py +++ b/qubes_config/widgets/gtk_widgets.py @@ -649,7 +649,6 @@ def __init__(self, parent_application: Gtk.Application, loading_text: str): self.box.pack_start(self.progress_bar, False, False, 10) - self.show_all() self.update_progress(0) self.connect('delete-event', self._quit)