* src/client/application/geary-controller.vala: Remove unneeded manual
conversation list and email signal disconnects - let the object's
finalisers do it. Replace one- or two-line, single-use signal handlers
with lambdas.
* src/client/conversation-viewer/conversation-email.vala
(ConversationEmail): Removed signal handlers that were simply proxying
through from ConversationMessage, update call sites to connect to the
message's signals directly.
* src/client/conversation-viewer/conversation-message.vala: Replace one-
or two-line, single-use signal handlers with lambdas.
* src/client/application/geary-controller.vala (GearyController): Remove
ACTION_FIND_NEXT_IN_CONVERSATION and
ACTION_FIND_PREVIOUS_IN_CONVERSATION arctions and callbacks since they
will be taken care of by the search entry & search bar buttons, and
remove from accelerators.ui. Add ACTION_TOGGLE_FIND action to handle
toggling find bar in the same way as the search bar.
* src/client/components/main-toolbar.vala (MainToolbar): Add new button
and infrastrcuture for toggling the find bar.
* src/client/conversation-viewer/conversation-viewer.vala
(ConversationViewer): Convert ::conversation_page to be grid, add new
::conversation_scroller property for the scrollbar, update call
sites. Add props for accessing find widgets, remove old find methods
and add callbacks for handling find start, change, etc.
* src/client/conversation-viewer/conversation-email.vala,
src/client/conversation-viewer/conversation-message.vala: Add methods
for accessing selected text for find.
* src/client/conversation-viewer/conversation-listbox.vala
(ConversationListBox::highlight_search_terms): Updated to return a flag
specifiying whether any search results were found, and to
expand/collapse messsages depending on whether they have any.
* src/client/conversation-viewer/conversation-message.vala
(ConversationMessage::highlight_search_terms): Keep track of how many
results were found, and return that.
* ui/conversation-viewer.ui: Convert conversation_page to be a grid, add
a search bar and search widgets to it, and move conversation
ScrolledWindow to it.
* src/client/conversation-viewer/conversation-listbox.vala
(ConversationListBox): Convert RO ::reply_target prop into a method,
reimplement to use new ::get_selection_view method. Fix call sites.
* src/client/conversation-viewer/conversation-email.vala
(ConversationEmail): Rename ::get_body_selection to
::get_selection_for_quoting to make it clear that what the returned
selection is to be used for. Fix call sites.
* src/client/conversation-list/conversation-list-store.vala (ListStore):
Make ::on_sort static to avoid a circular ref. Remove some signal handler
disconnects that weren't a problem.
Rather than keeping a single conversation list model instance around -
attaching and adding conversations then clearing and detaching
conversation viewers, simply remove the old model instance and add a new
one.
This also allows the ConversationListStore::is_clearing property to be
removed, fixing a related critical warning, and simply unhooking the
selection-changed signal handler instead when changing the model.
* src/client/components/main-window.vala (MainWindow): Remove props that
are now dynamically managed. When the conversation monitor changes,
replace the ConversationListView's model, update progress listeners.
* src/client/conversation-list/conversation-list-view.vala
(ConversationListView): Remove list store property since the parent
class already maintains it. Override ::get_model() and ::set_model() to
use ConversationListStore instances, manage signals on model instances
when they are set/unset.
* src/client/conversation-list/conversation-list-store.vala
(ConversationListStore): Replae destructor with an explict destroy
method that ensures the object is cleaned up enough to actualy be
finalised. Remove use of is_clearing in ::on_selection_changed() to fix
critical warning.
* src/engine/api/geary-progress-monitor.vala (ProgressMonitor): Send a
start signal if an added monitor is already running, send a finish
signal if in progress and the the last removed monitor is as well.
* 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.