Previously the license dialog was instanciated once and re-used for each
install. As the dialog is only shown after the plugin is downloaded it
was possible to click install for multiple plugins. Plugins that finish
downloading later would override the dialog of earlier downloaded
plugins. Clicking "accept" would then only install the latest downloaded
plugin.
Now for each install a separate dialog is shown. Accepting the license
agreement would only install the recently accepted plugin.
Note: in the current form the license agreement does not show any
identification to what plugin triggered the dialog. As multiple dialogs
can be shown at once this might be unclear.
cura 8587
The `_to_be_installed_package_id` and `_to_be_installed_package_path`
can now be removed from the class as they can requested from the model
itself. This we make sure that the we alway install the package for
which the license was recently accepted.
cura 8587
The server is queried using the local packages_id and version to
determine if they can be updated. The Manage button state is set
accordingly. This is done in an async way to keep the UI responsive
A.t.m I'm not sure if I might need to move this logic out, since
we also need to make this query when check periodically for updates.
when the list is not shown. But that would also entail creating
the installed packages list before the Manage Packages tab is ever
created in the Marketplace.
Contributes to: CURA-8587
There is a distinction between packages which are already
installed on the local machine and packages which are
available on the remote server. Even with this difference
it is important that they are handled the same and can be
reused in the same GUI elements.
In order to reduce code duplication I created a parent object
PackageList which contains the base logic and interface for
the QML and let both RemotePackageList and LocalPackageList
inherit from this.
UX specified that the gear icon (Settings.svg) should be
separate from the tabs of material and plugins. This also
ment that the current tab item couldn't set the pageTitle
anymore. This is now defined in the Package component and
set when the loader has loaded the external QML file.
Contributes to CURA-8558
This is a consequence of lazy loading and the re-loading we do when the Marketplace window gets closed. This solves a crash with reproduction steps:
1. Open the Marketplace.
2. Quickly close the Marketplace.
3. Quickly re-open the Marketplace.
4. The API responds to the request made by the first opening of the Marketplace.
This crashed because when the Marketplace first opened, it made a request to the API with the HttpRequestManager. This request takes a while to respond to. If you close and re-open the Marketplace, the PackageList gets destroyed and a new one gets made. The HttpRequestManager eventually gets a response and wants to call the callback of the first PackageList, but that one got destroyed in the Qt engine so it'll throw an error saying that the object doesn't exist any more.
Contributes to issue CURA-8557.
This reverts commit cdf05a56065321d9fc15767490d846680f3dc63f.
It's no longer necessary since we filter on package type now anyway.
Contributes to issue CURA-8557.
The filter affects the URL. So we can't just start a request in the init. We need to request once all of the properties have been set.
We also can't start the request when the filter changes, because there will be more filters and we don't want to start multiple requests. It needs to be manual.
Contributes to issue CURA-8557.
It was showing all packages available in the marketplace.
This included `cloud` DF integrations. It will now filter
on packages and plugins.
Contributes to CURA-8556
This can already be set via the isLoading property. What's more, it really only ever needs to be called from Python. I just added the fset because we have the setter anyway.
Contributes to issue CURA-8556.
The simplest way I can think of.
Currently we only call the request function once, so we can only get the first page. Before calling it multiple times, we should check if there are more pages by checking if the request URL is an empty string.
Contributes to issue CURA-8556.