mirror of
https://github.com/morgan9e/gnome-shell-extension-freon
synced 2026-04-15 00:44:22 +09:00
fix for not exitst sensors, resolve #3
This commit is contained in:
@@ -431,7 +431,20 @@ const FreonMenuButton = new Lang.Class({
|
||||
this._createHotItem(self.label, showIcon, self.gicon);
|
||||
self.main = true;
|
||||
}
|
||||
|
||||
|
||||
for(let i = hotSensors.length -1; i >= 0 ; i--){
|
||||
let k = hotSensors[i];
|
||||
if(!this._sensorMenuItems[k]){
|
||||
hotSensors.splice(i, 1);
|
||||
this._hotLabels[k].destroy();
|
||||
delete this._hotLabels[k];
|
||||
if(this._hotIcons[k]){
|
||||
this._hotIcons[k].destroy();
|
||||
delete this._hotIcons[k];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
this._settings.set_strv('hot-sensors', hotSensors.filter(
|
||||
function(item, pos) {
|
||||
return hotSensors.indexOf(item) == pos;
|
||||
|
||||
Reference in New Issue
Block a user