mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-06-04 11:14:21 +08:00
Also have/keep the uninstalled status displayed.
'isRecentlyInstalled' was both for installing _and_ uninstalling. Will add the rename to the refactor later on. part of CURA-8587
This commit is contained in:
parent
db09954ac8
commit
27cb1d2d9f
@ -7,6 +7,7 @@ from typing import Any, Dict, List, Optional
|
|||||||
|
|
||||||
from PyQt5.QtCore import pyqtProperty, QObject, pyqtSignal
|
from PyQt5.QtCore import pyqtProperty, QObject, pyqtSignal
|
||||||
|
|
||||||
|
from cura.CuraApplication import CuraApplication
|
||||||
from cura.Settings.CuraContainerRegistry import CuraContainerRegistry # To get names of materials we're compatible with.
|
from cura.Settings.CuraContainerRegistry import CuraContainerRegistry # To get names of materials we're compatible with.
|
||||||
from UM.i18n import i18nCatalog # To translate placeholder names if data is not present.
|
from UM.i18n import i18nCatalog # To translate placeholder names if data is not present.
|
||||||
|
|
||||||
@ -371,8 +372,8 @@ class PackageModel(QObject):
|
|||||||
self.stateManageButtonChanged.emit()
|
self.stateManageButtonChanged.emit()
|
||||||
|
|
||||||
@pyqtProperty(bool, notify = stateManageButtonChanged)
|
@pyqtProperty(bool, notify = stateManageButtonChanged)
|
||||||
def isRecentlyInstalled(self):
|
def installationStatus(self):
|
||||||
return self._is_recently_installed
|
return self._package_id in CuraApplication.getInstance().getPackageManager().getPackagesToInstall()
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def can_downgrade(self) -> bool:
|
def can_downgrade(self) -> bool:
|
||||||
|
@ -361,7 +361,7 @@ Rectangle
|
|||||||
secondaryText: catalog.i18nc("@button", "Uninstall")
|
secondaryText: catalog.i18nc("@button", "Uninstall")
|
||||||
busySecondaryText: catalog.i18nc("@button", "Uninstalling...")
|
busySecondaryText: catalog.i18nc("@button", "Uninstalling...")
|
||||||
confirmedSecondaryText: catalog.i18nc("@button", "Uninstalled")
|
confirmedSecondaryText: catalog.i18nc("@button", "Uninstalled")
|
||||||
confirmedTextChoice: packageData.isRecentlyInstalled
|
confirmedTextChoice: packageData.installationStatus
|
||||||
enabled: !(enableManageButton.busy || updateManageButton.busy)
|
enabled: !(enableManageButton.busy || updateManageButton.busy)
|
||||||
|
|
||||||
onClicked:
|
onClicked:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user