Skip to content

Commit

Permalink
Use GioUnix for GNOME 46
Browse files Browse the repository at this point in the history
  • Loading branch information
ferdnyc committed Apr 4, 2024
1 parent 9d27463 commit 3d21680
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 4 deletions.
1 change: 1 addition & 0 deletions src/gsconnect-preferences
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
imports.gi.versions.Gdk = '3.0';
imports.gi.versions.GdkPixbuf = '2.0';
imports.gi.versions.Gio = '2.0';
imports.gi.versions.GioUnix = '2.0';
imports.gi.versions.GLib = '2.0';
imports.gi.versions.GObject = '2.0';
imports.gi.versions.Gtk = '3.0';
Expand Down
5 changes: 3 additions & 2 deletions src/service/backends/lan.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
'use strict';

const Gio = imports.gi.Gio;
const GioUnix = imports.GioUnix;
const GLib = imports.gi.GLib;
const GObject = imports.gi.GObject;

Expand Down Expand Up @@ -264,7 +265,7 @@ var ChannelService = GObject.registerClass({

// Input stream
this._udp6_stream = new Gio.DataInputStream({
base_stream: new Gio.UnixInputStream({
base_stream: new GioUnix.InputStream({
fd: this._udp6.fd,
close_fd: false,
}),
Expand Down Expand Up @@ -296,7 +297,7 @@ var ChannelService = GObject.registerClass({

// Input stream
this._udp4_stream = new Gio.DataInputStream({
base_stream: new Gio.UnixInputStream({
base_stream: new GioUnix.InputStream({
fd: this._udp4.fd,
close_fd: false,
}),
Expand Down
1 change: 1 addition & 0 deletions src/service/daemon.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
imports.gi.versions.Gdk = '3.0';
imports.gi.versions.GdkPixbuf = '2.0';
imports.gi.versions.Gio = '2.0';
imports.gi.versions.GioUnix = '2.0';
imports.gi.versions.GIRepository = '2.0';
imports.gi.versions.GLib = '2.0';
imports.gi.versions.GObject = '2.0';
Expand Down
6 changes: 4 additions & 2 deletions src/service/nativeMessagingHost.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,12 @@
'use strict';

imports.gi.versions.Gio = '2.0';
imports.gi.versions.GioUnix = '2.0';
imports.gi.versions.GLib = '2.0';
imports.gi.versions.GObject = '2.0';

const Gio = imports.gi.Gio;
const GioUnix = imports.gi.GioUnix;
const GLib = imports.gi.GLib;
const GObject = imports.gi.GObject;
const System = imports.system;
Expand Down Expand Up @@ -44,12 +46,12 @@ const NativeMessagingHost = GObject.registerClass({

// IO Channels
this._stdin = new Gio.DataInputStream({
base_stream: new Gio.UnixInputStream({fd: 0}),
base_stream: new GioUnix.InputStream({fd: 0}),
byte_order: Gio.DataStreamByteOrder.HOST_ENDIAN,
});

this._stdout = new Gio.DataOutputStream({
base_stream: new Gio.UnixOutputStream({fd: 1}),
base_stream: new GioUnix.OutputStream({fd: 1}),
byte_order: Gio.DataStreamByteOrder.HOST_ENDIAN,
});

Expand Down

0 comments on commit 3d21680

Please sign in to comment.