Skip to content

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
    • Help
    • Support
    • Submit feedback
    • Contribute to GitLab
  • Sign in
Geary
Geary
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
    • Cycle Analytics
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Charts
  • Issues 163
    • Issues 163
    • List
    • Boards
    • Labels
    • Milestones
  • Merge Requests 8
    • Merge Requests 8
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
    • Charts
  • Packages
    • Packages
    • Container Registry
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Charts
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • GNOME
  • GearyGeary
  • Merge Requests
  • !343

Merged
Opened Oct 24, 2019 by Chris Heywood@creywood
  • Report abuse
Report abuse

Inline image drag and drop #90 and image paste from clipboard #304

Work in progress MR as requested. See #90 (closed) and #304 (closed).

Notes/questions, copied from the issue:

  • I've changed the inline_files and cid_files into Memory.Buffer instances but have left attached_files as File types for now. This was to get your feedback as also changing attached_files would mean changes through into Geary.Attachment (as a result of ComposerWidget's use through pending_attachments), which I presume will impact a bunch of other things. One of the downsides to not making this change are not being able to handle non-image dropped files as normal attachments.
  • The way I've used get_uint8_array to build the GMime part (in RFC822.Message) feels like there should be a better way..?
  • I'm using a hash of current time to build a filename for pasted images. Happy to hear other ideas.
  • Currently I'm attempting to accept any dropped image with an image mime type (image/*). Are you happy to go with that for now or should we attempt to restrict to a few standard types?
  • The blob:// URL scheme is required for dropping files into WebKit
  • I've made some changes to ComposedEmail.replace_inline_img_src as the replaced term and search term can have the same length (which would have resulted in the previous test assuming and the replacement not succeeding). I do realise the updated approach is less performant (when the replacement succeeds).
  • One minor usability issue I noticed is that when initially composing a new email the drop area for an inline image is pretty small as the WebKit view is only one line high

Thanks!

Also, I've just attempted to update from master but have some type of build environment issue (from Debian, GNOME, something changes?) that I don't have the time to resolve this second. Will need to get onto that.

Edited Nov 16, 2019 by Chris Heywood

Check out, review, and merge locally

Step 1. Fetch and check out the branch for this merge request

git fetch "https://gitlab.gnome.org/creywood/geary.git" "wip/90-304-image-dnd-paste"
git checkout -b "creywood/geary-wip/90-304-image-dnd-paste" FETCH_HEAD

Step 2. Review the changes locally

Step 3. Merge the branch and fix any conflicts that come up

git fetch origin
git checkout "origin/mainline"
git merge --no-ff "creywood/geary-wip/90-304-image-dnd-paste"

Step 4. Push the result of the merge to GitLab

git push origin "mainline"

Note that pushing to GitLab requires write access to this repository.

Tip: You can also checkout merge requests locally by following these guidelines.

  • Discussion 32
  • Commits 9
  • Pipelines 8
  • Changes 12
Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
0
Labels
None
Assign labels
  • View project labels
Reference: GNOME/geary!343

Revert this merge request

This will create a new commit in order to revert the existing changes.

Switch branch
Cancel
A new branch will be created in your fork and a new merge request will be started.

Cherry-pick this merge request

Switch branch
Cancel
A new branch will be created in your fork and a new merge request will be started.