1. 03 Oct, 2016 25 commits
    • Michael Gratton's avatar
      Reenable and update code for attached, full pane message composer. · 5184a38f
      Michael Gratton authored
      Display attached+un-embedded composer as an additional ConversationViewer
      stack page, although it realy should be broken as its own top-level
      widget - there's already too much state in ConversationViewer.
      * src/client/conversation-viewer/conversation-viewer.vala: Remove old
        composer boxes code. Add new ViewState enum, property and methods to
        define and manipulate the current view state - either conversation or
        (do_conversation): New method to put the viewer in conversation mode.
        (do_compose): New method to put the viewer in compose mode, hook up the
        composer widget, and handle ConversationListView selection management
        for now.
        (on_folder_selected, on_conversation_count_changed,
        on_conversations_selected): Ensure these methods do the right thing
        depending on the viewer's current view state.
        (set_paned_composer): Replaced by ::do_compose, fixed call sites.
        (show_multiple_selected): Minor code clean up - moved down to a more
        appropriate location.
      * src/client/composer/composer-box.vala (ComposerBox): Don't attempt to
        up-manage it's parent's state, since the parent has a much better idea
        of how best to do that. Likewise move code to manage previous
        ConversationList selection out, provide signal so the a more
        appropriate class can manage it instead.
      * src/client/composer/composer-container.vala: Add some method comments.
      * ui/conversation-viewer.ui: Add new page to the stack for the composer.
    • Michael Gratton's avatar
      Just use tooltips instead of an overlay for displaying link URLs for now. · b0835166
      Michael Gratton authored
      * src/client/conversation-viewer/conversation-message.vala: Remove
        overlay-related code, enable tooltips on the body box since WebView
        doesn't want to display them - even with the change to
        ConversationWebView below, renable link mouseover handler and set/clear
        tooltip text when mousing over one.
      * src/client/conversation-viewer/conversation-web-view.vala
        (query_tooltip): Removed, not sure why we don't want this but it may
        well be preventing title tooltips from being displayed.
    • Michael Gratton's avatar
      Renable and update code for clicking on links in messages. · 3bf17388
      Michael Gratton authored
      Requires GTK+ 3.12.
      * src/client/conversation-viewer/conversation-message.vala
        (ConversationMessage::link_selected): Added to pass through successful
        link clicks to the message_viewer, hook it up to the web_view.
        (ConversationMessage::load_message_body): Hook up WebKit event handler
        for when links are clicked, so phishing links can be intercepted.
        (ConversationMessage::on_link_clicked_self): Use a popover to display
        phishing warning, recursively check link's offset parent's when
        calculating box position, escape link text/href before using it as
      * src/client/conversation-viewer/conversation-viewer.vala
        (ConversationViewer::add_message): Ensure unhandled mouse clicks o the
        web_view are not used to activate the message's ListBoxRow.
      * ui/conversation-message.ui: Add popover (GTK+ 3.12) for phishing links.
    • Michael Gratton's avatar
      Minor code clean up. · b2bd2313
      Michael Gratton authored
      * src/client/conversation-viewer/conversation-message.vala
        (ConversationMessage): Make sure public members appear before private
      * src/client/conversation-viewer/conversation-web-view.vala (ConversationWebView):
        Make sure public members appear before private ones, remove unused code.
    • Michael Gratton's avatar
      Remove uneeded ConversationWebView, HTML and CSS code. · 103619c5
      Michael Gratton authored
      * src/client/conversation-viewer/conversation-web-view.vala
        (ConversationWebView::ConversationWebView): Don't load message.html
        since ConversationMessage now just loads the message HTML directly.
        (ConversationWebView::on_load_finished): Don't load container DIV and
        inline icons since GTK-based chrome has mostly replaced HTML chrome.
        (conversation_icon_color, container, scroll_reset, set_icon_src,
        set_attachment_src): Removed, no longer needed.
        ConversationWebView::get_preferred_height): Added to ensure GTK gets
        a useful min/preferred height for the widget.
      * theming/message-viewer.css: Remove rules used for now-obsolete HTML
        chrome - headers, attachments, etc. Added rules to ensure HTML and BODY
        element's heights and scrollbars are appropriate for use in this
      * theming/message-viewer.html: Removed, no longer needed.
    • Michael Gratton's avatar
      Convert ConversationViewer to a Stack with a ListBox, remove its WebView. · b29d83e5
      Michael Gratton authored
      * src/client/conversation-viewer/conversation-viewer.vala: Convert to a
        GtkStack. Use a GTK template for constructing the UI. Remove WebView
        and any DOM-related code. Replace the enum DisplayMode and hence the
        HTML spinner and HTML user message with widgets in the stack. Remove
        all menus since they're all message specific and will need to be
        re-implemented for ConversationViewer. Comment out composer related
        code for the moment.
      * src/client/application/geary-controller.vala
        (GearyController::conversations_selected): Make both conversations and
        current_folder arguments non-nullable, since it doesn't make any sense
        for there not to be any and simplifies handler impls.
        (GearyController::on_conversations_selected): Don't fire when there
        isn't a current folder.
      * src/client/components/main-window.vala (MainWindow::set_styling): Add
        CSS theme code for the the conversation message list.
        (MainWindow::create_layout): Remove GtkFrame, just add the
        ConversationViewer instance directly.
      * ui/conversation-viewer.ui: New GtkBuilder template for
        ConversationViewer, implemented as a GtkStack containing widgets for
        displaying the loading spinner, conversation as a GtkListBox, and label
        for user messages.
      * ui/CMakeLists.txt, po/POTFILES.in: Added new UI files.
    • Michael Gratton's avatar
      Add new ConversationMessage widget to display a single message with a WebView. · 64aa037c
      Michael Gratton authored
      The new widget is designed to be added to a ListBox like container, and
      can display both a summary and the complete message, a'la the traditional
      Geary ConversationView.
      Most features are currently disabled, but it does handle hiding/showing
      the message body using a single WebKit.WebView. All code from
      ConversationViewer relating to DOM manipulation as been copied over, all
      but that which was needed to display the message has been commentd out.
      * src/client/conversation-viewer/conversation-message.vala: Source code
        for new widget.
      * src/client/components/main-window.vala: Add CSS theme code for
      * ui/conversation-message.ui: GtkBuilder template for new widget.
      * ui/conversation-message-menu.ui: GtkBuilder for the message menu. This
        is a separate file since GTK+ 3.10 doesn't support GtkPopoverMenu and I
        can't build it using Glade otherwise.
      * src/CMakeLists.txt: Added new source file.
      * po/POTFILES.in, ui/CMakeLists.txt: Added new UI files.
    • Michael Gratton's avatar
    • Michael Gratton's avatar
      Add missing source file to POTFILES. · c3a09eb6
      Michael Gratton authored
    • Michael Gratton's avatar
    • Michael Gratton's avatar
      Ensure inline parts with a Content Id keep the same id when sending. · f48255a7
      Michael Gratton authored
      Since drafts, replies and forwarded HTML messages may reference inline
      images by CID, so ensure that any existing CIDs are retained.
      Bug 712995.
      * src/client/composer/composer-widget.vala
        (ComposerWidget::get_composed_email): Update ComposedEmail's CID map.
        (ComposerWidget::update_pending_attachments): Only keep any existing
        CID for inline parts.
      * src/engine/api/geary-composed-email.vala (ComposedEmail): Keep track of
        CIDs we are interested in and the files they refer to.
        (ComposedEmail::contains_inline_img_src): Added to allow determining if
        a CID has been used in an email. Use class constants, update
        ::replace_inline_img_src to use them.
      * src/engine/rfc822/rfc822-message.vala (Message::from_composed_email):
        Include parts with CIDs in the message body, don't include inline
        parts that already have a CID.
    • Michael Gratton's avatar
      Display draft inline attachments refered to using cid urls. Bug 712995. · 9c1ee069
      Michael Gratton authored
      * src/client/composer/composer-widget.vala (ComposerWidget): Add mapping
        of Content IDs to files, check for them when loading resources and
        point them at the attahcment's file.
    • Michael Gratton's avatar
      Rework ComposerWidget's pending attachment implementation. Bug 712995. · efb7ecbe
      Michael Gratton authored
      This merges the pending attachment add & check methods to do both at
      once, so the logic for determining if a panding attachment should be
      added doesn't need to be duplicated.
      Also changes the behaviour of pending attachments to always include
      inline attachments, even when only replying, since they should be
      displayed if included in the quote.
      * src/client/composer/composer-widget.vala (ComposerWidget): Add state
        flag to specify which pending attachments should be included. Move all
        private attachment-related fields to the same place in the
        source. Combine ::add_pending_attachments and
        ::check_pending_attachments into new ::update_pending_attachments
        method, update call sites.
    • Michael Gratton's avatar
      Minor ComposerWidget code cleanup. · bb517365
      Michael Gratton authored
    • Michael Gratton's avatar
      Update IMG SRC values when sending HTML messages with inline images. · 210a911b
      Michael Gratton authored
      Bug 712995.
      * src/engine/rfc822/rfc822-message.vala (Message::from_composed_email):
        Create inline image parts with content id's and update IMG SRC values to
        use those before creating HTML body part, so the message acually
        references the inline images.
      * src/client/composer/composer-widget.vala
        (ComposerWidget::get_composed_email): Update the image sourc prefix
        value on the ComposedEmail.
      * src/engine/api/geary-composed-email.vala (ComposedEmail): Add
        img_src_prefix prop and replace_inline_img_src() method to allow
        updating IMG SRC attr values.
    • Michael Gratton's avatar
      Clean up RFC822.Message body part construction a bit. Bug 712995. · 5f8032b6
      Michael Gratton authored
      * src/engine/rfc822/rfc822-message.vala (Message::from_composed_email):
        There's no need to do a two-step create part then add part process, so
    • Michael Gratton's avatar
      Attach inline parts to outgoing messages. Bug 712995. · 4b946847
      Michael Gratton authored
      * src/engine/rfc822/rfc822-message.vala (Message::from_composed_email):
        Check for inline files on the ComposedEmail, if found create a new
        related multipart to encapsulate the HTML and its images.
        (Message::coalesce_related): New method that sets the Type header for
        multipart/related parts.
        (Message.get_file_part): Renamed from get_attachment_part, add
        disposition type arg to allow specifying if content disposition of the
        new part.
      * src/engine/api/geary-composed-email.vala (ComposedEmail): Replace
        attachment_files field with both attached_files and inline_files, so
        that inline attachments can be passed through to RFC822.Message.
      * src/client/composer/composer-widget.vala
        (ComposerWidget::get_composed_email): Set both attached and inline
        files on the composed email.
    • Michael Gratton's avatar
      Enable displaying inline images in the composer. Bug 712995. · 6e2eb9e7
      Michael Gratton authored
      * src/client/composer/composer-widget.vala (ComposerWidget): Use same
        secure process for loading inline files as conversation viewer - Choose
        a random prefix, only allow resources matching that to be loaded.
        (ComposerWidget::on_insert_image): Only allow selecting images.
    • Michael Gratton's avatar
      Allow adding inline attachments to the composer widget. Bug 712995. · 13e775bc
      Michael Gratton authored
      * src/client/composer/composer-widget.vala (AttachmentError): New
        exception type for attachment errors.
        (ComposerWidget): Replace attachment_files field with two,
        attached_files for attachment parts and inline_files for inline parts,
        update uses of them.
        (ComposerWidget::add_attachment): Throw an error when an error occurs,
        rather than trying to handle it internally. Allow content disposition
        type type to be specified, and only add it to the attahcments UI if not
        inline. Update call sites.
        (ComposerWidget::on_add_attachment): Manage adding attachments from
        AttachmentDialog directly, rather than relying on AttachmentDialog to
        do the work.
        (ComposerWidget::on_insert_image): Also manage AttachmentDialog
        directly, specify inline when attaching, inset IMG element into HTML
      * src/client/dialogs/attachment-dialog.vala (is_finished): Removed, since
        ComposerWidget is managing this itself now.
    • Michael Gratton's avatar
      Tidy up how pending attachments are managed. · bfbafb28
      Michael Gratton authored
      * src/client/composer/composer-widget.vala
        (ComposerWidget::fill_in_from_referred): Always remember pending
        attachments, only add them to the composer's attachments.
        (ComposerWidget::add_pending_attachments): New method for updating
        pending attachments.
    • Michael Gratton's avatar
      Add Insert Image button, action and hander to composer. Bug 712995. · 8191ed42
      Michael Gratton authored
      * src/client/composer/composer-widget.vala (ComposerWidget): Add action
        and callback that simply does a normal attachment for now.
      * ui/composer-widget.ui: Add insert image button to the composer toobar.
    • Gautier Pelloux-Prayer's avatar
    • Michael Gratton's avatar
      Update help text for move/label shortcuts in manual/help overlay. · e6c6e7c0
      Michael Gratton authored
      Make it describe the result of the action, not the UI effect.
    • Gautier Pelloux-Prayer's avatar
      Add shortcuts window. Bug 764926 · 87be2285
      Gautier Pelloux-Prayer authored
    • Michael Gratton's avatar
      Fix compilation with valac git master. · 5a0b85e5
      Michael Gratton authored
  2. 02 Oct, 2016 3 commits
  3. 30 Sep, 2016 3 commits
  4. 29 Sep, 2016 1 commit
  5. 28 Sep, 2016 3 commits
  6. 26 Sep, 2016 3 commits
  7. 25 Sep, 2016 2 commits