Closed MisterGuinness closed 5 months ago
$ grep -i bytearray extension.js
const ByteArray = imports.byteArray;
Oops, not even used, wonder why.
$ grep -i bytearray prefs.js
const ByteArray = imports.byteArray;
let output = ByteArray.toString(sensors_output);
ByteArray.toString(hddtemp_output),
$ grep -i bytearray utilities.js
const ByteArray = imports.byteArray;
if(result && ByteArray.toString(activeState).trim() == "ActiveState=active") {
output=ByteArray.toString(output).trim();
output=ByteArray.toString(output).trim();
let text = ByteArray.toString(stream.peek_buffer());
this._stdoutString = ByteArray.toString(stream.peek_buffer());
newLocale = ByteArray.toString(contents).substr(0,10);
That last one will be the first one I modify, in the override locale hack.
The inclusion of byteArray in extension.js was done here: 097fc9c7b5339d57b60f368f9995fd029fa39572
Clearly an oversight
I happened to notice in the GJS documentation
https://gjs.guide/guides/gjs/asynchronous-programming.html#event-sources
the following bit of code:
So I looked up ByteArray, which I currently use since Issue #10 :
https://github.com/GNOME/gjs/blob/master/doc/ByteArray.md#bytearraytostringbytearray-encoding
Which is documented here:
https://gjs-docs.gnome.org/gjs/encoding.md#textdecoder-decode
Oh, that was a while ago.