Skip to content

Commit

Permalink
Merge pull request #250 from rbellamy/master
Browse files Browse the repository at this point in the history
Add another hwmon index and less chatty logs
  • Loading branch information
darkxst committed Oct 3, 2014
2 parents 1b632f9 + 15f0c32 commit d363594
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
4 changes: 2 additions & 2 deletions system-monitor@paradoxxx.zero.gmail.com/extension.js
Expand Up @@ -867,7 +867,7 @@ const Battery = new Lang.Class({
let seconds = this._proxy.TimeToEmpty;
this.update_battery_value(seconds, percentage, icon);
} else {
log("SM: No battery found");
//log("SM: No battery found");
this.actor.hide();

this.menu_item.actor.hide();
Expand Down Expand Up @@ -899,7 +899,7 @@ const Battery = new Lang.Class({
}

if (!battery_found) {
log("SM: No battery found")
//log("SM: No battery found")
this.actor.hide();

this.menu_item.actor.hide();
Expand Down
20 changes: 10 additions & 10 deletions system-monitor@paradoxxx.zero.gmail.com/prefs.js
Expand Up @@ -37,26 +37,26 @@ function check_sensors(sensor_type){
let sensor_list = [];
let string_list = [];
let test;
for (let j=0; j <5; j++){
for (let k=0; k < inputs.length; k++){
test = sensor_path + 'hwmon' + j + '/' + inputs[k];
for (let j=0; j < 6; j++){
for (let k=0; k < inputs.length; k++){
test = sensor_path + 'hwmon' + j + '/' + inputs[k];
if(!GLib.file_test(test,1<<4)){
test = sensor_path + 'hwmon' + j + '/device/' + inputs[k];
if(!GLib.file_test(test,1<<4)){
test = sensor_path + 'hwmon' + j + '/device/' + inputs[k];
if(!GLib.file_test(test,1<<4)){
continue;
continue;
}
}
let sensor = test.substr(0, test.lastIndexOf('/'));
let result = GLib.file_get_contents(sensor + '/name');
let label;
if (result[0]){
if (result[0]){
label = N_('' + result[1]).split('\n')[0];
}
string_list.push(label.capitalize() + ' - ' + inputs[k].split('_')[0].capitalize());
sensor_list.push(test);
}
sensor_list.push(test);
}
}
return [sensor_list, string_list];
return [sensor_list, string_list];
};


Expand Down

0 comments on commit d363594

Please sign in to comment.