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 696267 - Add a provider for chat-only (Telepathy) accounts
Add a provider for chat-only (Telepathy) accounts
Status: RESOLVED FIXED
Product: gnome-online-accounts
Classification: Core
Component: Telepathy
unspecified
Other All
: Normal enhancement
: ---
Assigned To: Marco Barisione
GNOME Online Accounts maintainer(s)
: 653269 727965 (view as bug list)
Depends on: 695885 696281 699492
Blocks: 706148 706317
 
 
Reported: 2013-03-21 10:51 UTC by Emanuele Aina
Modified: 2014-04-10 13:53 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
accounts-dialog: Launch the Online Accounts panel if using GOA (4.53 KB, patch)
2013-03-21 10:51 UTC, Emanuele Aina
none Details | Review
daemon: avoid ID collisions if accounts are created in the same second (1.09 KB, patch)
2013-08-20 09:12 UTC, Debarshi Ray
reviewed Details | Review
providerfactory: add abstract class to create providers dynamically (11.77 KB, patch)
2013-08-20 09:13 UTC, Debarshi Ray
reviewed Details | Review
provider: add an extension point for GoaProviderFactory implementations (1.85 KB, patch)
2013-08-20 09:14 UTC, Debarshi Ray
accepted-commit_now Details | Review
provider: make goa_provider_get_for_provider_type() handle factories too (3.12 KB, patch)
2013-08-20 09:14 UTC, Debarshi Ray
reviewed Details | Review
provider: add goa_provider_get_all_async() and _finish() (9.57 KB, patch)
2013-08-20 09:15 UTC, Debarshi Ray
reviewed Details | Review
provider: add GOA_PROVIDER_GROUP_CHAT (711 bytes, patch)
2013-08-20 09:16 UTC, Debarshi Ray
accepted-commit_now Details | Review
build: add m4/ax_config_dir.m4 for the AX_CONFIG_DIR() function (4.79 KB, patch)
2013-08-20 09:16 UTC, Debarshi Ray
accepted-commit_now Details | Review
build: add the telepathy-account-widgets submodule (3.14 KB, patch)
2013-08-20 09:17 UTC, Debarshi Ray
reviewed Details | Review
build: use Telepathy's libraries in goabackend (863 bytes, patch)
2013-08-20 09:18 UTC, Debarshi Ray
accepted-commit_now Details | Review
telepathy: add a stub for the Telepathy provider (10.78 KB, patch)
2013-08-20 09:19 UTC, Debarshi Ray
accepted-commit_now Details | Review
telepathy: implement build_object (2.02 KB, patch)
2013-08-20 09:19 UTC, Debarshi Ray
reviewed Details | Review
telepathy: add a switch to enable/disable chat (1.21 KB, patch)
2013-08-20 09:21 UTC, Debarshi Ray
reviewed Details | Review
telepathy: add methods to instantiate the provider with the right values (7.52 KB, patch)
2013-08-20 09:23 UTC, Debarshi Ray
reviewed Details | Review
telepathy: implement get_provider_type() correctly (905 bytes, patch)
2013-08-20 09:23 UTC, Debarshi Ray
accepted-commit_now Details | Review
telepathyfactory: add GoaProviderFactory for dynamic Telepathy providers (8.16 KB, patch)
2013-08-20 11:57 UTC, Debarshi Ray
reviewed Details | Review
provider: initialise the Telepathy provider factory (994 bytes, patch)
2013-08-20 11:58 UTC, Debarshi Ray
accepted-commit_now Details | Review
tplinker: add a stub for GoaTpAccountLinker (8.94 KB, patch)
2013-08-20 11:59 UTC, Debarshi Ray
reviewed Details | Review
daemon: start the Telepathy linker when we acquire the bus name (1.37 KB, patch)
2013-08-20 12:00 UTC, Debarshi Ray
accepted-commit_now Details | Review
tplinker: keep track of both GOA and Telepathy accounts (6.75 KB, patch)
2013-08-20 12:01 UTC, Debarshi Ray
reviewed Details | Review
tplinker: create GOA accounts for new Telepathy accounts (2.94 KB, patch)
2013-08-20 12:01 UTC, Debarshi Ray
accepted-commit_now Details | Review
tplinker: handle deletion of both GOA and Telepathy accounts (5.48 KB, patch)
2013-08-20 12:03 UTC, Debarshi Ray
accepted-commit_now Details | Review
tplinker: check for GOA accounts with no corresponding Telepathy account (1.90 KB, patch)
2013-08-20 12:05 UTC, Debarshi Ray
reviewed Details | Review
tplinker: sync the enabled status between Telepathy and GOA accounts (4.97 KB, patch)
2013-08-20 12:05 UTC, Debarshi Ray
reviewed Details | Review
tplinker: make sure all the TpAccounts have the features we need (1.58 KB, patch)
2013-08-20 12:07 UTC, Debarshi Ray
reviewed Details | Review
tplinker: ignore chat accounts handled by other providers (1.27 KB, patch)
2013-08-20 12:09 UTC, Debarshi Ray
accepted-commit_now Details | Review
tplinker: allow to ignore some accounts to make debugging easier (1.57 KB, patch)
2013-08-20 12:10 UTC, Debarshi Ray
accepted-commit_now Details | Review
tplinker: cache the protocol and icon names in the key file (1.11 KB, patch)
2013-08-20 12:10 UTC, Debarshi Ray
reviewed Details | Review
daemon: set icon and provider name after building the object (1.75 KB, patch)
2013-08-20 12:13 UTC, Debarshi Ray
accepted-commit_now Details | Review
telepathy: return a different provider name based on the IM protocol (1.71 KB, patch)
2013-08-20 12:14 UTC, Debarshi Ray
reviewed Details | Review
telepathy: implement the add_account method (9.00 KB, patch)
2013-08-20 12:15 UTC, Debarshi Ray
accepted-commit_now Details | Review
telepathy: implement the refresh_account method (5.95 KB, patch)
2013-08-20 12:16 UTC, Debarshi Ray
accepted-commit_now Details | Review
telepathy: add a button to change the connection parameters (4.21 KB, patch)
2013-08-21 11:02 UTC, Debarshi Ray
accepted-commit_now Details | Review
telepathy: add a button to edit personal information (5.34 KB, patch)
2013-08-21 11:03 UTC, Debarshi Ray
accepted-commit_now Details | Review
telepathyfactory: filter out Google Talk and Facebook (1.87 KB, patch)
2013-08-21 11:03 UTC, Debarshi Ray
reviewed Details | Review
utils: add goa_utils_init_icon_paths() (1.37 KB, patch)
2013-08-21 11:05 UTC, Debarshi Ray
reviewed Details | Review
provider: initialise the icon paths in _init() (807 bytes, patch)
2013-08-21 11:05 UTC, Debarshi Ray
reviewed Details | Review
daemon: initialise the icon paths (837 bytes, patch)
2013-08-21 11:06 UTC, Debarshi Ray
reviewed Details | Review
telepathy: implement get_provider_icon() (2.42 KB, patch)
2013-08-21 11:07 UTC, Debarshi Ray
accepted-commit_now Details | Review
daemon: avoid ID collisions if accounts are created in the same second (1.13 KB, patch)
2013-08-21 14:01 UTC, Marco Barisione
accepted-commit_now Details | Review
providerfactory: add abstract class to create providers dynamically (11.73 KB, patch)
2013-08-21 14:01 UTC, Marco Barisione
accepted-commit_now Details | Review
provider: add an extension point for GoaProviderFactory implementations (1.90 KB, patch)
2013-08-21 14:01 UTC, Marco Barisione
accepted-commit_now Details | Review
provider: make goa_provider_get_for_provider_type() handle factories too (3.11 KB, patch)
2013-08-21 14:01 UTC, Marco Barisione
accepted-commit_now Details | Review
provider: check that provider_type is not NULL in get_for_provider_type() (812 bytes, patch)
2013-08-21 14:01 UTC, Marco Barisione
accepted-commit_now Details | Review
provider: add goa_provider_get_all_async() and _finish() (9.78 KB, patch)
2013-08-21 14:01 UTC, Marco Barisione
accepted-commit_now Details | Review
provider: style: align the declaration of _get_all() with the others (1.19 KB, patch)
2013-08-21 14:01 UTC, Marco Barisione
accepted-commit_now Details | Review
provider: add GOA_PROVIDER_GROUP_CHAT (755 bytes, patch)
2013-08-21 14:01 UTC, Marco Barisione
accepted-commit_now Details | Review
build: add m4/ax_config_dir.m4 for the AX_CONFIG_DIR() function (4.83 KB, patch)
2013-08-21 14:02 UTC, Marco Barisione
accepted-commit_now Details | Review
build: add the telepathy-account-widgets submodule (3.04 KB, patch)
2013-08-21 14:02 UTC, Marco Barisione
accepted-commit_now Details | Review
build: use Telepathy's libraries in goabackend (907 bytes, patch)
2013-08-21 14:02 UTC, Marco Barisione
accepted-commit_now Details | Review
telepathy: add a stub for the Telepathy provider (10.83 KB, patch)
2013-08-21 14:02 UTC, Marco Barisione
accepted-commit_now Details | Review
telepathy: implement build_object (1.97 KB, patch)
2013-08-21 14:02 UTC, Marco Barisione
accepted-commit_now Details | Review
telepathy: add a switch to enable/disable chat (1.26 KB, patch)
2013-08-21 14:02 UTC, Marco Barisione
accepted-commit_now Details | Review
POTFILES.in: add goatelepathyprovider.c (749 bytes, patch)
2013-08-21 14:02 UTC, Marco Barisione
accepted-commit_now Details | Review
telepathy: add methods to instantiate the provider with the right values (7.51 KB, patch)
2013-08-21 14:02 UTC, Marco Barisione
accepted-commit_now Details | Review
telepathy: implement get_provider_type() correctly (949 bytes, patch)
2013-08-21 14:02 UTC, Marco Barisione
accepted-commit_now Details | Review
telepathyfactory: add GoaProviderFactory for dynamic Telepathy providers (8.20 KB, patch)
2013-08-21 14:02 UTC, Marco Barisione
accepted-commit_now Details | Review
provider: initialise the Telepathy provider factory (1.01 KB, patch)
2013-08-21 14:02 UTC, Marco Barisione
accepted-commit_now Details | Review
tplinker: add a stub for GoaTpAccountLinker (8.78 KB, patch)
2013-08-21 14:03 UTC, Marco Barisione
accepted-commit_now Details | Review
daemon: start the Telepathy linker when we acquire the bus name (1.42 KB, patch)
2013-08-21 14:03 UTC, Marco Barisione
accepted-commit_now Details | Review
tplinker: keep track of both GOA and Telepathy accounts (6.66 KB, patch)
2013-08-21 14:03 UTC, Marco Barisione
accepted-commit_now Details | Review
tplinker: create GOA accounts for new Telepathy accounts (2.98 KB, patch)
2013-08-21 14:03 UTC, Marco Barisione
accepted-commit_now Details | Review
tplinker: handle deletion of both GOA and Telepathy accounts (5.52 KB, patch)
2013-08-21 14:03 UTC, Marco Barisione
accepted-commit_now Details | Review
tplinker: check for GOA accounts with no corresponding Telepathy account (1.95 KB, patch)
2013-08-21 14:03 UTC, Marco Barisione
accepted-commit_now Details | Review
tplinker: sync the enabled status between Telepathy and GOA accounts (4.69 KB, patch)
2013-08-21 14:03 UTC, Marco Barisione
accepted-commit_now Details | Review
tplinker: make sure all the TpAccounts have the features we need (1.54 KB, patch)
2013-08-21 14:03 UTC, Marco Barisione
accepted-commit_now Details | Review
tplinker: ignore chat accounts handled by other providers (1.31 KB, patch)
2013-08-21 14:03 UTC, Marco Barisione
accepted-commit_now Details | Review
tplinker: allow to ignore some accounts to make debugging easier (1.62 KB, patch)
2013-08-21 14:03 UTC, Marco Barisione
accepted-commit_now Details | Review
tplinker: cache the protocol and icon names in the key file (1.15 KB, patch)
2013-08-21 14:03 UTC, Marco Barisione
rejected Details | Review
daemon: set icon and provider name after building the object (1.79 KB, patch)
2013-08-21 14:04 UTC, Marco Barisione
accepted-commit_now Details | Review
telepathy: return a different provider name based on the IM protocol (1.75 KB, patch)
2013-08-21 14:04 UTC, Marco Barisione
reviewed Details | Review
telepathy: implement the add_account method (9.04 KB, patch)
2013-08-21 14:04 UTC, Marco Barisione
accepted-commit_now Details | Review
telepathy: implement the refresh_account method (5.99 KB, patch)
2013-08-21 14:04 UTC, Marco Barisione
accepted-commit_now Details | Review
telepathy: add a button to change the connection parameters (4.25 KB, patch)
2013-08-21 14:04 UTC, Marco Barisione
accepted-commit_now Details | Review
telepathy: add a button to edit personal information (5.38 KB, patch)
2013-08-21 14:04 UTC, Marco Barisione
accepted-commit_now Details | Review
telepathyfactory: filter out Google Talk and Facebook (1.91 KB, patch)
2013-08-21 14:04 UTC, Marco Barisione
accepted-commit_now Details | Review
utils: add goa_utils_init_icon_paths() (2.49 KB, patch)
2013-08-21 14:04 UTC, Marco Barisione
none Details | Review
telepathy: implement get_provider_icon() (2.46 KB, patch)
2013-08-21 14:04 UTC, Marco Barisione
reviewed Details | Review
DO NOT MERGE! WIP to fixup with: tplinker: sync the enabled status between Telepathy and GOA accounts (1.89 KB, patch)
2013-08-21 14:04 UTC, Marco Barisione
accepted-commit_now Details | Review
DO NOT MERGE: fixup! telepathy: add a button to change the connection parameters (1.51 KB, patch)
2013-08-21 14:05 UTC, Marco Barisione
accepted-commit_now Details | Review
DO NOT MERGE: squash! telepathy: add a button to edit personal information (1.41 KB, patch)
2013-08-21 14:05 UTC, Marco Barisione
accepted-commit_now Details | Review
utils: add goa_utils_init_icon_paths() (2.55 KB, patch)
2013-08-21 14:53 UTC, Marco Barisione
accepted-commit_now Details | Review
telepathy: return a different provider name based on the IM protocol (1.13 KB, patch)
2013-08-21 16:26 UTC, Marco Barisione
accepted-commit_now Details | Review
telepathy: implement get_provider_icon() (1.74 KB, patch)
2013-08-21 16:29 UTC, Marco Barisione
none Details | Review
telepathy: implement get_provider_icon() (1.81 KB, patch)
2013-08-21 16:39 UTC, Marco Barisione
accepted-commit_now Details | Review
POTFILES.skip: ignore files in telepathy-account-widgets/ (608 bytes, patch)
2013-08-21 16:41 UTC, Marco Barisione
accepted-commit_now Details | Review
goadaemon: use goa_provider_get_all_async() instead of the sync version (9.42 KB, patch)
2013-08-21 18:00 UTC, Marco Barisione
none Details | Review
goadaemon: use goa_provider_get_all_async() instead of the sync version (9.42 KB, patch)
2013-08-21 18:04 UTC, Marco Barisione
accepted-commit_now Details | Review
configure.ac: pass --with-icondir to tpaw's configure (1022 bytes, patch)
2013-08-22 13:24 UTC, Marco Barisione
accepted-commit_now Details | Review
configure.ac: pass --with-gettext-package to tpaw's configure (1.00 KB, patch)
2013-08-22 13:25 UTC, Marco Barisione
accepted-commit_now Details | Review
WIP! fixup! telepathy: implement the add_account method (1.01 KB, patch)
2013-08-22 13:25 UTC, Marco Barisione
accepted-commit_now Details | Review
telepathy: improve the spacing in the various dialogs (1.97 KB, patch)
2013-08-22 13:25 UTC, Marco Barisione
accepted-commit_now Details | Review
telepathy: add a hack to avoid the personal details dialog from moving (1.97 KB, patch)
2013-08-22 13:25 UTC, Marco Barisione
reviewed Details | Review
provider: make goa_provider_get_all() async (18.52 KB, patch)
2013-08-22 13:47 UTC, Marco Barisione
accepted-commit_now Details | Review
telepathy: add a hack to avoid the personal details dialog from moving (2.03 KB, patch)
2013-08-22 14:06 UTC, Marco Barisione
accepted-commit_now Details | Review

