* src/client/application/geary-controller.vala (GearyController): Update
message button state when updating ConversationViewer state.
(GearyController::on_conversations_selected): Move logic for handling
different numbers of selected conversations from ConversationViewer
here, so that message button state can be updated when the selection
count changes.
* src/client/conversation-viewer/conversation-viewer.vala
(ConversationViewer): Add ::is_composer_visible property, methods for
showing empty/muiple conversations selected UI.
* src/client/conversation-viewer/conversation-email.vala
(load_attachments): Check for attachment and inline elements that have
not been included inline and add them as attachments.
* src/engine/rfc822/rfc822-message.vala (construct_body_from_mime_parts):
Only pass parts marked as inline to the inline replacer.
* src/client/conversation-viewer/conversation-message.vala
(ConversationMessage): Remove ::is_loading_complete prop since it was
neveer accurate, replace uses with ConversationWebView::is_height_valid
instead. Hook up unset_controllable_quotes to web_view.size_allocate so
quotes and their containers have accurate heights.
* src/client/conversation-viewer/conversation-web-view.vala
(ConversationWebView): Make ::is_height_valid a property in case we
want to get notify events about it in the future. Don't use an arbirary
max hieght to determine if the HTML's height is valid, use what it
thinks its width is instead.
* src/client/conversation-viewer/conversation-message.vala
(AddressFlowBoxChild): Enable ellipsizing the label. Set the alignment
so labels are correctly aligned at narrow widths. Removed some cruft.
* ui/conversation-message.ui: Ensure long words in subject are
wrapped. Ensure there's always at least two cols for recipient address
flow boxes.
* ui/conversation-web-view.css: Prefix the names of base Geary-internal
elements with "geary_" to reduce the odds of them colliding with class
names in HTML messages. Chase the name changes in classes that generate
them.
* src/client/conversation-viewer/conversation-message.vala
(ConversationMessage): Use constants for class names and
WebKit.DOMElement::class_list to add/remove them.
* src/client/conversation-viewer/conversation-message.vala:
(ConversationMessage::create_quote_container): Fix unwanted whitespace
at the top of quote containers by removing newlines from the inner
HTML used to construct them.
(ConversationMessage::unset_controllable_quotes): Replace using
absolute pxiel value for determining whether a quote should be unhidden
with a percentage of the parent container.
* ui/conversation-web-view.css: Polish and simplify quote container CSS.
* 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.