After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 607436 - Salut account should only automatically created when the wizard is run
Salut account should only automatically created when the wizard is run
Status: RESOLVED FIXED
Product: empathy
Classification: Core
Component: Accounts
2.29.x
Other Linux
: Normal normal
: ---
Assigned To: empathy-maint
Depends on:
Blocks: 596575
 
 
Reported: 2010-01-19 11:59 UTC by Guillaume Desmottes
Modified: 2010-01-19 16:11 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
http://git.collabora.co.uk/?p=user/cassidy/empathy;a=shortlog;h=refs/heads/salut-wizard-607436 (16.17 KB, patch)
2010-01-19 15:13 UTC, Guillaume Desmottes
reviewed Details | Review
New patch (16.53 KB, patch)
2010-01-19 15:44 UTC, Guillaume Desmottes
committed Details | Review

Description Guillaume Desmottes 2010-01-19 11:59:40 UTC
Also, if the wizard is cancelled we shouldn't create the account.
Comment 1 Guillaume Desmottes 2010-01-19 15:13:38 UTC
Created attachment 151764 [details] [review]
http://git.collabora.co.uk/?p=user/cassidy/empathy;a=shortlog;h=refs/heads/salut-wizard-607436

 src/Makefile.am                         |    1 +
 src/empathy-account-assistant.c         |    3 +
 src/empathy-auto-salut-account-helper.c |  233 +++++++++++++++++++++++++++++++
 src/empathy-auto-salut-account-helper.h |   35 +++++
 src/empathy.c                           |  184 +------------------------
 tests/interactive/Makefile.am           |    1 +
 6 files changed, 274 insertions(+), 183 deletions(-)
Comment 2 Cosimo Cecchi 2010-01-19 15:26:32 UTC
Review of attachment 151764 [details] [review]:

Looks good, some minor comments:

::: src/Makefile.am
@@ +48,3 @@
 	empathy-status-icon.c empathy-status-icon.h			\
 	empathy-sidebar.c empathy-sidebar.h				\
+	empathy-auto-salut-account-helper.c empathy-auto-salut-account-helper.h \

It's probably better to keep this list sorted alphabetically

::: src/empathy-auto-salut-account-helper.c
@@ +210,3 @@
+
+  tp_account_manager_prepare_async (manager, NULL,
+      create_salut_account_am_ready_cb, g_object_ref (managers));

Why do you _ref() managers here? You already duped the object in create_salut_account_if_needed(), so that reference should be already valid here.

::: tests/interactive/Makefile.am
@@ +35,3 @@
 	$(top_builddir)/src/empathy-import-widget.o	\
 	$(top_builddir)/src/empathy-import-pidgin.o	\
+	$(top_builddir)/src/empathy-auto-salut-account-helper.o	\

Also, better to keep this sorted.
Comment 3 Guillaume Desmottes 2010-01-19 15:43:53 UTC
(In reply to comment #2)
> ::: src/Makefile.am
> @@ +48,3 @@
>      empathy-status-icon.c empathy-status-icon.h            \
>      empathy-sidebar.c empathy-sidebar.h                \
> +    empathy-auto-salut-account-helper.c empathy-auto-salut-account-helper.h \
> 
> It's probably better to keep this list sorted alphabetically

Indeed. Done.

> ::: src/empathy-auto-salut-account-helper.c
> @@ +210,3 @@
> +
> +  tp_account_manager_prepare_async (manager, NULL,
> +      create_salut_account_am_ready_cb, g_object_ref (managers));
> 
> Why do you _ref() managers here? You already duped the object in
> create_salut_account_if_needed(), so that reference should be already valid
> here.

You're right. It did make sense when we were using the reference from the caller but not anymore. Fixed; nice catch!

> ::: tests/interactive/Makefile.am
> @@ +35,3 @@
>      $(top_builddir)/src/empathy-import-widget.o    \
>      $(top_builddir)/src/empathy-import-pidgin.o    \
> +    $(top_builddir)/src/empathy-auto-salut-account-helper.o    \
> 
> Also, better to keep this sorted.

Done.

I squashed the changes.
Comment 4 Guillaume Desmottes 2010-01-19 15:44:10 UTC
Created attachment 151772 [details] [review]
New patch

 src/Makefile.am                         |    1 +
 src/empathy-account-assistant.c         |    3 +
 src/empathy-auto-salut-account-helper.c |  233 +++++++++++++++++++++++++++++++
 src/empathy-auto-salut-account-helper.h |   35 +++++
 src/empathy.c                           |  184 +------------------------
 tests/interactive/Makefile.am           |    3 +-
 6 files changed, 275 insertions(+), 184 deletions(-)
Comment 5 Cosimo Cecchi 2010-01-19 15:51:02 UTC
Review of attachment 151772 [details] [review]:

Looks good to me.
Comment 6 Guillaume Desmottes 2010-01-19 16:11:50 UTC
This problem has been fixed in the development version. The fix will be available in the next major software release. Thank you for your bug report.