settings: don't render a missing ack budget as "waits 0s"
An older sessiond has no lock_ack_budget_secs. Show the upgrade note instead of inventing a number.
This commit is contained in:
parent
24ce6d382b
commit
9ab1cfbccc
1 changed files with 14 additions and 0 deletions
|
|
@ -236,13 +236,27 @@ ContentPage {
|
|||
}
|
||||
}
|
||||
|
||||
// Only claim the ordering guarantee when the daemon actually reports
|
||||
// the field. An older sessiond has no lock_ack_budget_secs, and
|
||||
// rendering that absence as "waits 0s" would be the page inventing a
|
||||
// number — the same class of lie as the timers this section replaced.
|
||||
StyledText {
|
||||
Layout.fillWidth: true
|
||||
visible: SessiondPolicy.available && SessiondPolicy.lockAckBudgetSecs > 0
|
||||
wrapMode: Text.WordWrap
|
||||
color: Appearance.colors.colSubtext
|
||||
font.pixelSize: Appearance.font.pixelSize.smaller
|
||||
text: Translation.tr("The screen never goes dark on an unlocked session. sessiond locks first and waits %1s for the compositor to acknowledge; if it cannot, it blanks anyway and records a security error rather than pretending the session locked.")
|
||||
.arg(SessiondPolicy.lockAckBudgetSecs)
|
||||
}
|
||||
|
||||
StyledText {
|
||||
Layout.fillWidth: true
|
||||
visible: SessiondPolicy.available && SessiondPolicy.lockAckBudgetSecs === 0
|
||||
wrapMode: Text.WordWrap
|
||||
color: Appearance.colors.colSubtext
|
||||
font.pixelSize: Appearance.font.pixelSize.smaller
|
||||
text: Translation.tr("This sessiond predates the lock-before-blank ordering. Update the souveraine package to get it.")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue