refactor(modules): use ALabel dedup tooltip helper in simpleclock, systemd-failed-units, upower

simpleclock: migrate to updateLabelAndTooltip (label + tooltip share the
localtime arg; default tooltip falls back to the label format).
systemd-failed-units: use setLabelMarkup/setTooltipMarkup dedup setters;
label/tooltip formats are selected by different conditions so the combined
helper does not apply.
upower: use setLabelMarkup for the label; tooltip stays a custom GTK widget.
mpd already uses the dedup setters (label/tooltip use different truncated
args), so no change.
This commit is contained in:
Alex
2026-07-04 00:00:17 +02:00
parent a91dcbe595
commit 836449d253
3 changed files with 5 additions and 16 deletions
+1 -1
View File
@@ -223,7 +223,7 @@ auto UPower::update() -> void {
return;
}
label_.set_markup(getText(upDevice_, format_));
setLabelMarkup(getText(upDevice_, format_));
// Set icon
if (upDevice_.icon_name == NULL || !gtkTheme_->has_icon(upDevice_.icon_name))
upDevice_.icon_name = (char*)NO_BATTERY.c_str();