cleanup: Replace non-standard ByteArray module
gjs landed support for TextDecoder/TextEncoder. Use those instead of gjs' own ByteArray module. Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1946>
This commit is contained in:

committed by
Marge Bot

parent
b21b43e318
commit
ef70364e81
@ -2,7 +2,6 @@
|
||||
/* exported Component */
|
||||
|
||||
const { Clutter, Gio, GLib, GObject, NM, Pango, Shell, St } = imports.gi;
|
||||
const ByteArray = imports.byteArray;
|
||||
const Signals = imports.signals;
|
||||
|
||||
const Dialog = imports.ui.dialog;
|
||||
@ -498,7 +497,8 @@ var VPNRequestHandler = class {
|
||||
return;
|
||||
}
|
||||
|
||||
this._vpnChildProcessLineOldStyle(ByteArray.toString(line));
|
||||
const decoder = new TextDecoder();
|
||||
this._vpnChildProcessLineOldStyle(decoder.decode(line));
|
||||
|
||||
// try to read more!
|
||||
this._readStdoutOldStyle();
|
||||
@ -527,7 +527,7 @@ var VPNRequestHandler = class {
|
||||
let contentOverride;
|
||||
|
||||
try {
|
||||
data = ByteArray.toGBytes(this._dataStdout.peek_buffer());
|
||||
data = new GLib.Bytes(this._dataStdout.peek_buffer());
|
||||
keyfile.load_from_bytes(data, GLib.KeyFileFlags.NONE);
|
||||
|
||||
if (keyfile.get_integer(VPN_UI_GROUP, 'Version') != 2)
|
||||
|
Reference in New Issue
Block a user