* src/client/conversation-viewer/conversation-message.vala
(ConversationMessage::clean_html_markup): Ensure all displayed message
bodies have at least a HTML element, so that the style in
conversation-web-view.css has something to work on. Load application
style when sanitising the HTML rather than when the web view has
loaded.
* src/client/conversation-viewer/conversation-web-view.vala
(ConversationWebView): Just set user style using WebKit.WebSettings,
don't try to set application CSS, and remove all associated code.
* ui/conversation-web-view.css: Only trigger CSS 2.1 § 10.6.7 on the HTML
element, so BODY can be styled as normal by email CSS.
* src/client/conversation-viewer/conversation-message.vala: Always
release by setting ::context_menu_element to null after use.
* src/client/conversation-viewer/conversation-viewer.vala: Reset
::conversation_timeout_id after its callback has completed.
Calling destroy ensures the composer widget cleans up after itself, maybe
because of the signal handlers added in ConversationViewer::do_compose
and ConversationListBox::add_embedded_composer?
* src/client/conversation-viewer/conversation-email.vala: Hook up new
ConversationMessage.link_activated signal, ensure sub-messages also
have their signals hooked up.
* src/client/conversation-viewer/conversation-message.vala: Add a new
AddressFlowBoxChild inner class for message header addresses. Add new
signal for emitting link clicks for both actions and the web view. Make
link-related actions require a string target, update menu construction
to supply them to the context menu and callbacks expect them. Add a
popover for header addresses for copying/pasting each address.
The conversation viewer's ListBox is sufficiently complex to warrant its
own widget. Use empty placeholders for the list per the HIG, and
correctly fix mamagement of empty folder vs no conversations selected
this time.
* src/client/application/geary-controller.vala (GearyController):
Directly manage secondary parts of the conversation viewer, since the
controller since it has a better and more timely idea of when a
conversation change is due to folder loading status or from the user
selecting conversations, and so the viwer doesn't need to hook back
into the controller. Remove the now-unused conversations_selected
signal and its callers.
* src/client/conversation-viewer/conversation-listbox.vala: New widget
for displaying the list of emails for a conversation. Moved relevant
code from ConversationViewer here. Made adding emails async to get
better UI responsiveness. Don't implement anything to handle
conversation changes or emptying the list.
* src/client/conversation-viewer/conversation-viewer.vala: Replace user
messages - empty folder/search & no/multiple messages selected with new
EmptyPlaceholder. Remove a lot of the state manage code needed when
managing the email listbox. Add a new ConversationListBox for every new
conversation and just throw away.
* src/client/conversation-list/conversation-list-view.vala
(ConversationListView): Clean up firing the conversations_selected
signal - don't actually emit it when the model is clearing, and don't
bother delaying the check either.
* src/client/components/empty-placeholder.vala: New widget for displaying
empty list and grid placeholders per the HIG.
* src/client/conversation-viewer/conversation-email.vala
(ConversationEmail): Make manually read a property, since it
effectively is one.
* src/CMakeLists.txt: Include new source files.
* po/POTFILES.in: Include new source and UI files, and some missing ones.
* ui/CMakeLists.txt: Include new UI files.
* ui/conversation-viewer.ui: Replace user message and splash page with
placeholders for the new empty placeholders(!).
* ui/empty-placeholder.ui: UI def for new widget class.
* ui/geary.css: Chase widget name/class changes, style new
empty placeholder UI.
Scrolls to the first expanded row (first unread, or last email) in the
conversation list box to the top when the convo is fully loaded. To
implement this cleanly, ConversationViewer's handling of ListBoxRows was
cleaned up significantly by introducing a custom subclass and moving
related funtionality there.
* src/client/conversation-viewer/conversation-viewer.vala (EmailRow): New
class for managing expanded and last row state, events needed to ensure
we can robustly scroll to the row after its message has been loaded.
(ConversationViewer::scroll_to_top): New method for scrolling to a
specific row.
(ConversationViewer::update_last_row): New method for correctly
updating the last_email_row property and the row's flags. Replace
existing ad-hoc methods of determining the last row and ensure that the
last_email_row is used instead.
(ConversationViewer::select_conversation_async): Find the first
expanded row in the newly loaded conversation, and wire it up so that
it is scrolled to when the email body is eventually loaded, and the
resulting size reallocations have taken place.
* src/client/conversation-viewer/conversation-web-view.vala
(ConversationWebView::is_height_valid): Allows checking if the web
view's height is considered to have been correctly calculated.
* src/client/conversation-viewer/conversation-web-view.vala
(ConversationWebView): Don't bother listening to document_font_changed
since that is handled by StylishWebView.
* src/client/components/stylish-webview.vala: Remove unused signals and
the interface font property - no longer used.
Since the ConversationEmail instance is also passed to signal handlers
and the view's email instance can be obtained from that, also passing the
email instance is redundant. Don't do that.
* src/client/conversation-viewer/conversation-email.vala
(ConversationEmail): Remove Geary.Email from signals where
present. Also rename ::mark_email_from to ::mark_email_from_here to
make its operation a bit more obvious. Update call sites and handler
implementations.
Ensure all public members have semi-decent documentaion comments. Make
public members private if they don't need to be public. Re-org non-public
members to be below public memebers in the source.
* src/client/conversation-viewer/conversation-viewer.vala
(ConversationViewer::highlight_search_terms, ConversationViewer::on_reset):
Move webkit-specific code to ConversationMessage, invoke each message view
in each email view to update its highlighting.
* src/client/conversation-viewer/conversation-email.vala
(ConversationEmail): Rename conversation_messages to attached_messages,
make it a RO public property so the viewer can access it, use a private
shadown property otherwise.
* src/client/conversation-viewer/conversation-email.vala
(ConversationMessage): Add methods for highlighting/unmarking search
terms.
This takes some inspiration from the GNOME Mail mockups.
* src/client/components/main-window.vala (MainWindow::set_styling): Work
around GtkFlowBoxChild padding issue.
* src/client/conversation-viewer/conversation-message.vala
(ConversationMessage): Updated to populate new header labels, add
addresses to GtkFlowBoxes.
* ui/conversation-message.ui: Make date always visible and
right-aligned. Remove label for sender address. Use GtkFlowBoxes for
sender/to/cc/bcc.
Using "msg" for the ConversationMessage context menu action namespace
stopped ConversationEmail's actions being found, so use "eml" instead.
* src/client/conversation-viewer/conversation-email.vala
(ConversationEmail::ConversationEmail): Use a the "eml" namespace for
email actions to avoid namespace collision.
* ui/conversation-email-menus.ui: Chase namespace change.