[gnome-online-accounts] providers: Disconnect from the dialog once add_account is completed
- From: Debarshi Ray <debarshir src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-online-accounts] providers: Disconnect from the dialog once add_account is completed
- Date: Fri, 17 Feb 2017 15:27:39 +0000 (UTC)
commit 67c1ebba6ea248427a9ab4e2eb475eae147b3cd2
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date: Thu Feb 16 14:19:15 2017 -0200
providers: Disconnect from the dialog once add_account is completed
After completing the addition of a new account, successfully or
not, some online account providers don't disconnect from the connected
GtkDialog::response signal. This causes a crash now that we're keeping
the dialog around, as exemplified through the following steps:
- Open Control Center's Online Accounts panel
- Open the Exchange account dialog
- Close the dialog
- Open any other account dialog (e.g. Google)
- Close the dialog
Fix that by properly disconnecting from the dialog's response signal.
https://bugzilla.gnome.org/show_bug.cgi?id=778353
src/goabackend/goaexchangeprovider.c | 2 ++
src/goabackend/goaimapsmtpprovider.c | 2 ++
src/goabackend/goalastfmprovider.c | 2 ++
src/goabackend/goaowncloudprovider.c | 2 ++
4 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/src/goabackend/goaexchangeprovider.c b/src/goabackend/goaexchangeprovider.c
index b1bb974..63ebe21 100644
--- a/src/goabackend/goaexchangeprovider.c
+++ b/src/goabackend/goaexchangeprovider.c
@@ -675,6 +675,8 @@ add_account (GoaProvider *provider,
else
g_assert (ret != NULL);
+ g_signal_handlers_disconnect_by_func (dialog, dialog_response_cb, &data);
+
g_free (data.account_object_path);
g_clear_pointer (&data.loop, (GDestroyNotify) g_main_loop_unref);
g_clear_object (&data.cancellable);
diff --git a/src/goabackend/goaimapsmtpprovider.c b/src/goabackend/goaimapsmtpprovider.c
index 833198b..c48dc81 100644
--- a/src/goabackend/goaimapsmtpprovider.c
+++ b/src/goabackend/goaimapsmtpprovider.c
@@ -1179,6 +1179,8 @@ add_account (GoaProvider *provider,
else
g_assert (ret != NULL);
+ g_signal_handlers_disconnect_by_func (dialog, dialog_response_cb, &data);
+
g_free (domain);
g_free (data.account_object_path);
g_clear_pointer (&data.loop, (GDestroyNotify) g_main_loop_unref);
diff --git a/src/goabackend/goalastfmprovider.c b/src/goabackend/goalastfmprovider.c
index cf7cf9a..63c5058 100644
--- a/src/goabackend/goalastfmprovider.c
+++ b/src/goabackend/goalastfmprovider.c
@@ -738,6 +738,8 @@ add_account (GoaProvider *provider,
else
g_assert (ret != NULL);
+ g_signal_handlers_disconnect_by_func (dialog, dialog_response_cb, &data);
+
g_free (data.access_token);
g_free (data.account_object_path);
g_clear_pointer (&data.loop, (GDestroyNotify) g_main_loop_unref);
diff --git a/src/goabackend/goaowncloudprovider.c b/src/goabackend/goaowncloudprovider.c
index be55583..e3c1d9b 100644
--- a/src/goabackend/goaowncloudprovider.c
+++ b/src/goabackend/goaowncloudprovider.c
@@ -823,6 +823,8 @@ add_account (GoaProvider *provider,
else
g_assert (ret != NULL);
+ g_signal_handlers_disconnect_by_func (dialog, dialog_response_cb, &data);
+
g_free (presentation_identity);
g_free (server);
g_free (uri);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]