* src/client/composer/composer-link-popover.vala: New GtkPopover subclass
for creating/editing links.
* src/client/composer/composer-web-view.vala (EditContext): Add is_link
and link_uri properties, decode them from the message string, add
decoding tests.
(ComposerWebView): Add some as-yet un-implemented methods for
inserting/deleting links.
* src/client/composer/composer-widget.vala (ComposerWidget): Add
cursor_url for storing current text cursor link, update it from the
cursor_context_changed signal param, rename hover_url to pointer_url to
match. Add link_activated signal to let user's open links they are
adding, hook that up in the controller. Rename
::update_selection_actions to ::update_cursor_actions, since that's a
little more apt now, also enable insert link action if there is a
cursor_url set as well as a selection. Remove ::link_dialog, replace
with ::new_link_popover, hook up the new popover's signals there as
appropriate.
(ComposerWidget::on_insert_link): Create and show a lin popover instead
of a dialog.
* ui/composer-web-view.js: Take note of whther the context node is a link
and if so, also it's href. Include both when serialsing for the
cursorContextChanged message. Add serialisation tests.
* ui/composer-link-popover.ui: New UI for link popover.
Replace StylishWebView with ClientWebView, to act as a common base class
for the composer, conversation and other uses of web views.
Introduce a ComposerWebView that replaces WebviewEditFixer and extends
ClientWebView, and adds (dummy for now) methods for ComposerWidget to
call. Simiarly, make ConversationWebView extend ClientWebView, add dummy
calls to support the conversation viewer classes. Move common code from
both into ClientWebView.
Add a web-process library, unused other than for compile-time checking,
and move all client functions and methods involving DOM objects into util
classes there.
Bug 728002
* Use GtkTemplate to simplify layout.
* Prefix instance variables with this.
* Extract helper methods for clarity.
Signed-off-by: Niels De Graef <nielsdegraef@gmail.com>
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.
* src/client/conversation-viewer/conversation-message.vala
(ConversationMessage): Add a simple action group namespaced as "msg"
for actions under the message's scope, add actions to it for the
context menu. Track the currently selected DOM element under the
context menu so we can update action enabled state, etc., based on
it. Construct the context menu as needed, update signal & event
handlers as needed.
* src/client/conversation-viewer/conversation-email.vala
(ConversationEmail): Add new save-image signal, chain emission from
added ConversationMessage instance's save-image signal to this.
* src/client/application/geary-controller.vala (GearyController): Chase
on_save_buffer_to_file signal moving to ConversationEmail and being
renamed to save_image.
* src/client/conversation-viewer/conversation-viewer.vala: Remove uneeded
signal.
* ui/conversation-message-menus.ui: New UI file for ConversationMessage
context menu.
* ui/CMakeLists.txt: Incude ConversationMessage UI in the resources.
* po/POTFILES.in: Add new UI file.