Commit 6ba27a65 authored by Nate Graham's avatar Nate Graham 🔩
Browse files

[applet] Simplify printer list item subtitle

The subtitle currently builds up a complicated string that tells you
thhe number of active and/or inactive jobs. However what you really
care about is the current state: idle or printing, paused, stuck, etc.
I don't think The number of jobs is useful or actionable information.
So let's remove it.

This happens to fix a bug whereby the state is displayed incorrectly.

BUG: 425534
FIXED-IN: 20.12.0
parent f9787b13
......@@ -31,21 +31,7 @@ PlasmaExtras.ExpandableListItem {
icon: model.iconName
iconEmblem: isPaused ? "emblem-pause" : ""
title: model.printerName
subtitle: {
if (printmanager.jobsFilter == PrintManager.JobModel.WhichActive) {
if (jobsFilterModel.count == 0) {
return i18n("%1, no active jobs", model.stateMessage);
} else {
return i18np("%1, %2 active job", "%1, %2 active jobs", model.stateMessage, jobsFilterModel.count);
}
} else {
if (jobsFilterModel.count == 0) {
return i18n("%1, no jobs", model.stateMessage);
} else {
return i18np("%1, %2 job", "%1, %2 jobs", model.stateMessage, jobsFilterModel.count);
}
}
}
subtitle: model.stateMessage
isDefault: model.isDefault
defaultActionButtonAction: Action {
icon.name: isPaused ? "media-playback-start" : "media-playback-pause"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment