js: Update for Gio/GioUnix split

GLib 2.79.2 split out the platform specific Gio APIs into a separate
GIRs, while still keeping a copy in the Gio GIR. gjs then added warnings
about the APIs being moved.

This bumps the Gio(Unix) version requirement to 2.79.2 and switches to
using the new GioUnix GIR.

See: https://gitlab.gnome.org/GNOME/glib/-/merge_requests/3892
See: https://gitlab.gnome.org/GNOME/gjs/-/merge_requests/918
Closes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/7539
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3288>
This commit is contained in:
Sebastian Keller
2024-04-27 15:14:16 +02:00
committed by Florian Müllner
parent 72208da0c2
commit 80a37bcf53
5 changed files with 8 additions and 5 deletions

View File

@ -2,6 +2,7 @@
import Clutter from 'gi://Clutter';
import Gio from 'gi://Gio';
import GioUnix from 'gi://GioUnix';
import GLib from 'gi://GLib';
import GObject from 'gi://GObject';
import NM from 'gi://NM';
@ -469,8 +470,8 @@ class VPNRequestHandler extends Signals.EventEmitter {
});
this._childPid = pid;
this._stdin = new Gio.UnixOutputStream({fd: stdin, close_fd: true});
this._stdout = new Gio.UnixInputStream({fd: stdout, close_fd: true});
this._stdin = new GioUnix.OutputStream({fd: stdin, close_fd: true});
this._stdout = new GioUnix.InputStream({fd: stdout, close_fd: true});
GLib.close(stderr);
this._dataStdout = new Gio.DataInputStream({base_stream: this._stdout});