-
Michael Gratton authored
Since we're no longer using the web view to display the user avatar, use libsoup and add some additional infrastructure to support caching the avatars. Also switches to HTTPS for accessing the Gravatar service. * src/client/application/geary-application.vala (GearyApplication::get_user_cache_directory): New method to return the XDG cache directory for Geary. * src/client/application/geary-controller.vala: Add both a Soup session and cache for fetching avatars. Write the cache to disk on controller close. * src/client/conversation-viewer/conversation-email.vala (ConversationEmail::start_loading): Trigger avatar loads when loading the email. * src/client/conversation-viewer/conversation-message.vala: Replace single avatar image widget with two, so the image does not need to be rescaled when expanded/collapsed. * src/client/conversation-viewer/conversation-message.vala (ConversationMessage::load_avatar): Queue a request for a Gravatar avatar. (ConversationMessage::set_avatar): Load pixbuf returned by Gravatar, scale and set it for the preview and expanded avatar images. * src/client/conversation-viewer/conversation-viewer.vala (ConversationViewer::clear): Cancel any outsanding avatar loads. * src/client/util/util-gravatar.vala (Gravatar): Construct a HTTPS URL to avoid advertising to the NSA who we are receiving email from. * ui/conversation-message.ui: Add the second avatar image.
aabfb1d6