55 lines
3.0 KiB
Diff
55 lines
3.0 KiB
Diff
From 1e1fbd6891f56428f76baf556486195881e27425 Mon Sep 17 00:00:00 2001
|
|
From: Bastien Nocera <hadess@hadess.net>
|
|
Date: Tue, 19 Apr 2022 23:02:37 +0200
|
|
Subject: [PATCH] online-accounts: Fix feature switches not doing anything
|
|
|
|
Make sure to keep a reference to the GoaObject of the account around so
|
|
that the GBinding that synchronises each switch widget and the account
|
|
properties don't get finalized on startup.
|
|
|
|
#0 0x00007ffff73c6a20 in g_binding_finalize () at /lib64/libgobject-2.0.so.0
|
|
#1 0x00007ffff73d3d22 in g_object_unref () at /lib64/libgobject-2.0.so.0
|
|
#2 0x00007ffff73c68e8 in weak_unbind () at /lib64/libgobject-2.0.so.0
|
|
#3 0x00007ffff73cf117 in weak_refs_notify () at /lib64/libgobject-2.0.so.0
|
|
#4 0x00007ffff72acd6c in g_data_set_internal () at /lib64/libglib-2.0.so.0
|
|
#5 0x00007ffff73d0195 in g_object_real_dispose.lto_priv () at /lib64/libgobject-2.0.so.0
|
|
#6 0x00007ffff73d3c44 in g_object_unref () at /lib64/libgobject-2.0.so.0
|
|
#7 0x00007ffff72b6793 in g_hash_table_remove_all_nodes.part () at /lib64/libglib-2.0.so.0
|
|
#8 0x00007ffff72ba723 in g_hash_table_unref () at /lib64/libglib-2.0.so.0
|
|
#9 0x00007ffff753403d in g_dbus_object_proxy_finalize () at /lib64/libgio-2.0.so.0
|
|
#10 0x00007ffff73d3d22 in g_object_unref () at /lib64/libgobject-2.0.so.0
|
|
#11 0x0000000000402d08 in glib_autoptr_clear_GoaObject (_ptr=0x5d59f0) at /usr/include/goa-1.0/goa/goa-generated.h:3265
|
|
#12 glib_autoptr_cleanup_GoaObject (_ptr=<synthetic pointer>) at /usr/include/goa-1.0/goa/goa-generated.h:3265
|
|
#13 on_application_activate_show_account_cb (application=0x49f2f0, argv=<optimized out>) at ../../../../Projects/jhbuild/gnome-control-center/panels/online-accounts/gnome-control-center-goa-helper.c:360
|
|
|
|
Closes: #1721
|
|
---
|
|
panels/online-accounts/gnome-control-center-goa-helper.c | 4 +++-
|
|
1 file changed, 3 insertions(+), 1 deletion(-)
|
|
|
|
diff --git a/panels/online-accounts/gnome-control-center-goa-helper.c b/panels/online-accounts/gnome-control-center-goa-helper.c
|
|
index 533609cbc..d0e1a478e 100644
|
|
--- a/panels/online-accounts/gnome-control-center-goa-helper.c
|
|
+++ b/panels/online-accounts/gnome-control-center-goa-helper.c
|
|
@@ -385,7 +385,7 @@ on_application_activate_show_account_cb (GtkApplication *application,
|
|
}
|
|
|
|
/* Find the provider with a matching type */
|
|
- account = goa_object_peek_account (object);
|
|
+ account = goa_object_get_account (object);
|
|
provider_type = goa_account_get_provider_type (account);
|
|
provider = goa_provider_get_for_provider_type (provider_type);
|
|
if (!provider)
|
|
@@ -398,6 +398,8 @@ on_application_activate_show_account_cb (GtkApplication *application,
|
|
dialog = g_object_new (GTK_TYPE_DIALOG,
|
|
"use-header-bar", 1,
|
|
NULL);
|
|
+ /* Keep account alive so that the switches are still bound to it */
|
|
+ g_object_set_data_full (G_OBJECT (dialog), "goa-account", account, g_object_unref);
|
|
g_signal_connect_swapped (dialog, "response", G_CALLBACK (g_application_quit), application);
|
|
set_external_parent_from_handle (application, GTK_WINDOW (dialog), argv[3]);
|
|
|
|
--
|
|
GitLab
|
|
|