GNOME Bugzilla – Bug 673263
goa-mc-plugin: support enabling or disabling accounts
Last modified: 2012-05-07 13:21:48 UTC
GOA is now going to offer API to let applications enable or disable the specific components (eg., mail, chat, etc.) of an account: https://bugzilla.gnome.org/657905 Would be good if goa-mc-plugin started using this API.
Created attachment 211046 [details] [review] goa-mc-plugin: fix variable name I have no idea how this was compiling. :-)
Created attachment 211047 [details] [review] goa-mc-plugin: support enabling or disabling accounts Currently, if you toggle the account through the GOA panel, it will take a little while to show up in empathy-accounts. This is because we are watching the availability of the GoaChat interface (indicated by notify::chat) instead of the chat-disabled property of GoaAccount. When any other application (eg., the panel) toggles the chat-disabled property the ~/.config/goa-1.0/accounts.conf gets updated. Whenever the file changes, the daemon updates the GoaObject after a timeout of 200 ms, and hence the lag. Currently this is easy to fix by just using notify::chat-disabled instead of notify::chat because the GoaChat interface is currently useless. However, in future when GOA starts providing metadata about chat accounts through the GoaChat interface, you will actually need it (think generic Jabber or SIP accounts). The lag is probably not so much of a practical problem. So I am keeping it simple at the moment.
Review of attachment 211046 [details] [review]: Oh good catch! It was building because 'acct' is a global variable defined in some other libs. The GOA plugin was not built with the usual warnings so we didn't notice. I'm fixing that in 3.4; I'll merge your patch with my branch. thanks!
Comment on attachment 211046 [details] [review] goa-mc-plugin: fix variable name Attachment 211046 [details] pushed as 0d03cd1 - goa-mc-plugin: fix variable name
Review of attachment 211047 [details] [review]: Looks good to me; but you'll probably have to rebase it on top of master and I renamed the acct variable to fix shadow variables warnings.
(In reply to comment #3) > Review of attachment 211046 [details] [review]: > > Oh good catch! It was building because 'acct' is a global variable defined in > some other libs. The GOA plugin was not built with the usual warnings so we > didn't notice. I'm fixing that in 3.4; I'll merge your patch with my branch. > thanks! That is what I thought, but who would be exporting a variable with the usual namespace prefix? 'gcc -E' will help in narrowing that down.
Created attachment 211133 [details] [review] goa-mc-plugin: support enabling or disabling accounts Rebased on master.
Review of attachment 211133 [details] [review]: Looks good. Feel free to merge to master once the GOA bits have been released. Don't forget to bump the GOA dep in configure.ac first ::: goa-mc-plugin/mcp-account-manager-goa.c @@ +485,3 @@ + return FALSE; + + acct = goa_object_peek_account (object); you can just do "goa_account_set_chat_disabled (acct, tp_strdiff (val, "true") );
Created attachment 211203 [details] [review] goa-mc-plugin: support enabling or disabling accounts Good suggestion.
Review of attachment 211203 [details] [review]: ++ please merge once GOA has been released.
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.