Description Emanuele Aina 2013-03-21 10:51:20 UTC
The intent of the patches submitted under bug #695885 is to provide a Online
Accounts view customised for Empathy, by showing only those accounts and
providers which provides IM services.

The patch attached builds on that feature to replace empathy-accounts by
invoking Online Accounts panel.

I choose to follow how the UOA panel is invoked. With bug #696054 g-c-c panels
will be DBus-activatable and if preferable I could go that route.

This is just a first step: the XMPP/IRC/etc. unbranded providers for g-o-a
will follow and once they're in place we'll plan how to handle the
migration of existing accounts.
Comment 1 Emanuele Aina 2013-03-21 10:51:24 UTC
Created attachment 239449 [details] [review]
accounts-dialog: Launch the Online Accounts panel if using GOA
Comment 2 Xavier Claessens 2013-03-21 12:28:30 UTC
The code looks good to me.

However this is for 3.9 and we did not branch empathy yet AFAIK. So needs to wait before merging.

(In reply to comment #0)
> This is just a first step: the XMPP/IRC/etc. unbranded providers for g-o-a
> will follow and once they're in place we'll plan how to handle the
> migration of existing accounts.

Is there a GOA bug about this? I don't think we can merge your patch until GOA side is ready. For the migration, empathy already have UOA migration code, we should do similar code for GOA.
Comment 3 Debarshi Ray 2013-03-21 12:32:15 UTC
(In reply to comment #2)
> Is there a GOA bug about this? I don't think we can merge your patch until GOA
> side is ready. For the migration, empathy already have UOA migration code, we
> should do similar code for GOA.

As far as I understand, it is blocking on a bunch of gnome-control-center patches that should land post-3.8.0.
Comment 4 Emanuele Aina 2013-03-21 12:44:41 UTC
(In reply to comment #3)
> (In reply to comment #2)
> > Is there a GOA bug about this? I don't think we can merge your patch until GOA
> > side is ready. For the migration, empathy already have UOA migration code, we
> > should do similar code for GOA.

Bug 696281 created.

> As far as I understand, it is blocking on a bunch of gnome-control-center
> patches that should land post-3.8.0.

Yep, sorry for being unclear. I've submitted the patch just to validate the approach, it's still a somewhat long road before being able to merge it. :)
Comment 5 Marco Barisione 2013-05-02 15:03:47 UTC
I'm going to work on this in the next month or so.
Comment 6 Guillaume Desmottes 2013-05-03 12:15:30 UTC
Comment on attachment 239449 [details] [review]
accounts-dialog: Launch the Online Accounts panel if using GOA

Marking the patch as obsolete as it's not mergeable yet.
Comment 7 Marco Barisione 2013-08-16 15:57:38 UTC
I have a branch to fix this for GOA at: http://cgit.collabora.com/git/user/bari/gnome-online-accounts.git/log/

There are also a few patches for gnome-control-center: http://cgit.collabora.com/git/user/bari/gnome-control-center.git/log/

There are also a few screenshots here:
- http://people.collabora.com/~bari/tmp-goa-empathy/accounts.png ← g-c-c with IM accounts.
- http://people.collabora.com/~bari/tmp-goa-empathy/edit-connection-parameters.png ← Edit connection parameters dialog
- http://people.collabora.com/~bari/tmp-goa-empathy/edit-personal-details.png ← Edit personal details dialog
- http://people.collabora.com/~bari/tmp-goa-empathy/add-account1.png ← what you get when you add an account and press other (with all the IM account types visible)
- http://people.collabora.com/~bari/tmp-goa-empathy/add-account2.png ← after selecting jabber in the previous dialog

The dialogs for the various account types come from empathy and are a bit ugly, but we could make some incremental improvements, maybe starting from xmpp and irc.

There is only one feature missing, that is the white list for account types. I couldn't figure out a nice way to implement this, but it shouldn't take long.

Bastien would like the avatar button to be in a library, so that the “Users” panel and the goa one could share this code. I will open a bug about this, but I'm not sure in which library it should be (he suggested libgnome-desktop) and I'm not sure if we need this for the first version or if we can do it later (I guess it depends on the version of Gnome we want this bug for).
Comment 8 Debarshi Ray 2013-08-20 09:12:17 UTC
Attaching the patches from bari/im-accounts here for review.
Comment 9 Debarshi Ray 2013-08-20 09:12:59 UTC
Created attachment 252346 [details] [review]
daemon: avoid ID collisions if accounts are created in the same second
Comment 10 Debarshi Ray 2013-08-20 09:13:32 UTC
Created attachment 252347 [details] [review]
providerfactory: add abstract class to create providers dynamically
Comment 11 Debarshi Ray 2013-08-20 09:14:13 UTC
Created attachment 252348 [details] [review]
provider: add an extension point for GoaProviderFactory implementations
Comment 12 Debarshi Ray 2013-08-20 09:14:44 UTC
Created attachment 252349 [details] [review]
provider: make goa_provider_get_for_provider_type() handle factories too
Comment 13 Debarshi Ray 2013-08-20 09:15:24 UTC
Created attachment 252350 [details] [review]
provider: add goa_provider_get_all_async() and _finish()
Comment 14 Debarshi Ray 2013-08-20 09:16:13 UTC
Created attachment 252351 [details] [review]
provider: add GOA_PROVIDER_GROUP_CHAT
Comment 15 Debarshi Ray 2013-08-20 09:16:50 UTC
Created attachment 252352 [details] [review]
build: add m4/ax_config_dir.m4 for the AX_CONFIG_DIR() function
Comment 16 Debarshi Ray 2013-08-20 09:17:34 UTC
Created attachment 252353 [details] [review]
build: add the telepathy-account-widgets submodule
Comment 17 Debarshi Ray 2013-08-20 09:18:21 UTC
Created attachment 252354 [details] [review]
build: use Telepathy's libraries in goabackend
Comment 18 Debarshi Ray 2013-08-20 09:19:06 UTC
Created attachment 252355 [details] [review]
telepathy: add a stub for the Telepathy provider
Comment 19 Debarshi Ray 2013-08-20 09:19:57 UTC
Created attachment 252357 [details] [review]
telepathy: implement build_object
Comment 20 Debarshi Ray 2013-08-20 09:21:11 UTC
Created attachment 252358 [details] [review]
telepathy: add a switch to enable/disable chat
Comment 21 Debarshi Ray 2013-08-20 09:23:06 UTC
Created attachment 252359 [details] [review]
telepathy: add methods to instantiate the provider with the right values
Comment 22 Debarshi Ray 2013-08-20 09:23:52 UTC
Created attachment 252361 [details] [review]
telepathy: implement get_provider_type() correctly
Comment 23 Debarshi Ray 2013-08-20 09:28:00 UTC
Review of attachment 252346 [details] [review]:

Otherwise looks good.

::: src/daemon/goadaemon.c
@@ +704,3 @@
 generate_new_id (GoaDaemon *daemon)
 {
+  static gint counter = 0;

Maybe use guint?

@@ +715,3 @@
 
+  counter++;
+

The extra newline doesn't seem necessary.
Comment 24 Debarshi Ray 2013-08-20 09:40:36 UTC
Review of attachment 252347 [details] [review]:

::: src/goabackend/goaproviderfactory.h
@@ +85,3 @@
+  /*< private >*/
+  /* Padding for future expansion */
+  gpointer goa_reserved[16];

I don't think this is required because this is a private type that is not exported to the outside world. Only goaprovider.h is public.

I know that some of the private headers still have these expansion slots, but that is a relic of the past, and should be cleaned up in my opinion.

@@ +99,3 @@
+                                                             GList                 **out_providers,
+                                                             GAsyncResult           *result,
+                                                             GError                **error);

Any reason the _finish can't return a GList * instead of a gboolean? Returning a GList * looks more idiomatic to me, but I can be convinced otherwise.

I am guessing that you are doing this for 2 reasons:
(1) To differentiate cases where there has been no error, yet not providers were found.
(2) To avoid a deep_copy if the user is not interested in the GList *.

For (1), the caller can check the GError instead of the return value.
For (2), if you are using GTask then the deep_copy won't be needed, and we can make it mandatory for the caller to free the GList* if it is calling _finish.

This is not a blocker, though.
Comment 25 Debarshi Ray 2013-08-20 09:43:22 UTC
Review of attachment 252348 [details] [review]:

Looks good.
Comment 26 Debarshi Ray 2013-08-20 09:49:33 UTC
Review of attachment 252349 [details] [review]:

::: src/goabackend/goaprovider.c
@@ +864,3 @@
   GoaProvider *ret;
 
+  g_return_val_if_fail (provider_type != NULL, NULL);

Should ideally be in a different commit.
Comment 27 Marco Barisione 2013-08-20 09:54:30 UTC
(In reply to comment #24)
> I know that some of the private headers still have these expansion slots, but
> that is a relic of the past, and should be cleaned up in my opinion.

Ah ok. I was a bit confused by that and I was not sure what GOA considered public and what not.

> @@ +99,3 @@
> +                                                             GList            
>     **out_providers,
> +                                                             GAsyncResult     
>      *result,
> +                                                             GError           
>     **error);
> 
> Any reason the _finish can't return a GList * instead of a gboolean? Returning
> a GList * looks more idiomatic to me, but I can be convinced otherwise.

I actually wrote this function to return a GList first (and also some functions in tp-aw). Then I look more around in the code and found other functions (I don't remember where, for sure in empathy, but I think also in GOA or g-c-c) that returned a boolean instead of a GList*, so I thought that returning a boolean would have been more idiomatic and maybe also have other advantages.

> I am guessing that you are doing this for 2 reasons:
> (1) To differentiate cases where there has been no error, yet not providers
> were found.
> (2) To avoid a deep_copy if the user is not interested in the GList *.

I guess those were the reasons why the code I looked at was doing this.
If you prefer I can revert for my old version returning a GList directly. (Tbh I don't really care about 2. It's not a significant performance difference.)
Comment 28 Debarshi Ray 2013-08-20 10:12:13 UTC
Review of attachment 252350 [details] [review]:

::: src/goabackend/goaprovider.c
@@ +1024,3 @@
   ensure_builtins_loaded ();
 
+  data = g_new0 (GetAllData, 1);

As a general rule, when allocating fixed-sized structs g_slice_new0() and g_slice_free() are better. (Obviously this code is not performance-critical!)

@@ +1115,3 @@
+ *
+ * Note that this function will run the default main loop while retrieving
+ * the list of providers.

Why? For a truly sync operation shouldn't we be creating a new thread default context and a running a main loop on it?

I am guessing that you are doing this to make it user for the GUI. So that it can call goa_provider_get_all and not freeze. Can't we just ask the GUI to use the async variant in that case?

::: src/goabackend/goaprovider.h
@@ +175,3 @@
 guint        goa_provider_get_credentials_generation (GoaProvider        *provider);
 
+GList        *goa_provider_get_all                  (void);

Should ideally be in a different commit.
Comment 29 Debarshi Ray 2013-08-20 10:14:19 UTC
(In reply to comment #27)
> (In reply to comment #24)
> > @@ +99,3 @@
> > +                                                             GList            
> >     **out_providers,
> > +                                                             GAsyncResult     
> >      *result,
> > +                                                             GError           
> >     **error);
> > 
> > Any reason the _finish can't return a GList * instead of a gboolean? Returning
> > a GList * looks more idiomatic to me, but I can be convinced otherwise.
> 
> I actually wrote this function to return a GList first (and also some functions
> in tp-aw). Then I look more around in the code and found other functions (I
> don't remember where, for sure in empathy, but I think also in GOA or g-c-c)
> that returned a boolean instead of a GList*, so I thought that returning a
> boolean would have been more idiomatic and maybe also have other advantages.

Ok.

> > I am guessing that you are doing this for 2 reasons:
> > (1) To differentiate cases where there has been no error, yet not providers
> > were found.
> > (2) To avoid a deep_copy if the user is not interested in the GList *.
> 
> I guess those were the reasons why the code I looked at was doing this.
> If you prefer I can revert for my old version returning a GList directly. (Tbh
> I don't really care about 2. It's not a significant performance difference.)

Don't worry. We can revisit this when we port things to GTask.
Comment 30 Debarshi Ray 2013-08-20 10:17:19 UTC
Review of attachment 252351 [details] [review]:

Passing note unrelated to this bug: we might end up deprecating GoaProviderGroup in future because we now have GoaProviderFeatures.
Comment 31 Debarshi Ray 2013-08-20 10:19:44 UTC
Review of attachment 252352 [details] [review]:

::: m4/ax_config_dir.m4
@@ +1,2 @@
+dnl Copied from Audacity 1.3.10 which itself is licensed under the GPL v2 or
+dnl any later version

Do we need to ask permission for using it in a LGPLv2+ code base?
Comment 32 Debarshi Ray 2013-08-20 11:16:30 UTC
Review of attachment 252353 [details] [review]:

Note that I am no expert on Git submodules. :-)

::: autogen.sh
@@ +28,3 @@
+cd telepathy-account-widgets
+sh autogen.sh --no-configure
+cd ..

I think this whole snippet can be replaced by:
git submodule update --init --recursive.

See gnome-photos for an example.
Comment 33 Debarshi Ray 2013-08-20 11:20:07 UTC
Review of attachment 252354 [details] [review]:

Looks good.
Comment 34 Debarshi Ray 2013-08-20 11:43:52 UTC
Review of attachment 252355 [details] [review]:

Looks good.
Comment 35 Debarshi Ray 2013-08-20 11:47:46 UTC
Review of attachment 252357 [details] [review]:

::: src/goabackend/goatelepathyprovider.c
@@ +125,3 @@
+  GoaChat *chat = NULL;
+  gboolean chat_enabled;
+  gboolean ret = FALSE;

It is better to retain the style that is followed all over the code base. ie.:
account = NULL;
chat = NULL;
ret = FALSE;

This is how you did it in the previous patch, but now you changed it. :-)
Comment 36 Debarshi Ray 2013-08-20 11:49:09 UTC
Review of attachment 252358 [details] [review]:

::: src/goabackend/goatelepathyprovider.c
@@ +194,3 @@
+                                                   _("Use for"),
+                                                   "chat-disabled",
+                                                   _("C_hat"));

po/POTFILES.in needs an update. :-)
Comment 37 Debarshi Ray 2013-08-20 11:53:41 UTC
Review of attachment 252359 [details] [review]:

::: src/goabackend/goatelepathyprovider.c
@@ +289,3 @@
+        GOA_TYPE_TELEPATHY_PROVIDER, GoaTelepathyProviderPrivate);
+
+  provider->priv = priv;

We can assign directly to provider->priv.

@@ +302,3 @@
+    {
+      if (priv->protocol_name != NULL)
+        g_error ("You cannot set \"protocol-name\" if you set \"protocol\"");

You need to g_free (priv->protocol_name), otherwise you will leak it in the next line.
Comment 38 Debarshi Ray 2013-08-20 11:56:07 UTC
Review of attachment 252361 [details] [review]:

Looks good.
Comment 39 Debarshi Ray 2013-08-20 11:57:59 UTC
Created attachment 252386 [details] [review]
telepathyfactory: add GoaProviderFactory for dynamic Telepathy providers
Comment 40 Debarshi Ray 2013-08-20 11:58:33 UTC
Created attachment 252387 [details] [review]
provider: initialise the Telepathy provider factory
Comment 41 Debarshi Ray 2013-08-20 11:59:34 UTC
Created attachment 252388 [details] [review]
tplinker: add a stub for GoaTpAccountLinker
Comment 42 Debarshi Ray 2013-08-20 12:00:22 UTC
Created attachment 252389 [details] [review]
daemon: start the Telepathy linker when we acquire the bus name
Comment 43 Debarshi Ray 2013-08-20 12:01:07 UTC
Created attachment 252390 [details] [review]
tplinker: keep track of both GOA and Telepathy accounts
Comment 44 Debarshi Ray 2013-08-20 12:01:51 UTC
Created attachment 252391 [details] [review]
tplinker: create GOA accounts for new Telepathy accounts
Comment 45 Debarshi Ray 2013-08-20 12:03:02 UTC
Created attachment 252392 [details] [review]
tplinker: handle deletion of both GOA and Telepathy accounts
Comment 46 Debarshi Ray 2013-08-20 12:05:02 UTC
Created attachment 252393 [details] [review]
tplinker: check for GOA accounts with no corresponding Telepathy account
Comment 47 Debarshi Ray 2013-08-20 12:05:50 UTC
Created attachment 252395 [details] [review]
tplinker: sync the enabled status between Telepathy and GOA accounts
Comment 48 Debarshi Ray 2013-08-20 12:07:23 UTC
Created attachment 252396 [details] [review]
tplinker: make sure all the TpAccounts have the features we need
Comment 49 Debarshi Ray 2013-08-20 12:09:01 UTC
Created attachment 252397 [details] [review]
tplinker: ignore chat accounts handled by other providers
Comment 50 Debarshi Ray 2013-08-20 12:10:04 UTC
Created attachment 252398 [details] [review]
tplinker: allow to ignore some accounts to make debugging easier
Comment 51 Debarshi Ray 2013-08-20 12:10:51 UTC
Created attachment 252399 [details] [review]
tplinker: cache the protocol and icon names in the key file
Comment 52 Debarshi Ray 2013-08-20 12:13:31 UTC
Created attachment 252400 [details] [review]
daemon: set icon and provider name after building the object
Comment 53 Debarshi Ray 2013-08-20 12:14:17 UTC
Created attachment 252401 [details] [review]
telepathy: return a different provider name based on the IM protocol
Comment 54 Debarshi Ray 2013-08-20 12:15:11 UTC
Created attachment 252402 [details] [review]
telepathy: implement the add_account method
Comment 55 Debarshi Ray 2013-08-20 12:16:38 UTC
Created attachment 252403 [details] [review]
telepathy: implement the refresh_account method
Comment 56 Debarshi Ray 2013-08-20 12:22:18 UTC
Review of attachment 252386 [details] [review]:

::: src/goabackend/goatelepathyfactory.c
@@ +53,3 @@
+  g_return_if_fail (GOA_IS_TELEPATHY_FACTORY (factory));
+
+  return (GoaProvider *) goa_telepathy_provider_new_from_protocol_name (provider_name);

Was there any reason to use a C-style cast instead of GOA_PROVIDER (...) ?
Comment 57 Debarshi Ray 2013-08-20 12:24:08 UTC
Review of attachment 252387 [details] [review]:

Looks good.
Comment 58 Debarshi Ray 2013-08-20 12:31:18 UTC
Review of attachment 252350 [details] [review]:

::: src/goabackend/goaprovider.c
@@ +1040,3 @@
+  /* The extensions are loaded in the reverse order we used in
+   * ensure_builtins_loaded. */
+  g_queue_reverse (&data->ret);

Can't we push_head instead of push_tail and reverse?
Comment 59 Debarshi Ray 2013-08-20 14:48:13 UTC
Review of attachment 252388 [details] [review]:

::: src/daemon/goatpaccountlinker.c
@@ +52,3 @@
+{
+  return g_object_new (GOA_TYPE_TP_ACCOUNT_LINKER, NULL);
+}

The public methods are usually after the GObject boilerplate. Can you move it to the end of the file?

@@ +60,3 @@
+
+  if (priv->goa_client == NULL ||
+      priv->account_manager == NULL ||

Is it really necessary to check priv->account_manager ? It has already been set in goa_tp_account_linker_init.

@@ +127,3 @@
+{
+  G_OBJECT_CLASS (goa_tp_account_linker_parent_class)->finalize (object);
+}

This can be removed.
Comment 60 Debarshi Ray 2013-08-20 14:51:30 UTC
Review of attachment 252389 [details] [review]:

Looks good.
Comment 61 Marco Barisione 2013-08-20 15:01:13 UTC
Comments #23-#26 done.

(In reply to comment #28)
> As a general rule, when allocating fixed-sized structs g_slice_new0() and
> g_slice_free() are better. (Obviously this code is not performance-critical!)

Done.

> @@ +1115,3 @@
> + *
> + * Note that this function will run the default main loop while retrieving
> + * the list of providers.
> 
> Why? For a truly sync operation shouldn't we be creating a new thread default
> context and a running a main loop on it?
> 
> I am guessing that you are doing this to make it user for the GUI. So that it
> can call goa_provider_get_all and not freeze. Can't we just ask the GUI to use
> the async variant in that case?

But we cannot remove the function and I don't particularly like the idea of making that function freeze waiting for something async to happen.
I wanted to deprecate the sync function, but I forgot (and so I also forgot to use the async one in g-c-c). I can do it now if you want.

> ::: src/goabackend/goaprovider.h
> @@ +175,3 @@
>  guint        goa_provider_get_credentials_generation (GoaProvider       
> *provider);
> 
> +GList        *goa_provider_get_all                  (void);
> 
> Should ideally be in a different commit.

Done.

(In reply to comment #31)
> Review of attachment 252352 [details] [review]:
> 
> ::: m4/ax_config_dir.m4
> @@ +1,2 @@
> +dnl Copied from Audacity 1.3.10 which itself is licensed under the GPL v2 or
> +dnl any later version
> 
> Do we need to ask permission for using it in a LGPLv2+ code base?

We actually use this macro in LGPL components. I will check.

(In reply to comment #32)
> Review of attachment 252353 [details] [review]:
> 
> Note that I am no expert on Git submodules. :-)
> 
> ::: autogen.sh
> @@ +28,3 @@
> +cd telepathy-account-widgets
> +sh autogen.sh --no-configure
> +cd ..
> 
> I think this whole snippet can be replaced by:
> git submodule update --init --recursive.
> 
> See gnome-photos for an example.

I changed it to use git submodule update --init --recursive, but the part you quoted in your comment cannot be removed. gnome-photos doesn't use it as libgd doesn't have a configure.ac, just a Makefile.am.

Comments #35-#36 done.

(In reply to comment #37)
> Review of attachment 252359 [details] [review]:
> 
> ::: src/goabackend/goatelepathyprovider.c
> @@ +289,3 @@
> +        GOA_TYPE_TELEPATHY_PROVIDER, GoaTelepathyProviderPrivate);
> +
> +  provider->priv = priv;
> 
> We can assign directly to provider->priv.

Done.

> @@ +302,3 @@
> +    {
> +      if (priv->protocol_name != NULL)
> +        g_error ("You cannot set \"protocol-name\" if you set \"protocol\"");
> 
> You need to g_free (priv->protocol_name), otherwise you will leak it in the
> next line.

I changed it to use git submodule update --init --recursive, but the part you quoted in your comment cannot be removed. gnome-photos doesn't use it as libgd doesn't have a configure.ac, just a Makefile.am.

(In reply to comment #56)
> Review of attachment 252386 [details] [review]:
> 
> ::: src/goabackend/goatelepathyfactory.c
> @@ +53,3 @@
> +  g_return_if_fail (GOA_IS_TELEPATHY_FACTORY (factory));
> +
> +  return (GoaProvider *) goa_telepathy_provider_new_from_protocol_name
> (provider_name);
> 
> Was there any reason to use a C-style cast instead of GOA_PROVIDER (...) ?

Hm, not sure why I did it. Maybe because we are sure it's the right type so there's no need for an extra check. Anyway, I changed it.

(In reply to comment #58)
> Review of attachment 252350 [details] [review]:
> 
> ::: src/goabackend/goaprovider.c
> @@ +1040,3 @@
> +  /* The extensions are loaded in the reverse order we used in
> +   * ensure_builtins_loaded. */
> +  g_queue_reverse (&data->ret);
> 
> Can't we push_head instead of push_tail and reverse?

At first I used a GList, but the code became much simpler using a GQueue. I think I just forgot to change that bit. It's fixed now.
Comment 62 Debarshi Ray 2013-08-20 15:05:23 UTC
Review of attachment 252390 [details] [review]:

::: src/daemon/goatpaccountlinker.c
@@ +272,3 @@
 
+  g_clear_pointer (&priv->goa_accounts, g_hash_table_unref);
+  g_clear_pointer (&priv->goa_accounts, g_hash_table_unref);

One of them should be priv->tp_accounts.
Comment 63 Debarshi Ray 2013-08-20 15:15:43 UTC
(In reply to comment #61)

Thanks a lot for the quick response!

> > @@ +1115,3 @@
> > + *
> > + * Note that this function will run the default main loop while retrieving
> > + * the list of providers.
> > 
> > Why? For a truly sync operation shouldn't we be creating a new thread default
> > context and a running a main loop on it?
> > 
> > I am guessing that you are doing this to make it user for the GUI. So that it
> > can call goa_provider_get_all and not freeze. Can't we just ask the GUI to use
> > the async variant in that case?
> 
> But we cannot remove the function and I don't particularly like the idea of
> making that function freeze waiting for something async to happen.
> I wanted to deprecate the sync function, but I forgot (and so I also forgot to
> use the async one in g-c-c). I can do it now if you want.

There is no urgency to deprecate the sync variant. It can be useful if someone wants to call it from a thread. eg., say someone is implementing a async operation using a *_run_in_thread and wants to use it there. That is why it should be wrapped around a new thread default context so that is a real sync operation.

However, if g-c-c is using it from the main thread then it should be using the async variant.

> > ::: m4/ax_config_dir.m4
> > @@ +1,2 @@
> > +dnl Copied from Audacity 1.3.10 which itself is licensed under the GPL v2 or
> > +dnl any later version
> > 
> > Do we need to ask permission for using it in a LGPLv2+ code base?
> 
> We actually use this macro in LGPL components. I will check.

Ok.

> > ::: autogen.sh
> > @@ +28,3 @@
> > +cd telepathy-account-widgets
> > +sh autogen.sh --no-configure
> > +cd ..
> > 
> > I think this whole snippet can be replaced by:
> > git submodule update --init --recursive.
> > 
> > See gnome-photos for an example.
> 
> I changed it to use git submodule update --init --recursive, but the part you
> quoted in your comment cannot be removed. gnome-photos doesn't use it as libgd
> doesn't have a configure.ac, just a Makefile.am.

Ok.
Comment 64 Marco Barisione 2013-08-20 16:01:04 UTC
(In reply to comment #31)
> Review of attachment 252352 [details] [review]:
> 
> ::: m4/ax_config_dir.m4
> @@ +1,2 @@
> +dnl Copied from Audacity 1.3.10 which itself is licensed under the GPL v2 or
> +dnl any later version
> 
> Do we need to ask permission for using it in a LGPLv2+ code base?

It doesn't matter because the m4 file doesn't end up in the binary, is not distributed with the compiled software and is not installed.
Just distributing it together with the source is fine according to the GPL (search for mere aggregation in the GPL text).
Comment 65 Marco Barisione 2013-08-20 17:47:24 UTC
(In reply to comment #59)
> Review of attachment 252388 [details] [review]:
>
> The public methods are usually after the GObject boilerplate. Can you move it
> to the end of the file?

Done.

> @@ +60,3 @@
> +
> +  if (priv->goa_client == NULL ||
> +      priv->account_manager == NULL ||
> 
> Is it really necessary to check priv->account_manager ? It has already been set
> in goa_tp_account_linker_init.

tp_account_manager_dup() could in theory fail and return NULL.

> @@ +127,3 @@
> +{
> +  G_OBJECT_CLASS (goa_tp_account_linker_parent_class)->finalize (object);
> +}
> 
> This can be removed.

Done.

(In reply to comment #62)
> Review of attachment 252390 [details] [review]:
> 
> ::: src/daemon/goatpaccountlinker.c
> @@ +272,3 @@
> 
> +  g_clear_pointer (&priv->goa_accounts, g_hash_table_unref);
> +  g_clear_pointer (&priv->goa_accounts, g_hash_table_unref);
> 
> One of them should be priv->tp_accounts.

Done.
Comment 66 Debarshi Ray 2013-08-20 19:40:35 UTC
Review of attachment 252391 [details] [review]:

Looks good.
Comment 67 Debarshi Ray 2013-08-20 19:49:13 UTC
Review of attachment 252392 [details] [review]:

Looks good. Thanks for putting those comments.
Comment 68 Debarshi Ray 2013-08-20 20:04:42 UTC
Review of attachment 252393 [details] [review]:

::: src/daemon/goatpaccountlinker.c
@@ +387,3 @@
+              NULL, /* cancellable */
+              NULL, /* callback */
+              NULL); /* user data */

Can't we pass goa_account_removed_by_us_cb as the callback? Might be useful for debugging.
Comment 69 Debarshi Ray 2013-08-20 20:19:27 UTC
Review of attachment 252395 [details] [review]:

::: src/daemon/goatpaccountlinker.c
@@ +104,3 @@
+  goa_enabled = !goa_account_get_chat_disabled (goa_account);
+
+  tp_enabled = tp_account_is_enabled (tp_account);

You can consider removing the empty newline to make it consistent with tp_account_chat_enabled_changed_cb.

@@ +147,3 @@
+      priv->block_goa_account_chat_disabled_changed = TRUE;
+      goa_account_set_chat_disabled (goa_account, !tp_enabled);
+      priv->block_goa_account_chat_disabled_changed = FALSE;

Why not use g_signal_handlers_block_by_func instead?
Comment 70 Debarshi Ray 2013-08-20 20:26:28 UTC
Review of attachment 252396 [details] [review]:

::: src/daemon/goatpaccountlinker.c
@@ +543,3 @@
+
+  initialized = TRUE;
+

Here is a crazy idea: what about calling this from class_init?
Comment 71 Debarshi Ray 2013-08-20 20:28:51 UTC
Review of attachment 252397 [details] [review]:

Looks good.
Comment 72 Debarshi Ray 2013-08-20 20:40:07 UTC
Review of attachment 252398 [details] [review]:

Looks good.
Comment 73 Marco Barisione 2013-08-21 08:53:52 UTC
(In reply to comment #68)
> Can't we pass goa_account_removed_by_us_cb as the callback? Might be useful for
> debugging.

Done.

(In reply to comment #69)
> Review of attachment 252395 [details] [review]:
> 
> You can consider removing the empty newline to make it consistent with
> tp_account_chat_enabled_changed_cb.

Done.

> @@ +147,3 @@
> +      priv->block_goa_account_chat_disabled_changed = TRUE;
> +      goa_account_set_chat_disabled (goa_account, !tp_enabled);
> +      priv->block_goa_account_chat_disabled_changed = FALSE;
> 
> Why not use g_signal_handlers_block_by_func instead?

Hm, I thought there was a reason for that, but it works with g_signal_handlers_block_by_func(). Fixed.

(In reply to comment #70)
> Review of attachment 252396 [details] [review]:
> 
> Here is a crazy idea: what about calling this from class_init?

Done.
Comment 74 Debarshi Ray 2013-08-21 09:15:24 UTC
Review of attachment 252399 [details] [review]:

Looks good.
Comment 75 Debarshi Ray 2013-08-21 09:41:23 UTC
Review of attachment 252400 [details] [review]:

Looks good.
Comment 76 Debarshi Ray 2013-08-21 09:44:13 UTC
Review of attachment 252399 [details] [review]:

Oh, wait a minute. Can the values in the key file be really different from the one that we can get from TpawProtocol? Maybe I am missing something.
Comment 77 Debarshi Ray 2013-08-21 09:46:49 UTC
Review of attachment 252401 [details] [review]:

::: src/goabackend/goatelepathyprovider.c
@@ +108,1 @@
 

Can the value from the key file be really different from the one from TpawProtocol. (The value in the key file seems to be coming from TpAccount.)
Comment 78 Marco Barisione 2013-08-21 10:08:52 UTC
(In reply to comment #76)
> Review of attachment 252399 [details] [review]:
> 
> Oh, wait a minute. Can the values in the key file be really different from the
> one that we can get from TpawProtocol? Maybe I am missing something.

The provider get the TpawProtocol only if it's instantiated when creating a new account. That is, g-c-c is going to get GOA to create the provider with goa_telepathy_provider_new_from_protocol().

In the daemon, the providers are loaded from the key file and instantiated with goa_telepathy_provider_new_from_protocol_name(). So there is no TpawProtocol around.
Comment 79 Debarshi Ray 2013-08-21 11:00:11 UTC
Review of attachment 252402 [details] [review]:

Looks good.
Comment 80 Debarshi Ray 2013-08-21 11:01:18 UTC
Review of attachment 252403 [details] [review]:

Looks good.
Comment 81 Debarshi Ray 2013-08-21 11:02:28 UTC
Created attachment 252525 [details] [review]
telepathy: add a button to change the connection parameters
Comment 82 Debarshi Ray 2013-08-21 11:03:11 UTC
Created attachment 252526 [details] [review]
telepathy: add a button to edit personal information
Comment 83 Debarshi Ray 2013-08-21 11:03:56 UTC
Created attachment 252527 [details] [review]
telepathyfactory: filter out Google Talk and Facebook
Comment 84 Debarshi Ray 2013-08-21 11:05:13 UTC
Created attachment 252528 [details] [review]
utils: add goa_utils_init_icon_paths()
Comment 85 Debarshi Ray 2013-08-21 11:05:56 UTC
Created attachment 252529 [details] [review]
provider: initialise the icon paths in _init()
Comment 86 Debarshi Ray 2013-08-21 11:06:33 UTC
Created attachment 252531 [details] [review]
daemon: initialise the icon paths
Comment 87 Debarshi Ray 2013-08-21 11:07:02 UTC
Created attachment 252532 [details] [review]
telepathy: implement get_provider_icon()
Comment 88 Debarshi Ray 2013-08-21 11:11:07 UTC
Review of attachment 252525 [details] [review]:

Looks good to me, assuming that the designers are fine with it.
Comment 89 Marco Barisione 2013-08-21 11:11:32 UTC
(In reply to comment #63)
> There is no urgency to deprecate the sync variant. It can be useful if someone
> wants to call it from a thread. eg., say someone is implementing a async
> operation using a *_run_in_thread and wants to use it there. That is why it
> should be wrapped around a new thread default context so that is a real sync
> operation.

Fixed in http://cgit.collabora.com/git/user/bari/gnome-online-accounts.git/commit/?id=2bcde555da1b4f3acdba773fd8542df9a8fcdbf8
Comment 90 Debarshi Ray 2013-08-21 11:12:38 UTC
Review of attachment 252526 [details] [review]:

Looks good to me, assuming that the designers are happy with it.
Comment 91 Debarshi Ray 2013-08-21 11:27:08 UTC
Review of attachment 252527 [details] [review]:

::: src/goabackend/goatelepathyfactory.c
@@ +85,3 @@
 
+  facebook_quark = g_quark_from_static_string ("facebook");
+  google_talk_quark = g_quark_from_static_string ("google-talk");

I wonder if we can avoid keeping this list updated manually. eg., I like the way we check based on the storage for incoming TpAccounts.

This is not a blocker. :-)
Comment 92 Debarshi Ray 2013-08-21 11:52:37 UTC
Review of attachment 252529 [details] [review]:

I think the 3 goa_utils_init_icon_paths patches can be squashed together. They are small enough and should still be easily understandable.

::: src/goabackend/goaprovider.c
@@ +152,3 @@
+  /* Make sure that the icon paths are initialized so that
+   * goa_provider_get_provider_icon() will always work */
+  goa_utils_init_icon_paths ();

What about moving it to the class_init?

Isn't there something called a shared library constructor? Can't we do it from the constructor of libgoabacked.so? Upto you.
Comment 93 Debarshi Ray 2013-08-21 11:53:48 UTC
Review of attachment 252528 [details] [review]:

See previous comment.
Comment 94 Debarshi Ray 2013-08-21 11:54:33 UTC
Review of attachment 252531 [details] [review]:

See previous comment.
Comment 95 Debarshi Ray 2013-08-21 11:55:26 UTC
Review of attachment 252532 [details] [review]:

Looks good.
Comment 96 Debarshi Ray 2013-08-21 12:02:24 UTC
Review of attachment 252527 [details] [review]:

::: src/goabackend/goatelepathyfactory.c
@@ +106,3 @@
+#endif
+
+      provider = goa_telepathy_provider_new_from_protocol (l->data);

Should be "protocol" instead of "l->data".
Comment 97 Debarshi Ray 2013-08-21 12:27:51 UTC
(In reply to comment #78)
> (In reply to comment #76)
> > Review of attachment 252399 [details] [review] [details]:
> > 
> > Oh, wait a minute. Can the values in the key file be really different from the
> > one that we can get from TpawProtocol? Maybe I am missing something.
> 
> The provider get the TpawProtocol only if it's instantiated when creating a new
> account. That is, g-c-c is going to get GOA to create the provider with
> goa_telepathy_provider_new_from_protocol().
> 
> In the daemon, the providers are loaded from the key file and instantiated with
> goa_telepathy_provider_new_from_protocol_name(). So there is no TpawProtocol
> around.

I see. Am I right in understanding that either priv->protocol or priv->protocol_name is valid in GoaTelepathyProvider? So without the entry in the key file and a TpawProtocol, we will atleast have priv->protocol_name to fallback on.

Do we actually have a case where the service-specific icon is not the same as the protocol icon? Or are we just trying to guard against the future? We already have native GOA providers for things where this could be a problem -- Google / Facebook vs Jabber. Is there anything else?

I am trying to avoid adding yet another (we already had some, which should be fixed) call to g_key_file_load_from_file from a sync method that can be running in the main thread unless it is really important.
Comment 98 Debarshi Ray 2013-08-21 13:46:10 UTC
Review of attachment 252352 [details] [review]:

Changing the status to ACN based on Marco's reply.
Comment 99 Marco Barisione 2013-08-21 13:50:10 UTC
(In reply to comment #91)
> Review of attachment 252527 [details] [review]:
> 
> ::: src/goabackend/goatelepathyfactory.c
> @@ +85,3 @@
> 
> +  facebook_quark = g_quark_from_static_string ("facebook");
> +  google_talk_quark = g_quark_from_static_string ("google-talk");
> 
> I wonder if we can avoid keeping this list updated manually. eg., I like the
> way we check based on the storage for incoming TpAccounts.

Hm, I don't think so. I have no ideas at the moment.

(In reply to comment #92)
> Review of attachment 252529 [details] [review]:
> 
> I think the 3 goa_utils_init_icon_paths patches can be squashed together. They
> are small enough and should still be easily understandable.

Ok.

> ::: src/goabackend/goaprovider.c
> @@ +152,3 @@
> +  /* Make sure that the icon paths are initialized so that
> +   * goa_provider_get_provider_icon() will always work */
> +  goa_utils_init_icon_paths ();
> 
> What about moving it to the class_init?
>
> Isn't there something called a shared library constructor? Can't we do it from
> the constructor of libgoabacked.so? Upto you.

For now I haven't move it. I will just check if you can have functions called when loading a shared library, but I have no idea if it's possible (why would lots of libraries have _init() functions if it were possible?).

(In reply to comment #96)
> Review of attachment 252527 [details] [review]:
> 
> ::: src/goabackend/goatelepathyfactory.c
> @@ +106,3 @@
> +#endif
> +
> +      provider = goa_telepathy_provider_new_from_protocol (l->data);
> 
> Should be "protocol" instead of "l->data".

Done.

(In reply to comment #97)
> I see. Am I right in understanding that either priv->protocol or
> priv->protocol_name is valid in GoaTelepathyProvider? So without the entry in
> the key file and a TpawProtocol, we will atleast have priv->protocol_name to
> fallback on.

Almost. protocol_name is always valid; the _constructed method sets priv->protocol_name from priv->protocol.

> Do we actually have a case where the service-specific icon is not the same as
> the protocol icon? Or are we just trying to guard against the future? We
> already have native GOA providers for things where this could be a problem --
> Google / Facebook vs Jabber. Is there anything else?

The main cases are Google and Facebook, but we filter those.
It would be possible that Facebook or Google show up in the list if GOA was compiled with those disabled.

> I am trying to avoid adding yet another (we already had some, which should be
> fixed) call to g_key_file_load_from_file from a sync method that can be running
> in the main thread unless it is really important.

Hm, I will think about it.
Comment 100 Marco Barisione 2013-08-21 14:01:14 UTC
Created attachment 252559 [details] [review]
daemon: avoid ID collisions if accounts are created in the same second
Comment 101 Marco Barisione 2013-08-21 14:01:20 UTC
Created attachment 252560 [details] [review]
providerfactory: add abstract class to create providers dynamically
Comment 102 Marco Barisione 2013-08-21 14:01:25 UTC
Created attachment 252561 [details] [review]
provider: add an extension point for GoaProviderFactory implementations
Comment 103 Marco Barisione 2013-08-21 14:01:30 UTC
Created attachment 252562 [details] [review]
provider: make goa_provider_get_for_provider_type() handle factories too
Comment 104 Marco Barisione 2013-08-21 14:01:35 UTC
Created attachment 252563 [details] [review]
provider: check that provider_type is not NULL in get_for_provider_type()
Comment 105 Marco Barisione 2013-08-21 14:01:48 UTC
Created attachment 252564 [details] [review]
provider: add goa_provider_get_all_async() and _finish()

This also reimplements goa_provider_get_all() to use
goa_provider_get_all_async().
Comment 106 Marco Barisione 2013-08-21 14:01:53 UTC
Created attachment 252565 [details] [review]
provider: style: align the declaration of _get_all() with the others
Comment 107 Marco Barisione 2013-08-21 14:01:58 UTC
Created attachment 252566 [details] [review]
provider: add GOA_PROVIDER_GROUP_CHAT
Comment 108 Marco Barisione 2013-08-21 14:02:04 UTC
Created attachment 252567 [details] [review]
build: add m4/ax_config_dir.m4 for the AX_CONFIG_DIR() function
Comment 109 Marco Barisione 2013-08-21 14:02:09 UTC
Created attachment 252568 [details] [review]
build: add the telepathy-account-widgets submodule
Comment 110 Marco Barisione 2013-08-21 14:02:15 UTC
Created attachment 252569 [details] [review]
build: use Telepathy's libraries in goabackend
Comment 111 Marco Barisione 2013-08-21 14:02:19 UTC
Created attachment 252570 [details] [review]
telepathy: add a stub for the Telepathy provider
Comment 112 Marco Barisione 2013-08-21 14:02:24 UTC
Created attachment 252571 [details] [review]
telepathy: implement build_object
Comment 113 Marco Barisione 2013-08-21 14:02:30 UTC
Created attachment 252572 [details] [review]
telepathy: add a switch to enable/disable chat
Comment 114 Marco Barisione 2013-08-21 14:02:35 UTC
Created attachment 252573 [details] [review]
POTFILES.in: add goatelepathyprovider.c
Comment 115 Marco Barisione 2013-08-21 14:02:41 UTC
Created attachment 252574 [details] [review]
telepathy: add methods to instantiate the provider with the right values
Comment 116 Marco Barisione 2013-08-21 14:02:46 UTC
Created attachment 252575 [details] [review]
telepathy: implement get_provider_type() correctly
Comment 117 Marco Barisione 2013-08-21 14:02:52 UTC
Created attachment 252576 [details] [review]
telepathyfactory: add GoaProviderFactory for dynamic Telepathy providers
Comment 118 Marco Barisione 2013-08-21 14:02:57 UTC
Created attachment 252577 [details] [review]
provider: initialise the Telepathy provider factory
Comment 119 Marco Barisione 2013-08-21 14:03:02 UTC
Created attachment 252578 [details] [review]
tplinker: add a stub for GoaTpAccountLinker
Comment 120 Marco Barisione 2013-08-21 14:03:08 UTC
Created attachment 252579 [details] [review]
daemon: start the Telepathy linker when we acquire the bus name
Comment 121 Marco Barisione 2013-08-21 14:03:13 UTC
Created attachment 252580 [details] [review]
tplinker: keep track of both GOA and Telepathy accounts
Comment 122 Marco Barisione 2013-08-21 14:03:19 UTC
Created attachment 252581 [details] [review]
tplinker: create GOA accounts for new Telepathy accounts
Comment 123 Marco Barisione 2013-08-21 14:03:24 UTC
Created attachment 252582 [details] [review]
tplinker: handle deletion of both GOA and Telepathy accounts
Comment 124 Marco Barisione 2013-08-21 14:03:30 UTC
Created attachment 252583 [details] [review]
tplinker: check for GOA accounts with no corresponding Telepathy account

A Telepathy account could be deleted while goa-daemon is not running, so
we need to check for that and delete the GOA account too.
Comment 125 Marco Barisione 2013-08-21 14:03:35 UTC
Created attachment 252584 [details] [review]
tplinker: sync the enabled status between Telepathy and GOA accounts
Comment 126 Marco Barisione 2013-08-21 14:03:41 UTC
Created attachment 252585 [details] [review]
tplinker: make sure all the TpAccounts have the features we need
Comment 127 Marco Barisione 2013-08-21 14:03:47 UTC
Created attachment 252586 [details] [review]
tplinker: ignore chat accounts handled by other providers

We don't want chat accounts handled by other providers (like Facebook or
Google ones) to appear twice, once through the “telepathy” provider and
once through the service-specific one.
Comment 128 Marco Barisione 2013-08-21 14:03:52 UTC
Created attachment 252587 [details] [review]
tplinker: allow to ignore some accounts to make debugging easier

If $GOA_TELEPATHY_DEBUG_ACCOUNT_FILTER is set then only accounts
containing that string in their ID are handled.
Comment 129 Marco Barisione 2013-08-21 14:03:58 UTC
Created attachment 252588 [details] [review]
tplinker: cache the protocol and icon names in the key file
Comment 130 Marco Barisione 2013-08-21 14:04:04 UTC
Created attachment 252589 [details] [review]
daemon: set icon and provider name after building the object

If provider name and type can change based on the GoaObject, but, if the
methods are called before the object is built, there is no way to do
anything useful.
Comment 131 Marco Barisione 2013-08-21 14:04:09 UTC
Created attachment 252590 [details] [review]
telepathy: return a different provider name based on the IM protocol
Comment 132 Marco Barisione 2013-08-21 14:04:15 UTC
Created attachment 252591 [details] [review]
telepathy: implement the add_account method
Comment 133 Marco Barisione 2013-08-21 14:04:20 UTC
Created attachment 252592 [details] [review]
telepathy: implement the refresh_account method
Comment 134 Marco Barisione 2013-08-21 14:04:26 UTC
Created attachment 252594 [details] [review]
telepathy: add a button to change the connection parameters
Comment 135 Marco Barisione 2013-08-21 14:04:31 UTC
Created attachment 252595 [details] [review]
telepathy: add a button to edit personal information
Comment 136 Marco Barisione 2013-08-21 14:04:37 UTC
Created attachment 252596 [details] [review]
telepathyfactory: filter out Google Talk and Facebook
Comment 137 Marco Barisione 2013-08-21 14:04:43 UTC
Created attachment 252597 [details] [review]
utils: add goa_utils_init_icon_paths()
Comment 138 Marco Barisione 2013-08-21 14:04:49 UTC
Created attachment 252598 [details] [review]
telepathy: implement get_provider_icon()
Comment 139 Marco Barisione 2013-08-21 14:04:55 UTC
Created attachment 252599 [details] [review]
DO NOT MERGE! WIP to fixup with: tplinker: sync the enabled status between Telepathy and GOA accounts

== WORK IN PROGRESS, THIS NEEDS TO BE SQUASHED ==

Rishi, I left this patch not squashed with the "sync the enabled
status..." one so you can take a look at it separately before I squash
it.
This fixes a small bug I haven't noticed before as it depends on some
timings that can vary.
Comment 140 Marco Barisione 2013-08-21 14:05:00 UTC
Created attachment 252600 [details] [review]
DO NOT MERGE: fixup! telepathy: add a button to change the connection parameters
Comment 141 Marco Barisione 2013-08-21 14:05:06 UTC
Created attachment 252601 [details] [review]
DO NOT MERGE: squash! telepathy: add a button to edit personal information
Comment 142 Emanuele Aina 2013-08-21 14:35:44 UTC
(In reply to comment #99)

> > What about moving it to the class_init?
> >
> > Isn't there something called a shared library constructor? Can't we do it from
> > the constructor of libgoabacked.so? Upto you.
> 
> For now I haven't move it. I will just check if you can have functions called
> when loading a shared library, but I have no idea if it's possible (why would
> lots of libraries have _init() functions if it were possible?).

Yes, it's possible, and that's why g_type_init() has been deprecated.

This does not mean that it is going to be simple, as the G_DEFINE_CONSTRUCTOR() macro is not exported by GLib as it may need compiler-by-compiler adaptations:

For reference, here is how GType uses it:
https://git.gnome.org/browse/glib/tree/gobject/gtype.c#n4309

And here's the commit that introduce the macro:
https://git.gnome.org/browse/glib/commit/?id=968f4e8d
Comment 143 Debarshi Ray 2013-08-21 14:50:04 UTC
Review of attachment 252559 [details] [review]:

Looks good.
Comment 144 Debarshi Ray 2013-08-21 14:53:12 UTC
Comment on attachment 252559 [details] [review]
daemon: avoid ID collisions if accounts are created in the same second

Looks good.
Comment 145 Marco Barisione 2013-08-21 14:53:46 UTC
Created attachment 252607 [details] [review]
utils: add goa_utils_init_icon_paths()
Comment 146 Debarshi Ray 2013-08-21 14:54:53 UTC
Comment on attachment 252560 [details] [review]
providerfactory: add abstract class to create providers dynamically

Looks good.
Comment 147 Marco Barisione 2013-08-21 14:55:26 UTC
(In reply to comment #142)
> Yes, it's possible, and that's why g_type_init() has been deprecated.
> 
> This does not mean that it is going to be simple, as the G_DEFINE_CONSTRUCTOR()
> macro is not exported by GLib as it may need compiler-by-compiler adaptations:

Ok, then I just moved the call to _class_init :)
Comment 148 Debarshi Ray 2013-08-21 14:56:03 UTC
Comment on attachment 252561 [details] [review]
provider: add an extension point for GoaProviderFactory implementations

Looks good. Unchanged from last round.
Comment 149 Debarshi Ray 2013-08-21 14:57:11 UTC
Comment on attachment 252562 [details] [review]
provider: make goa_provider_get_for_provider_type() handle factories too

Looks good.
Comment 150 Debarshi Ray 2013-08-21 14:57:43 UTC
Comment on attachment 252563 [details] [review]
provider: check that provider_type is not NULL in get_for_provider_type()

Looks good.
Comment 151 Debarshi Ray 2013-08-21 14:59:16 UTC
Comment on attachment 252564 [details] [review]
provider: add goa_provider_get_all_async() and _finish()

Looks good.
Comment 152 Debarshi Ray 2013-08-21 15:00:21 UTC
Comment on attachment 252565 [details] [review]
provider: style: align the declaration of _get_all() with the others

Looks good.
Comment 153 Debarshi Ray 2013-08-21 15:01:03 UTC
Comment on attachment 252566 [details] [review]
provider: add GOA_PROVIDER_GROUP_CHAT

Looks good. Unchanged from the last round.
Comment 154 Debarshi Ray 2013-08-21 15:01:50 UTC
Comment on attachment 252567 [details] [review]
build: add m4/ax_config_dir.m4 for the AX_CONFIG_DIR() function

Looks good. Unchanged from the last round.
Comment 155 Debarshi Ray 2013-08-21 15:02:34 UTC
Comment on attachment 252568 [details] [review]
build: add the telepathy-account-widgets submodule

Looks good.
Comment 156 Debarshi Ray 2013-08-21 15:03:19 UTC
Comment on attachment 252569 [details] [review]
build: use Telepathy's libraries in goabackend

Looks good. Unchanged from the last round.
Comment 157 Debarshi Ray 2013-08-21 15:04:02 UTC
Comment on attachment 252570 [details] [review]
telepathy: add a stub for the Telepathy provider

Looks good. Unchanged from the last round.
Comment 158 Debarshi Ray 2013-08-21 15:05:05 UTC
Comment on attachment 252571 [details] [review]
telepathy: implement build_object

Looks good.
Comment 159 Debarshi Ray 2013-08-21 15:06:50 UTC
Comment on attachment 252572 [details] [review]
telepathy: add a switch to enable/disable chat

Looks good.
Comment 160 Debarshi Ray 2013-08-21 15:07:17 UTC
Comment on attachment 252573 [details] [review]
POTFILES.in: add goatelepathyprovider.c

Looks good.
Comment 161 Debarshi Ray 2013-08-21 15:11:49 UTC
Review of attachment 252574 [details] [review]:

You forgot one small bit from the last review. :-)

::: src/goabackend/goatelepathyprovider.c
@@ +304,3 @@
+    {
+      if (priv->protocol_name != NULL)
+        g_error ("You cannot set \"protocol-name\" if you set \"protocol\"");

You need to g_free (priv->protocol_name), otherwise you will leak it in the next line.
Comment 162 Debarshi Ray 2013-08-21 15:13:12 UTC
Comment on attachment 252575 [details] [review]
telepathy: implement get_provider_type() correctly

Looks good.
Comment 163 Debarshi Ray 2013-08-21 15:15:11 UTC
Comment on attachment 252576 [details] [review]
telepathyfactory: add GoaProviderFactory for dynamic Telepathy providers

Looks good.
Comment 164 Debarshi Ray 2013-08-21 15:16:00 UTC
Comment on attachment 252577 [details] [review]
provider: initialise the Telepathy provider factory

Looks good. Unchanged from the last round.
Comment 165 Debarshi Ray 2013-08-21 15:17:14 UTC
Comment on attachment 252578 [details] [review]
tplinker: add a stub for GoaTpAccountLinker

Looks good.
Comment 166 Debarshi Ray 2013-08-21 15:18:32 UTC
Comment on attachment 252579 [details] [review]
daemon: start the Telepathy linker when we acquire the bus name

Looks good. Unchanged from the last round.
Comment 167 Debarshi Ray 2013-08-21 15:19:36 UTC
Comment on attachment 252580 [details] [review]
tplinker: keep track of both GOA and Telepathy accounts

Looks good.
Comment 168 Debarshi Ray 2013-08-21 15:20:39 UTC
Comment on attachment 252581 [details] [review]
tplinker: create GOA accounts for new Telepathy accounts

Looks good.
Comment 169 Debarshi Ray 2013-08-21 15:21:15 UTC
Comment on attachment 252582 [details] [review]
tplinker: handle deletion of both GOA and Telepathy accounts

Looks good. Unchanged from the last round.
Comment 170 Debarshi Ray 2013-08-21 15:21:53 UTC
Comment on attachment 252583 [details] [review]
tplinker: check for GOA accounts with no corresponding Telepathy account

Looks good.
Comment 171 Debarshi Ray 2013-08-21 15:23:11 UTC
Comment on attachment 252584 [details] [review]
tplinker: sync the enabled status between Telepathy and GOA accounts

Looks good.
Comment 172 Debarshi Ray 2013-08-21 15:24:00 UTC
Comment on attachment 252585 [details] [review]
tplinker: make sure all the TpAccounts have the features we need

Looks good.
Comment 173 Debarshi Ray 2013-08-21 15:24:47 UTC
Comment on attachment 252586 [details] [review]
tplinker: ignore chat accounts handled by other providers

Looks good. Unchanged from the last round.
Comment 174 Debarshi Ray 2013-08-21 15:25:31 UTC
Comment on attachment 252587 [details] [review]
tplinker: allow to ignore some accounts to make debugging easier

Looks good. Unchanged from the last round.
Comment 175 Debarshi Ray 2013-08-21 15:30:57 UTC
(In reply to comment #99)
> > Do we actually have a case where the service-specific icon is not the same as
> > the protocol icon? Or are we just trying to guard against the future? We
> > already have native GOA providers for things where this could be a problem --
> > Google / Facebook vs Jabber. Is there anything else?
> 
> The main cases are Google and Facebook, but we filter those.
> It would be possible that Facebook or Google show up in the list if GOA was
> compiled with those disabled.

We can ignore that case.

- If the distributor really wanted to disable Google and Facebook integration, it would have disabled them in Telepathy too so they don't show up.

- If it is just someone who is playing with the compile-time options in GOA, then he/she can live with non-ideal icons.
Comment 176 Debarshi Ray 2013-08-21 15:38:16 UTC
Review of attachment 252588 [details] [review]:

There is a pending issue from the last round.

::: src/daemon/goatpaccountlinker.c
@@ +187,3 @@
+      tp_account_get_protocol_name (tp_account));
+  g_variant_builder_add (&details, "{ss}", "IconName",
+      tp_account_get_icon_name (tp_account));

I think we should not keep them in the key file because I haven't seen a case where the values guessed from the protocol_name are so bad that they will confuse the user.

Historically, the 2nd GoaObject parameter was added to get_provider_icon and get_provider_name to possibly differentiate between ordinary Google accounts and Google Apps accounts. However we never did that, so they have remained unused.
Comment 177 Debarshi Ray 2013-08-21 15:39:34 UTC
Comment on attachment 252589 [details] [review]
daemon: set icon and provider name after building the object

Looks good. Unchanged from the last round.
Comment 178 Debarshi Ray 2013-08-21 15:43:32 UTC
Review of attachment 252590 [details] [review]:

There is a pending issue from the last round.

::: src/goabackend/goatelepathyprovider.c
@@ +105,3 @@
+          return ret;
+        }
+    }

I think we should simplify this to:
  return g_strdup (tpaw_protocol_name_to_display_name (priv->protocol_name));
Comment 179 Debarshi Ray 2013-08-21 15:44:41 UTC
Comment on attachment 252591 [details] [review]
telepathy: implement the add_account method

Looks good. Unchanged from the last round.
Comment 180 Debarshi Ray 2013-08-21 15:45:22 UTC
Comment on attachment 252592 [details] [review]
telepathy: implement the refresh_account method

Looks good. Unchanged from the last round.
Comment 181 Debarshi Ray 2013-08-21 15:46:51 UTC
Comment on attachment 252594 [details] [review]
telepathy: add a button to change the connection parameters

Looks good. Unchanged from the last round.
Comment 182 Debarshi Ray 2013-08-21 15:47:25 UTC
Comment on attachment 252595 [details] [review]
telepathy: add a button to edit personal information

Looks good. Unchanged from the last round.
Comment 183 Debarshi Ray 2013-08-21 15:51:45 UTC
Comment on attachment 252596 [details] [review]
telepathyfactory: filter out Google Talk and Facebook

Looks good.
Comment 184 Debarshi Ray 2013-08-21 15:55:12 UTC
Review of attachment 252598 [details] [review]:

::: src/goabackend/goatelepathyprovider.c
@@ +251,3 @@
+  else
+    return tpaw_protocol_icon_name (priv->protocol_name);
+}

This is the same issue about whether we should be keeping IconName in the key file or not. I think we shouldn't and this should be simply:
  return tpaw_protocol_icon_name (priv->protocol_name);
Comment 185 Debarshi Ray 2013-08-21 15:57:41 UTC
Comment on attachment 252607 [details] [review]
utils: add goa_utils_init_icon_paths()

Looks good.
Comment 186 Debarshi Ray 2013-08-21 15:59:42 UTC
Review of attachment 252599 [details] [review]:

Ok, fine. Feel free to squash it.
Comment 187 Debarshi Ray 2013-08-21 16:01:02 UTC
Review of attachment 252600 [details] [review]:

Ok, fine. Feel free to squash it.
Comment 188 Debarshi Ray 2013-08-21 16:01:54 UTC
Review of attachment 252601 [details] [review]:

Ok, fine. Feel free to squash it.
Comment 189 Debarshi Ray 2013-08-21 16:25:49 UTC
Review of attachment 252574 [details] [review]:

Oh, sorry. That is a g_error which will abort the process.
Comment 190 Marco Barisione 2013-08-21 16:26:21 UTC
Created attachment 252623 [details] [review]
telepathy: return a different provider name based on the IM protocol
Comment 191 Marco Barisione 2013-08-21 16:29:17 UTC
Created attachment 252625 [details] [review]
telepathy: implement get_provider_icon()
Comment 192 Marco Barisione 2013-08-21 16:39:06 UTC
Created attachment 252627 [details] [review]
telepathy: implement get_provider_icon()
Comment 193 Marco Barisione 2013-08-21 16:41:14 UTC
Created attachment 252628 [details] [review]
POTFILES.skip: ignore files in telepathy-account-widgets/
Comment 194 Debarshi Ray 2013-08-21 16:44:47 UTC
Review of attachment 252623 [details] [review]:

Looks good.
Comment 195 Debarshi Ray 2013-08-21 16:45:34 UTC
Review of attachment 252627 [details] [review]:

Looks good.
Comment 196 Debarshi Ray 2013-08-21 16:46:27 UTC
Review of attachment 252628 [details] [review]:

Nice. I wouldn't have thought of that.
Comment 197 Marco Barisione 2013-08-21 18:00:33 UTC
Created attachment 252637 [details] [review]
goadaemon: use goa_provider_get_all_async() instead of the sync version
Comment 198 Marco Barisione 2013-08-21 18:04:33 UTC
Created attachment 252638 [details] [review]
goadaemon: use goa_provider_get_all_async() instead of the sync version
Comment 199 Marco Barisione 2013-08-22 13:24:53 UTC
Created attachment 252733 [details] [review]
configure.ac: pass --with-icondir to tpaw's configure
Comment 200 Marco Barisione 2013-08-22 13:25:04 UTC
Created attachment 252734 [details] [review]
configure.ac: pass --with-gettext-package to tpaw's configure
Comment 201 Marco Barisione 2013-08-22 13:25:10 UTC
Created attachment 252735 [details] [review]
WIP! fixup! telepathy: implement the add_account method

Rishi, this makes the UI look more like Allan wants it.
Comment 202 Marco Barisione 2013-08-22 13:25:16 UTC
Created attachment 252736 [details] [review]
telepathy: improve the spacing in the various dialogs
Comment 203 Marco Barisione 2013-08-22 13:25:23 UTC
Created attachment 252737 [details] [review]
telepathy: add a hack to avoid the personal details dialog from moving

The personal details dialog loads its content asynchronously and then
adapts its size to the content. This means that sometimes you can see
the dialog moving after the content is loaded.

This hack just adds a small timeout (not noticeable by the user) to hide
the problem. The is no guarantee that the timeout is long enough, but it
should be enough for most users (and a longer timeout would be
noticeable by the user).

In a future version we should add a way for the user info panel to
signal us when the content is loaded. Alternatively we could create the
panel when an account is selected, before the user clicks on the
"Personal details" button.
Comment 204 Debarshi Ray 2013-08-22 13:41:41 UTC
Review of attachment 252638 [details] [review]:

Looks good.
Comment 205 Debarshi Ray 2013-08-22 13:45:29 UTC
Review of attachment 252733 [details] [review]:

Looks good.
Comment 206 Debarshi Ray 2013-08-22 13:46:25 UTC
Review of attachment 252734 [details] [review]:

Looks good.
Comment 207 Marco Barisione 2013-08-22 13:47:42 UTC
Created attachment 252748 [details] [review]
provider: make goa_provider_get_all() async
Comment 208 Debarshi Ray 2013-08-22 13:49:02 UTC
Review of attachment 252735 [details] [review]:

Ok, fine. You can squash it now.
Comment 209 Debarshi Ray 2013-08-22 13:50:22 UTC
Review of attachment 252736 [details] [review]:

Looks good.
Comment 210 Debarshi Ray 2013-08-22 13:54:21 UTC
Review of attachment 252737 [details] [review]:

::: src/goabackend/goatelepathyprovider.c
@@ +625,3 @@
+
+  g_main_loop_quit (data->loop);
+  return FALSE;

Please use G_SOURCE_REMOVE instead of FALSE. It is more readable.
Comment 211 Debarshi Ray 2013-08-22 14:01:59 UTC
Review of attachment 252748 [details] [review]:

Looks good. Please bump the gnome-control-center dependency on gnome-online-accounts to 3.9.90.
Comment 212 Marco Barisione 2013-08-22 14:06:26 UTC
Created attachment 252753 [details] [review]
telepathy: add a hack to avoid the personal details dialog from moving

The personal details dialog loads its content asynchronously and then
adapts its size to the content. This means that sometimes you can see
the dialog moving after the content is loaded.

This hack just adds a small timeout (not noticeable by the user) to hide
the problem. The is no guarantee that the timeout is long enough, but it
should be enough for most users (and a longer timeout would be
noticeable by the user).

In a future version we should add a way for the user info panel to
signal us when the content is loaded. Alternatively we could create the
panel when an account is selected, before the user clicks on the
"Personal details" button.
Comment 213 Debarshi Ray 2013-08-22 14:10:23 UTC
Review of attachment 252753 [details] [review]:

Looks good.
Comment 214 Marco Barisione 2013-08-22 14:18:29 UTC
Merged :)
28f38a78522d613e84c71be67d6a603a6a5d405b is the most recent commit in this branch.
Comment 215 Debarshi Ray 2013-10-27 16:43:46 UTC
*** Bug 653269 has been marked as a duplicate of this bug. ***
Comment 216 Debarshi Ray 2014-04-10 13:53:41 UTC
*** Bug 727965 has been marked as a duplicate of this bug. ***