mirror of
https://github.com/morgan9e/gnome-shell-extension-freon
synced 2026-04-15 00:44:22 +09:00
Visualize hot (on panel) sensors that became stale
When a hwmon module was unloaded or crashed any sensors it had that were also pinned to the panel (i.e. a 'hot sensor') retained the value they had last, hiding the failure. To fix that, this first clears all hot labels, replacing them with a placeholder, before checking the new sensor data. The placeholder chosen is ⚠ (\u26a0 warning sign), after some experimentation with other alternatives. For consistency, the placeholder used on initialization is also changed.
This commit is contained in:
@@ -133,7 +133,7 @@ var FreonMenuButton = new Lang.Class({
|
||||
this._menuLayout.add(i);
|
||||
}
|
||||
let l = new St.Label({
|
||||
text: '\u2026', /* ... */
|
||||
text: '\u26a0', // ⚠, warning
|
||||
y_expand: true,
|
||||
y_align: Clutter.ActorAlign.CENTER});
|
||||
this._hotLabels[s] = l;
|
||||
@@ -416,6 +416,9 @@ var FreonMenuButton = new Lang.Class({
|
||||
|
||||
this._fixNames(sensors);
|
||||
|
||||
for (let k in this._hotLabels)
|
||||
this._hotLabels[k].set_text('\u26a0'); // ⚠, warning
|
||||
|
||||
for (let s of sensors)
|
||||
if(s.type != 'separator') {
|
||||
let l = this._hotLabels[s.key || s.label];
|
||||
|
||||
Reference in New Issue
Block a user