Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: improve the clipboard pasting of files for better compatibility #1281

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Doublonmousse
Copy link
Collaborator

@Doublonmousse Doublonmousse commented Nov 9, 2024

use read_future(&["text/uri-list") ... instead of read_text_future when pasting files from the clipboard.

This will make it work on the next gtk stable release (4.18) on mac os.
Testing on https://gitlab.gnome.org/GNOME/gtk/-/merge_requests/7850 which fixes clipboard support on mac os for gtk.

As this shouldn't break things for the current gtk version we're currently using on the different os, I'm pushing this now.

  • Verify on current gtk, linux. Seems to improve things on kde, some paste operations on files list would fail before, I can't test on gnome though
  • Verify on current gtk, mac : Actually it makes it work on current gtk ! We'll have to wait on the next gtk release to have paste support of rnote stroke content between instances though
  • Verify on current gtk, windows. Doesn't work before, doesn't work after the change.

Overall, a net positive

…ility

use `read_future(&["text/uri-list") ...` instead of `read_text_future` when pasting files.

This will make it work on the next gtk stable release (4.18) on mac os
gio::File::for_path(&file_path),
target_pos,
true,
match appwindow
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a candidate for DRY - almost the same code is used in three places in this source file

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants