Skip to content

Commit ab9adeb

Browse files
committed
js: Use GioUnix instead of Gio.Unix in a few places.
Gio.Unix* is deprecated introspection. ref: #13091
1 parent b34c4d1 commit ab9adeb

2 files changed

Lines changed: 5 additions & 3 deletions

File tree

js/misc/loginManager.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*-
22

33
const Gio = imports.gi.Gio;
4+
const GioUnix = imports.gi.GioUnix;
45
const GLib = imports.gi.GLib;
56
const Signals = imports.signals;
67

@@ -205,7 +206,7 @@ var LoginManagerSystemd = class {
205206
let [outVariant_, fdList] = proxy.call_with_unix_fd_list_finish(result);
206207
let fd = fdList.steal_fds()[0];
207208
_log(`LoginManager: Sleep inhibitor acquired (fd=${fd})`);
208-
callback(new Gio.UnixInputStream({ fd }));
209+
callback(new GioUnix.InputStream({ fd }));
209210
} catch (e) {
210211
global.logError('LoginManager: Error getting inhibitor: ' + e.message);
211212
callback(null);

js/ui/networkAgent.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
const Clutter = imports.gi.Clutter;
44
const Gio = imports.gi.Gio;
5+
const GioUnix = imports.gi.GioUnix;
56
const GLib = imports.gi.GLib;
67
const GObject = imports.gi.GObject;
78
const NM = imports.gi.NM;
@@ -392,8 +393,8 @@ var VPNRequestHandler = class {
392393
null /* child_setup */);
393394

394395
this._childPid = pid;
395-
this._stdin = new Gio.UnixOutputStream({ fd: stdin, close_fd: true });
396-
this._stdout = new Gio.UnixInputStream({ fd: stdout, close_fd: true });
396+
this._stdin = new GioUnix.OutputStream({ fd: stdin, close_fd: true });
397+
this._stdout = new GioUnix.InputStream({ fd: stdout, close_fd: true });
397398
GLib.close(stderr);
398399
this._dataStdout = new Gio.DataInputStream({ base_stream: this._stdout });
399400

0 commit comments

Comments
 (0)