mirror of
https://github.com/morgan9e/gnome-shell-extension-freon
synced 2026-04-14 00:14:14 +09:00
improve initial icon showing logic
This commit is contained in:
@@ -173,7 +173,7 @@ const FreonMenuButton = new Lang.Class({
|
||||
_initGpuUtility : function(){
|
||||
switch(this._settings.get_string('gpu-utility')){
|
||||
case 'nvidia-settings':
|
||||
this._utils.gpu = new NvidiaUtil.NvidiaUtil();
|
||||
this._utils.gpu = new NvidiaUtil.NvidiaUtil();
|
||||
break;
|
||||
case 'aticonfig':
|
||||
this._utils.gpu = new AticonfigUtil.AticonfigUtil();
|
||||
@@ -428,8 +428,6 @@ const FreonMenuButton = new Lang.Class({
|
||||
i.destroy();
|
||||
delete this._hotIcons[self.label];
|
||||
}
|
||||
if(Object.keys(this._hotLabels).length == 0)
|
||||
this._createInitialIcon();
|
||||
self.main = false;
|
||||
} else {
|
||||
hotSensors.push(self.label);
|
||||
@@ -455,6 +453,9 @@ const FreonMenuButton = new Lang.Class({
|
||||
}
|
||||
}
|
||||
|
||||
if(Object.keys(this._hotLabels).length == 0)
|
||||
this._createInitialIcon();
|
||||
|
||||
this._settings.set_strv('hot-sensors', hotSensors.filter(
|
||||
function(item, pos) {
|
||||
return hotSensors.indexOf(item) == pos;
|
||||
|
||||
Reference in New Issue
Block a user