diff --git a/freon@UshakovVasilii_Github.yahoo.com/aticonfigUtil.js b/freon@UshakovVasilii_Github.yahoo.com/aticonfigUtil.js index c85ab5f..cd0ecda 100644 --- a/freon@UshakovVasilii_Github.yahoo.com/aticonfigUtil.js +++ b/freon@UshakovVasilii_Github.yahoo.com/aticonfigUtil.js @@ -4,7 +4,7 @@ const GLib = imports.gi.GLib; const Me = imports.misc.extensionUtils.getCurrentExtension(); const CommandLineUtil = Me.imports.commandLineUtil; -const AticonfigUtil = new Lang.Class({ +var AticonfigUtil = new Lang.Class({ Name: 'AticonfigUtil', Extends: CommandLineUtil.CommandLineUtil, @@ -23,7 +23,7 @@ const AticonfigUtil = new Lang.Class({ return []; let label = null; let temp = null; - for each(let line in this._output) { + for (let line of this._output) { if(!line) continue; let r; diff --git a/freon@UshakovVasilii_Github.yahoo.com/bumblebeeNvidiaUtil.js b/freon@UshakovVasilii_Github.yahoo.com/bumblebeeNvidiaUtil.js index c97ae20..8d14418 100644 --- a/freon@UshakovVasilii_Github.yahoo.com/bumblebeeNvidiaUtil.js +++ b/freon@UshakovVasilii_Github.yahoo.com/bumblebeeNvidiaUtil.js @@ -5,7 +5,7 @@ const Gio = imports.gi.Gio; const Me = imports.misc.extensionUtils.getCurrentExtension(); const CommandLineUtil = Me.imports.commandLineUtil; -const BumblebeeNvidiaUtil = new Lang.Class({ +var BumblebeeNvidiaUtil = new Lang.Class({ Name: 'BumblebeeNvidiaUtil', Extends: CommandLineUtil.CommandLineUtil, @@ -49,7 +49,7 @@ const BumblebeeNvidiaUtil = new Lang.Class({ _detectLabel: function() { // optirun nvidia-smi -L // GPU 0: GeForce GT 525M (UUID: GPU-...) - for each(let line in GLib.spawn_command_line_sync(this._path + " nvidia-smi -L")){ + for (let line of GLib.spawn_command_line_sync(this._path + " nvidia-smi -L")){ let match = /.*GPU [\d]:([\w\d\ ]+).*/.exec(line); if(match){ this._label = match[1]; @@ -82,7 +82,7 @@ const BumblebeeNvidiaUtil = new Lang.Class({ let label = this._label ? this._label : _('Bumblebee + NVIDIA'); if(this._active && this._output){ // GPU Current Temp : 37 C - for each(let line in this._output) { + for (let line of this._output) { if(!line) continue; let r; diff --git a/freon@UshakovVasilii_Github.yahoo.com/commandLineUtil.js b/freon@UshakovVasilii_Github.yahoo.com/commandLineUtil.js index 10b9e73..8635de0 100644 --- a/freon@UshakovVasilii_Github.yahoo.com/commandLineUtil.js +++ b/freon@UshakovVasilii_Github.yahoo.com/commandLineUtil.js @@ -2,7 +2,7 @@ const Lang = imports.lang; const GLib = imports.gi.GLib; const Gio = imports.gi.Gio; -const CommandLineUtil = new Lang.Class({ +var CommandLineUtil = new Lang.Class({ Name: 'CommandLineUtil', _init: function(){ diff --git a/freon@UshakovVasilii_Github.yahoo.com/extension.js b/freon@UshakovVasilii_Github.yahoo.com/extension.js index f05abd8..e9ae25f 100644 --- a/freon@UshakovVasilii_Github.yahoo.com/extension.js +++ b/freon@UshakovVasilii_Github.yahoo.com/extension.js @@ -21,7 +21,7 @@ const FreonItem = Me.imports.freonItem; const Gettext = imports.gettext.domain(Me.metadata['gettext-domain']); const _ = Gettext.gettext; -const FreonMenuButton = new Lang.Class({ +var FreonMenuButton = new Lang.Class({ Name: 'FreonMenuButton', Extends: PanelMenu.Button, @@ -54,7 +54,7 @@ const FreonMenuButton = new Lang.Class({ this._hotIcons = {}; let hotSensors = this._settings.get_strv('hot-sensors'); let showIcon = this._settings.get_boolean('show-icon-on-panel'); - for each (let s in hotSensors){ + for (let s of hotSensors){ this._createHotItem(s, showIcon); } @@ -225,13 +225,13 @@ const FreonMenuButton = new Lang.Class({ Mainloop.source_remove(this._timeoutId); Mainloop.source_remove(this._updateUITimeoutId); - for each (let signal in this._settingChangedSignals){ + for (let signal of this._settingChangedSignals){ this._settings.disconnect(signal); }; }, _querySensors: function(){ - for each (let sensor in this._utils) { + for (let sensor of Object.values(this._utils)) { if (sensor.available) { sensor.execute(Lang.bind(this,function(){ // we cannot change actor in background thread #74 @@ -242,7 +242,7 @@ const FreonMenuButton = new Lang.Class({ _updateUI: function(){ let needUpdate = false; - for each (let sensor in this._utils) { + for (let sensor of Object.values(this._utils)) { if (sensor.available && sensor.updated) { // global.log(sensor + ' updated'); sensor.updated = false; @@ -257,7 +257,7 @@ const FreonMenuButton = new Lang.Class({ _fixNames: function(sensors){ let names = []; - for each (let s in sensors){ + for (let s of sensors){ if(s.type == 'separator' || s.type == 'temperature-group' || s.type == 'temperature-average' || @@ -308,7 +308,7 @@ const FreonMenuButton = new Lang.Class({ let total = 0; let sum = 0; let max = 0; - for each (let i in tempInfo){ + for (let i of tempInfo){ if(i.temp !== null){ total++; sum += i.temp; @@ -319,17 +319,17 @@ const FreonMenuButton = new Lang.Class({ let sensors = []; - for each (let i in gpuTempInfo){ + for (let i of gpuTempInfo){ sensors.push({ type: 'gpu-temperature', label: i.label, value: this._formatTemp(i.temp), displayName: i.displayName}); } - for each (let i in sensorsTempInfo){ + for (let i of sensorsTempInfo){ sensors.push({type:'temperature', label: i.label, value:this._formatTemp(i.temp)}); } - for each (let i in driveTempInfo){ + for (let i of driveTempInfo){ sensors.push({type:'drive-temperature', label: i.label, value:this._formatTemp(i.temp)}); } @@ -352,7 +352,7 @@ const FreonMenuButton = new Lang.Class({ if(sensorsTempInfo.length > 0 && this._settings.get_boolean('group-temperature')){ sum = 0; - for each (let i in sensorsTempInfo){ + for (let i of sensorsTempInfo){ sum += i.temp; } sensors.push({ @@ -361,7 +361,7 @@ const FreonMenuButton = new Lang.Class({ value: this._formatTemp(sum / sensorsTempInfo.length)}); } - for each (let fan in fanInfo){ + for (let fan of fanInfo){ sensors.push({ type:'fan', label:fan.label, @@ -370,7 +370,7 @@ const FreonMenuButton = new Lang.Class({ if (fanInfo.length > 0 && voltageInfo.length > 0){ sensors.push({type : 'separator'}); } - for each (let voltage in voltageInfo){ + for (let voltage of voltageInfo){ sensors.push({ type : 'voltage', label:voltage.label, @@ -380,7 +380,7 @@ const FreonMenuButton = new Lang.Class({ this._fixNames(sensors); - for each (let s in sensors) + for (let s of sensors) if(s.type != 'separator') { let l = this._hotLabels[s.key || s.label]; if(l) @@ -388,7 +388,7 @@ const FreonMenuButton = new Lang.Class({ } if(this._lastSensorsCount && this._lastSensorsCount==sensors.length){ - for each (let s in sensors) { + for (let s of sensors) { if(s.type != 'separator') { let item = this._sensorMenuItems[s.key || s.label]; if(item) { @@ -453,7 +453,7 @@ const FreonMenuButton = new Lang.Class({ if(needGroupVoltage){ let i = 0; - for each (let s in sensors) + for (let s of sensors) if(s.type == 'voltage') i++; if(i < 2) @@ -463,7 +463,7 @@ const FreonMenuButton = new Lang.Class({ let temperatureGroup = null; let voltageGroup = null; - for each (let s in sensors){ + for (let s of sensors){ if(s.type == 'separator'){ this.menu.addMenuItem(new PopupMenu.PopupSeparatorMenuItem()); } else if (s.type == 'temperature-group') { diff --git a/freon@UshakovVasilii_Github.yahoo.com/freonItem.js b/freon@UshakovVasilii_Github.yahoo.com/freonItem.js index 5dc520d..3c6aac5 100644 --- a/freon@UshakovVasilii_Github.yahoo.com/freonItem.js +++ b/freon@UshakovVasilii_Github.yahoo.com/freonItem.js @@ -2,7 +2,7 @@ const Lang = imports.lang; const St = imports.gi.St; const PopupMenu = imports.ui.popupMenu; -const FreonItem = new Lang.Class({ +var FreonItem = new Lang.Class({ Name: 'FreonItem', Extends: PopupMenu.PopupBaseMenuItem, diff --git a/freon@UshakovVasilii_Github.yahoo.com/hddtempUtil.js b/freon@UshakovVasilii_Github.yahoo.com/hddtempUtil.js index ef320aa..d19ed99 100644 --- a/freon@UshakovVasilii_Github.yahoo.com/hddtempUtil.js +++ b/freon@UshakovVasilii_Github.yahoo.com/hddtempUtil.js @@ -4,7 +4,7 @@ const GLib = imports.gi.GLib; const Me = imports.misc.extensionUtils.getCurrentExtension(); const CommandLineUtil = Me.imports.commandLineUtil; -const HddtempUtil = new Lang.Class({ +var HddtempUtil = new Lang.Class({ Name: 'HddtempUtil', Extends: CommandLineUtil.CommandLineUtil, @@ -67,7 +67,7 @@ const HddtempUtil = new Lang.Class({ } let sensors = []; - for each(let line in hddtempOutput) { + for (let line of hddtempOutput) { let fields = line.split(sep).filter(function(e){ return e; }); let sensor = { label: fields[1], temp: parseFloat(fields[2])}; //push only if the temp is a Number diff --git a/freon@UshakovVasilii_Github.yahoo.com/metadata.json b/freon@UshakovVasilii_Github.yahoo.com/metadata.json index 762dbd2..5608649 100644 --- a/freon@UshakovVasilii_Github.yahoo.com/metadata.json +++ b/freon@UshakovVasilii_Github.yahoo.com/metadata.json @@ -1,5 +1,5 @@ { - "shell-version": ["3.12", "3.14", "3.16", "3.18", "3.20", "3.22", "3.24", "3.26", "3.28"], + "shell-version": ["3.30"], "uuid": "freon@UshakovVasilii_Github.yahoo.com", "name": "Freon", "description": "Shows CPU temperature, disk temperature, video card temperature (NVIDIA/Catalyst/Bumblebee&NVIDIA), voltage and fan RPM (forked from xtranophilist/gnome-shell-extension-sensors)", diff --git a/freon@UshakovVasilii_Github.yahoo.com/nvidiaUtil.js b/freon@UshakovVasilii_Github.yahoo.com/nvidiaUtil.js index d1227a2..985d1ee 100644 --- a/freon@UshakovVasilii_Github.yahoo.com/nvidiaUtil.js +++ b/freon@UshakovVasilii_Github.yahoo.com/nvidiaUtil.js @@ -5,7 +5,7 @@ const Gio = imports.gi.Gio; const Me = imports.misc.extensionUtils.getCurrentExtension(); const CommandLineUtil = Me.imports.commandLineUtil; -const NvidiaUtil = new Lang.Class({ +var NvidiaUtil = new Lang.Class({ Name: 'NvidiaUtil', Extends: CommandLineUtil.CommandLineUtil, @@ -49,7 +49,7 @@ const NvidiaUtil = new Lang.Class({ if(!this._output) return []; let temps = []; - for each(let line in this._output) { + for (let line of this._output) { if(!line) continue; temps.push(parseFloat(line)); diff --git a/freon@UshakovVasilii_Github.yahoo.com/prefs.js b/freon@UshakovVasilii_Github.yahoo.com/prefs.js index f2df8fb..b11f817 100644 --- a/freon@UshakovVasilii_Github.yahoo.com/prefs.js +++ b/freon@UshakovVasilii_Github.yahoo.com/prefs.js @@ -17,7 +17,7 @@ function init() { Convenience.initTranslations(); } -const FreonPrefsWidget = new GObject.Class({ +var FreonPrefsWidget = new GObject.Class({ Name: 'Freon.Prefs.Widget', GTypeName: 'FreonPrefsWidget', Extends: Gtk.Grid, diff --git a/freon@UshakovVasilii_Github.yahoo.com/sensorsUtil.js b/freon@UshakovVasilii_Github.yahoo.com/sensorsUtil.js index c5382ff..58bee24 100644 --- a/freon@UshakovVasilii_Github.yahoo.com/sensorsUtil.js +++ b/freon@UshakovVasilii_Github.yahoo.com/sensorsUtil.js @@ -4,7 +4,7 @@ const GLib = imports.gi.GLib; const Me = imports.misc.extensionUtils.getCurrentExtension(); const CommandLineUtil = Me.imports.commandLineUtil; -const SensorsUtil = new Lang.Class({ +var SensorsUtil = new Lang.Class({ Name: 'SensorsUtil', Extends: CommandLineUtil.CommandLineUtil, diff --git a/freon@UshakovVasilii_Github.yahoo.com/udisks2.js b/freon@UshakovVasilii_Github.yahoo.com/udisks2.js index 5a60c1d..1375cae 100644 --- a/freon@UshakovVasilii_Github.yahoo.com/udisks2.js +++ b/freon@UshakovVasilii_Github.yahoo.com/udisks2.js @@ -31,7 +31,7 @@ const Async = { } // routines for handling of udisks2 -const UDisks2 = new Lang.Class({ +var UDisks2 = new Lang.Class({ Name: 'UDisks2', _init: function(callback) { @@ -110,7 +110,7 @@ const UDisks2 = new Lang.Class({ }, destroy: function(callback) { - for each (let proxy in this._udisksProxies){ + for (let proxy of this._udisksProxies){ if(proxy.drive){ proxy.drive.run_dispose(); }