gnome-control-center/panels/online-accounts
Andrea Azzarone b614a6c023 online-accounts: Don't segfault if get_all_providers_cb is called during init
Due to an API bug in GNOME Online Accounts, the asynchronous
goa_provider_get_all method doesn't accept a GCancellable argument. This makes
it difficult to cancel an ongoing call when the CcGoaPanel gets destroyed.

This was hacked around by taking a reference on the panel for the duration of
the call. Instead of cancelling a pending call on destruction, it would keep the
panel alive until the call was over.

The hack does not consider the case get_all_providers_cb is called while the
panel is still being initialized. E.g. this happen when create the panel passing
the paramenters "add <provider>" because the constuct properties are set just
after cc_goa_panel_init returns and because goa_provider_add_account will result
in a call to g_main_context_iterate (caused by gtk_dialog_run).

In order to work around this we can call goa_provider_get_all in _constructed()
after all construct properties have been set.

https://gitlab.gnome.org/GNOME/gnome-control-center/issues/401
2019-09-10 10:36:37 +12:00
..
icons build: Remove autotools 2018-01-18 12:20:08 +01:00
cc-online-accounts-panel.c online-accounts: Don't segfault if get_all_providers_cb is called during init 2019-09-10 10:36:37 +12:00
cc-online-accounts-panel.h online-accounts: Use G_DECLARE_FINAL_TYPE 2016-11-30 17:16:35 +01:00
gnome-online-accounts-panel.desktop.in.in Add translator comments to .desktop files 2018-02-23 18:49:35 +01:00
meson.build Move common panel code from shell/ to panel/common 2018-04-17 15:26:59 +02:00
online-accounts.gresource.xml online-accounts: use a GResource for GtkBuilder UI definition 2013-01-07 10:57:06 +01:00
online-accounts.ui online-accounts: Set label relationship for listboxes 2019-01-10 11:53:00 +00:00