[gnome-control-center/wip/hadess/fix-goa-sync] online-accounts: Fix feature switches not doing anything




commit 526da583050b96083d80f8a7be04ad29ec1ee9fc
Author: Bastien Nocera <hadess hadess net>
Date:   Tue Apr 19 23:02:37 2022 +0200

    online-accounts: Fix feature switches not doing anything
    
    Make sure to keep a reference to the GoaObject of the account around (and even
    leaking it in our case) so that the GBinding that synchronises the
    switch widget and the account property doesn'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 | 2 +-
 1 file changed, 1 insertion(+), 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..9d7c40074 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)


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