mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-08 07:27:29 -06:00
Peristance of 'Installed' text.
part of CURA-8587
This commit is contained in:
parent
3be6747e5d
commit
a61c3e9eff
3 changed files with 9 additions and 2 deletions
|
@ -291,6 +291,8 @@ class PackageModel(QObject):
|
||||||
|
|
||||||
disablePackageTriggered = pyqtSignal(str)
|
disablePackageTriggered = pyqtSignal(str)
|
||||||
|
|
||||||
|
recentlyInstalledChanged = pyqtSignal(bool)
|
||||||
|
|
||||||
# --- enabling ---
|
# --- enabling ---
|
||||||
|
|
||||||
@pyqtProperty(str, notify = stateManageButtonChanged)
|
@pyqtProperty(str, notify = stateManageButtonChanged)
|
||||||
|
@ -370,6 +372,10 @@ class PackageModel(QObject):
|
||||||
self._is_recently_installed = value
|
self._is_recently_installed = value
|
||||||
self.stateManageButtonChanged.emit()
|
self.stateManageButtonChanged.emit()
|
||||||
|
|
||||||
|
@pyqtProperty(bool, notify = stateManageButtonChanged)
|
||||||
|
def isRecentlyInstalled(self):
|
||||||
|
return self._is_recently_installed
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def can_downgrade(self) -> bool:
|
def can_downgrade(self) -> bool:
|
||||||
"""Flag if the installed package can be downgraded to a bundled version"""
|
"""Flag if the installed package can be downgraded to a bundled version"""
|
||||||
|
|
|
@ -19,6 +19,7 @@ RowLayout
|
||||||
property string confirmedSecondaryText: confirmedMessageText.text
|
property string confirmedSecondaryText: confirmedMessageText.text
|
||||||
property bool busy
|
property bool busy
|
||||||
property bool confirmed
|
property bool confirmed
|
||||||
|
property bool confirmedTextChoice: true
|
||||||
|
|
||||||
signal clicked(bool primary_action)
|
signal clicked(bool primary_action)
|
||||||
|
|
||||||
|
@ -228,6 +229,7 @@ RowLayout
|
||||||
{
|
{
|
||||||
target: confirmedMessage
|
target: confirmedMessage
|
||||||
visible: true
|
visible: true
|
||||||
|
text: manageButton.confirmedTextChoice ? manageButton.confirmedPrimaryText : manageButton.confirmedSecondaryText
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
|
@ -361,10 +361,9 @@ 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
|
||||||
enabled: !(enableManageButton.busy || updateManageButton.busy)
|
enabled: !(enableManageButton.busy || updateManageButton.busy)
|
||||||
|
|
||||||
onStateChanged: print(packageData.displayName + " " + state) // TODO: Cleanup once you find out why this happens
|
|
||||||
|
|
||||||
onClicked:
|
onClicked:
|
||||||
{
|
{
|
||||||
if (primary_action)
|
if (primary_action)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue