diff --git a/bottles/frontend/widgets/component.py b/bottles/frontend/widgets/component.py index aebceaf7df..fc85f406da 100644 --- a/bottles/frontend/widgets/component.py +++ b/bottles/frontend/widgets/component.py @@ -93,6 +93,10 @@ def async_callback(result, error=False): return self.update_progress(status=Status.FAILED) + @GtkUtils.run_in_main_loop + def async_func(*args, **kwargs): + return self.update_progress(*args, **kwargs) + self.btn_download.set_visible(False) self.btn_cancel.set_visible(False) # TODO: unimplemented self.box_download_status.set_visible(True) @@ -102,7 +106,7 @@ def async_callback(result, error=False): callback=async_callback, component_type=self.component_type, component_name=self.name, - func=self.update_progress, + func=async_func, ) def uninstall(self, widget):