Download packages to be installed and show a message with progress.

CURA-6983
This commit is contained in:
Nino van Hooff 2020-01-08 11:27:56 +01:00
parent 883243b533
commit 84e676c1f8
4 changed files with 133 additions and 7 deletions

View file

@ -1,5 +1,5 @@
import os
from typing import Optional
from typing import Optional, Dict
from PyQt5.QtCore import QObject
@ -15,7 +15,7 @@ class DiscrepanciesPresenter(QObject):
def __init__(self, app: QtApplication):
super().__init__(app)
self.packageMutations = Signal() # {"SettingsGuide" : "install", "PrinterSettings" : "uninstall"}
self.packageMutations = Signal() # Emits SubscribedPackagesModel
self._app = app
self._dialog = None # type: Optional[QObject]
@ -28,6 +28,5 @@ class DiscrepanciesPresenter(QObject):
def _onConfirmClicked(self, model: SubscribedPackagesModel):
# For now, all packages presented to the user should be installed.
# Later, we will support uninstall ?or ignoring? of a certain package
choices = {item["package_id"]: "install" for item in model.items}
self.packageMutations.emit(choices)
# Later, we might remove items for which the user unselected the package
self.packageMutations.emit(model)