GNOME Bugzilla – Bug 680448
Generate UOA plugins
Last modified: 2012-07-24 14:38:12 UTC
With these plugins any Empathy account can be created using Ubuntu Online Accounts.
Created attachment 219486 [details] [review] add account-plugin-widget
Created attachment 219487 [details] [review] add empathy-account-plugin
Created attachment 219488 [details] [review] Hook cc-plugins to the build system
Created attachment 219489 [details] [review] account-plugin-widget: display the top bar and account widget
Created attachment 219490 [details] [review] Add jabber provider, service and plugin
Created attachment 219491 [details] [review] add generate-plugins.py Handy script to generate all the boilerplates for each protocol we are supporting.
Created attachment 219492 [details] [review] Generate plugins for most protocols
Created attachment 219493 [details] [review] account-plugins: implement delete
Created attachment 219494 [details] [review] add empathy.application
Also in http://cgit.collabora.com/git/user/cassidy/empathy/log/?h=uoa-providers-680448
Review of attachment 219493 [details] [review]: ::: ubuntu-online-accounts/cc-plugins/empathy-accounts-plugin.c @@ +57,3 @@ + + ag_account_delete (account); + ag_account_store (account, NULL, NULL); You should create a GSimpleAsyncResult for this.
Review of attachment 219494 [details] [review]: ::: ubuntu-online-accounts/cc-plugins/empathy.application @@ +10,3 @@ + </service-types> + +</application> tab indentation, really?
Review of attachment 219494 [details] [review]: ::: ubuntu-online-accounts/cc-plugins/generate-plugins.py @@ +65,3 @@ + +app_DATA =\\ + empathy.application the rest of the Makefile.am uses 1tab indentation, here you have spaces
empathy-accounts-plugin-widget.c:128:12: error: 'protocol' may be used uninitialized in this function [-Werror=maybe-uninitialized] empathy-accounts-plugin-widget.c:104:20: note: 'protocol' was declared here empathy-accounts-plugin-widget.c:128:12: error: 'manager' may be used uninitialized in this function [-Werror=maybe-uninitialized] empathy-accounts-plugin-widget.c:104:10: note: 'manager' was declared here
If I understand correctly, you can't modify settings of an existing account yet, right? For info, you can get the setting key "telepathy/mc-account-name" on an AgAccountService. That's the account's object-path without the TP_ACCOUNT_OBJECT_PATH_BASE prefix.
Voilà that's all :)
I've tested this, and I've seen 2 issues: 1) account is not enabled once created 2) TpAccount has the empathy icon instead of ubuntu's
Review of attachment 219493 [details] [review]: ::: ubuntu-online-accounts/cc-plugins/empathy-accounts-plugin.c @@ +57,3 @@ + + ag_account_delete (account); + ag_account_store (account, NULL, NULL); It's a custom callback, but yeah; done.
Review of attachment 219494 [details] [review]: ::: ubuntu-online-accounts/cc-plugins/empathy.application @@ +10,3 @@ + </service-types> + +</application> I copied Shotwell's application file and just changed some keys. Probably best to stay coherent. ::: ubuntu-online-accounts/cc-plugins/generate-plugins.py @@ +65,3 @@ + +app_DATA =\\ + empathy.application Good point; fixed.
(In reply to comment #14) > empathy-accounts-plugin-widget.c:128:12: error: 'protocol' may be used > uninitialized in this function [-Werror=maybe-uninitialized] > empathy-accounts-plugin-widget.c:104:20: note: 'protocol' was declared here > empathy-accounts-plugin-widget.c:128:12: error: 'manager' may be used > uninitialized in this function [-Werror=maybe-uninitialized] > empathy-accounts-plugin-widget.c:104:10: note: 'manager' was declared here fixed. (In reply to comment #15) > If I understand correctly, you can't modify settings of an existing account > yet, right? For info, you can get the setting key "telepathy/mc-account-name" > on an AgAccountService. That's the account's object-path without the > TP_ACCOUNT_OBJECT_PATH_BASE prefix. Yeah that's not implemented yet. (In reply to comment #17) > I've tested this, and I've seen 2 issues: > 1) account is not enabled once created It is here according to mc-tool and it does try to connect. > 2) TpAccount has the empathy icon instead of ubuntu's Fixed. The git branch has been updated.
Attachment 219486 [details] pushed as e0edcdd - add account-plugin-widget Attachment 219487 [details] pushed as bc95356 - add empathy-account-plugin Attachment 219488 [details] pushed as 70ea840 - Hook cc-plugins to the build system Attachment 219489 [details] pushed as ef6264b - account-plugin-widget: display the top bar and account widget Attachment 219490 [details] pushed as 32cbd28 - Add jabber provider, service and plugin Attachment 219491 [details] pushed as e296ad8 - add generate-plugins.py Attachment 219492 [details] pushed as 3d004d7 - Generate plugins for most protocols Attachment 219493 [details] pushed as 0566139 - account-plugins: implement delete