[gnome-calculator] port to libsoup-3.0



commit 4fff5e1993ba839be81613ebb48571581d70abcd
Author: AppleME <me amesite me>
Date:   Tue Jul 19 10:35:37 2022 +1000

    port to libsoup-3.0

 lib/currency-provider.vala | 4 ++--
 meson.build                | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/lib/currency-provider.vala b/lib/currency-provider.vala
index bcef3630..66ec631a 100644
--- a/lib/currency-provider.vala
+++ b/lib/currency-provider.vala
@@ -123,7 +123,7 @@ public abstract class AbstractCurrencyProvider : Object, CurrencyProvider {
         var message = new Soup.Message ("GET", uri);
         try
         {
-            var bodyinput = session.send (message);
+            var bodyinput = session.send (message, new GLib.Cancellable());
             var output = dest.replace (null, false, FileCreateFlags.REPLACE_DESTINATION);
             output.splice (bodyinput, OutputStreamSpliceFlags.CLOSE_SOURCE | 
OutputStreamSpliceFlags.CLOSE_TARGET);
             loading = false;
@@ -147,7 +147,7 @@ public abstract class AbstractCurrencyProvider : Object, CurrencyProvider {
         var message = new Soup.Message ("GET", uri);
         try
         {
-            var bodyinput = yield session.send_async (message);
+            var bodyinput = yield session.send_async (message, 1, new GLib.Cancellable());
             var output = yield dest.replace_async (null, false, FileCreateFlags.REPLACE_DESTINATION, 
Priority.DEFAULT);
             yield output.splice_async (bodyinput,
                                        OutputStreamSpliceFlags.CLOSE_SOURCE | 
OutputStreamSpliceFlags.CLOSE_TARGET,
diff --git a/meson.build b/meson.build
index 29b8c541..8c481673 100644
--- a/meson.build
+++ b/meson.build
@@ -35,7 +35,7 @@ glib = dependency('glib-2.0', version: '>= ' + glib_min_version)
 gmodule_export = dependency('gmodule-export-2.0')
 gobject = dependency('gobject-2.0', version: '>= ' + glib_min_version)
 libxml = dependency('libxml-2.0')
-libsoup = dependency('libsoup-2.4', version: '>= 2.42')
+libsoup = dependency('libsoup-3.0')
 gee = dependency('gee-0.8', version: '>= 0.20.0')
 gobject_introspection = dependency('gobject-introspection-1.0', required: false)
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]