GNOME Bugzilla – Bug 579812
Use avatar data/cache from TpContact
Last modified: 2010-05-26 09:16:39 UTC
We should use the avatar cache and get image data from TpContact. Unfortunately that's not yet implemented in tp-glib so we have our own implementation for now. telepathy-glib bug: https://bugs.freedesktop.org/show_bug.cgi?id=20035
Note that fixing this bug will remove the tp_cli_connection_interface_avatars_run_get_known_avatar_tokens () in tp_contact_factory_add_contact which is one of the latest _run_ calls.
TpContact already has a TP_CONTACT_FEATURE_AVATAR_TOKEN feature. So we could use that atm to remove the _run_ call even if the full avatar caching is not implemented yet in tp-glib.
right.
I made a patch for TpContact to add the needed API: http://git.collabora.co.uk/?p=user/xclaesse/telepathy-glib.git;a=shortlog;h=refs/heads/avatar-data Here is an incomplete empathy branch that use the proposed API: http://git.collabora.co.uk/?p=user/xclaesse/empathy.git;a=shortlog;h=refs/heads/avatar Note that TpContact won't keep avatar data in memory (unlike EmpathyContact). That means that avatar data must be requested each time it is needed. An issue with my empathy branch is that it loads the avatar data from cache each time a tooltip is shown on the main contact list... That's a performance disasted. We should probably keep the avatar data (or pixbuf?) in memory for that case.
Note that I updated branches: Empathy branch: http://git.collabora.co.uk/?p=user/xclaesse/empathy.git;a=shortlog;h=refs/heads/avatar tp-glib branch: http://git.collabora.co.uk/?p=user/xclaesse/telepathy-glib.git;a=shortlog;h=refs/heads/avatar-data2
Looks good. Please merge once Empathy depends on a tp-glib version having the new API.
Telepathy-glib branch merged in master. Will be released in 0.11.6 probably.
merged, thanks.