summaryrefslogtreecommitdiff
path: root/gdk
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2020-01-15 10:58:54 -0500
committerMatthias Clasen <mclasen@redhat.com>2020-01-15 10:58:54 -0500
commit82dc7b903c53444e7de0695b77e0032353374787 (patch)
tree3eaf9d9f1c9bf32c4ca603fbb769a8b7f66a775b /gdk
parentb020a3fcf9f425ff1cc5b6394a5cd7fe78ddbc8a (diff)
downloadgtk+-82dc7b903c53444e7de0695b77e0032353374787.tar.gz
Fix the filetransfer portal initialization
Reusing the cancellable only works if you don't throw it away after first use.
Diffstat (limited to 'gdk')
-rw-r--r--gdk/filetransferportal.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/gdk/filetransferportal.c b/gdk/filetransferportal.c
index 7f0a35c303..ba5f6d4ef0 100644
--- a/gdk/filetransferportal.c
+++ b/gdk/filetransferportal.c
@@ -120,7 +120,7 @@ ensure_file_transfer_portal (void)
cancellable = g_cancellable_new ();
done = FALSE;
- timeout_id = g_timeout_add_full (500, 0, give_up_on_proxy, cancellable, g_object_unref);
+ timeout_id = g_timeout_add (500, give_up_on_proxy, cancellable);
g_bus_get (G_BUS_TYPE_SESSION,
cancellable,
got_bus,
@@ -131,7 +131,8 @@ ensure_file_transfer_portal (void)
if (bus)
{
- timeout_id = g_timeout_add_full (500, 0, give_up_on_proxy, cancellable, g_object_unref);
+ done = FALSE;
+ timeout_id = g_timeout_add (500, give_up_on_proxy, cancellable);
g_dbus_proxy_new (bus,
G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES
| G_DBUS_PROXY_FLAGS_DO_NOT_CONNECT_SIGNALS
@@ -149,6 +150,8 @@ ensure_file_transfer_portal (void)
g_clear_object (&bus);
}
+
+ g_clear_object (&cancellable);
}
if (file_transfer_proxy)