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:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user