mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-06-30 04:05:25 +08:00
Merge branch 'CURA-6577_rebased' of github.com:Ultimaker/Cura
This commit is contained in:
commit
6e05393539
@ -57,6 +57,7 @@ UM.Dialog
|
|||||||
{
|
{
|
||||||
licenseDialog.close();
|
licenseDialog.close();
|
||||||
toolbox.install(licenseDialog.pluginFileLocation);
|
toolbox.install(licenseDialog.pluginFileLocation);
|
||||||
|
toolbox.subscribe(licenseDialog.pluginName);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
Button
|
Button
|
||||||
|
@ -164,6 +164,14 @@ class Toolbox(QObject, Extension):
|
|||||||
|
|
||||||
self._application.getHttpRequestManager().put(url, headers_dict = self._request_headers,
|
self._application.getHttpRequestManager().put(url, headers_dict = self._request_headers,
|
||||||
data = data.encode())
|
data = data.encode())
|
||||||
|
@pyqtSlot(str)
|
||||||
|
def subscribe(self, package_id: str) -> None:
|
||||||
|
if self._application.getCuraAPI().account.isLoggedIn:
|
||||||
|
data = "{\"data\": {\"package_id\": \"%s\", \"sdk_version\": \"%s\"}}" % (package_id, self._sdk_version)
|
||||||
|
self._application.getHttpRequestManager().put(url=self._api_url_user_packages,
|
||||||
|
headers_dict=self._request_headers,
|
||||||
|
data=data.encode()
|
||||||
|
)
|
||||||
|
|
||||||
@pyqtSlot(result = str)
|
@pyqtSlot(result = str)
|
||||||
def getLicenseDialogPluginName(self) -> str:
|
def getLicenseDialogPluginName(self) -> str:
|
||||||
@ -728,6 +736,7 @@ class Toolbox(QObject, Extension):
|
|||||||
return
|
return
|
||||||
|
|
||||||
self.install(file_path)
|
self.install(file_path)
|
||||||
|
self.subscribe(package_info["package_id"])
|
||||||
|
|
||||||
# Getter & Setters for Properties:
|
# Getter & Setters for Properties:
|
||||||
# --------------------------------------------------------------------------
|
# --------------------------------------------------------------------------
|
||||||
|
Loading…
x
Reference in New Issue
Block a user