Skip to content

Commit

Permalink
Fix byteArray warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
shemgp committed Mar 18, 2019
1 parent dcad49f commit 5705831
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions system-monitor@paradoxxx.zero.gmail.com/extension.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ var Power = imports.ui.status.power;
// const System = imports.system;
var ModalDialog = imports.ui.modalDialog;

var ByteArray = imports.byteArray;

var ExtensionSystem = imports.ui.extensionSystem;
var ExtensionUtils = imports.misc.extensionUtils;

Expand Down Expand Up @@ -1964,7 +1966,7 @@ const Thermal = class SystemMonitor_Thermal extends ElementBase {
let file = Gio.file_new_for_path(sfile);
file.load_contents_async(null, (source, result) => {
let as_r = source.load_contents_finish(result)
this.temperature = Math.round(parseInt(as_r[1]) / 1000);
this.temperature = Math.round(parseInt(ByteArray.toString(as_r[1])) / 1000);
if (this.fahrenheit_unit) {
this.temperature = Math.round(this.temperature * 1.8 + 32);
}
Expand Down Expand Up @@ -2035,7 +2037,7 @@ const Fan = class SystemMonitor_Fan extends ElementBase {
let file = Gio.file_new_for_path(sfile);
file.load_contents_async(null, (source, result) => {
let as_r = source.load_contents_finish(result)
this.rpm = parseInt(as_r[1]);
this.rpm = parseInt(ByteArray.toString(as_r[1]));
});
} else if (this.display_error) {
global.logError('error reading: ' + sfile);
Expand Down

0 comments on commit 5705831

Please sign in to comment.