diff --git a/js/misc/config.js.in b/js/misc/config.js.in index 8ef427037..5684ef69c 100644 --- a/js/misc/config.js.in +++ b/js/misc/config.js.in @@ -7,8 +7,6 @@ var PACKAGE_NAME = '@PACKAGE_NAME@'; var PACKAGE_VERSION = '@PACKAGE_VERSION@'; /* 1 if networkmanager is available, 0 otherwise */ var HAVE_NETWORKMANAGER = @HAVE_NETWORKMANAGER@; -/* 1 if soup2 should be used instead of soup3, 0 otherwise */ -var HAVE_SOUP2 = @HAVE_SOUP2@; /* gettext package */ var GETTEXT_PACKAGE = '@GETTEXT_PACKAGE@'; /* locale dir */ diff --git a/js/misc/meson.build b/js/misc/meson.build index 2dff20dec..5aceefac4 100644 --- a/js/misc/meson.build +++ b/js/misc/meson.build @@ -4,7 +4,6 @@ jsconf.set('PACKAGE_VERSION', meson.project_version()) jsconf.set('GETTEXT_PACKAGE', meson.project_name()) jsconf.set('LIBMUTTER_API_VERSION', mutter_api_version) jsconf.set10('HAVE_NETWORKMANAGER', have_networkmanager) -jsconf.set10('HAVE_SOUP2', have_soup2) jsconf.set('datadir', datadir) jsconf.set('libexecdir', libexecdir) diff --git a/js/ui/environment.js b/js/ui/environment.js index 353cd35f6..09c9f031d 100644 --- a/js/ui/environment.js +++ b/js/ui/environment.js @@ -33,16 +33,6 @@ imports.gi.versions.TelepathyGLib = '0.12'; imports.gi.versions.TelepathyLogger = '0.2'; imports.gi.versions.UPowerGlib = '1.0'; -try { - if (Config.HAVE_SOUP2) - throw new Error('Soup3 support not enabled'); - const Soup_ = imports.gi.Soup; -} catch (e) { - imports.gi.versions.Soup = '2.4'; - const { Soup } = imports.gi; - _injectSoup3Compat(Soup); -} - const {Clutter, Gdk, Gio, GLib, GObject, Meta, Polkit, Shell, St} = imports.gi; const Gettext = imports.gettext; const System = imports.system; @@ -101,42 +91,6 @@ function _patchLayoutClass(layoutClass, styleProps) { } } -/** - * Mimick the Soup 3 APIs we use when falling back to Soup 2.4 - * - * @param {object} Soup 2.4 namespace - * @returns {void} - */ -function _injectSoup3Compat(Soup) { - Soup.StatusCode = Soup.KnownStatusCode; - - Soup.Message.new_from_encoded_form = - function (method, uri, form) { - const soupUri = new Soup.URI(uri); - soupUri.set_query(form); - return Soup.Message.new_from_uri(method, soupUri); - }; - Soup.Message.prototype.set_request_body_from_bytes = - function (contentType, bytes) { - this.set_request( - contentType, - Soup.MemoryUse.COPY, - new TextDecoder().decode(bytes.get_data())); - }; - - Soup.Session.prototype.send_and_read_async = - function (message, prio, cancellable, callback) { - this.queue_message(message, () => callback(this, message)); - }; - Soup.Session.prototype.send_and_read_finish = - function (message) { - if (message.status_code !== Soup.KnownStatusCode.OK) - return null; - - return message.response_body.flatten().get_as_bytes(); - }; -} - function _makeEaseCallback(params, cleanup) { let onComplete = params.onComplete; delete params.onComplete; diff --git a/meson.build b/meson.build index 7b08fe52d..dd0337486 100644 --- a/meson.build +++ b/meson.build @@ -112,8 +112,6 @@ else have_systemd = false endif -have_soup2 = get_option('soup2') - if get_option('man') if fs.exists('man/gnome-shell.1') install_man('man/gnome-shell.1') diff --git a/meson_options.txt b/meson_options.txt index 46ca8e785..2d317e602 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -39,9 +39,3 @@ option('systemd', value: true, description: 'Enable systemd integration' ) - -option('soup2', - type: 'boolean', - value: false, - description: 'Use Soup 2.4 instead of Soup 3. Must be in sync with libgweather' -)