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 macOS clipboard formats mapping #13197

Merged
merged 7 commits into from Oct 12, 2023
Merged

Conversation

maxkatz6
Copy link
Member

What does the pull request do?

  1. Support data formats mapping from GetDataFormats method. Previously this method only returned native data types, while SetObject/GetObject did properly map data formats (in some cases). This PR fixes inconsistency.
  2. Fix IStorageItem collections support.
  3. Support more than just text values when Avalonia is a DnD source.
  4. Adds warnings if unsupported CLR type was pushed into an IDataObject.

Checklist

  • Manual testing

Breaking changes

None.

Obsoletions / Deprecations

DataFormats.FileNames previously was Obsolete, but now it's Unstable+Obsolete. This way we won't have warnings in Avalonia source code when using FileNames.

Fixed issues

Fixes #11632

@maxkatz6 maxkatz6 changed the title Implement macOS clipboard formats mapping Fix macOS clipboard formats mapping Oct 11, 2023
@avaloniaui-team
Copy link
Contributor

You can test this PR using the following package version. 11.0.999-cibuild0040733-beta. (feed url: https://nuget-feed-all.avaloniaui.net/v3/index.json) [PRBUILDID]

@danwalmsley danwalmsley added this pull request to the merge queue Oct 12, 2023
Merged via the queue into master with commit adb97bd Oct 12, 2023
7 checks passed
@danwalmsley danwalmsley deleted the fixes/macos-data-formats branch October 12, 2023 19:25
@maxkatz6 maxkatz6 added the backport-candidate-11.0.x Consider this PR for backporting to 11.0 branch label Nov 5, 2023
maxkatz6 added a commit that referenced this pull request Dec 5, 2023
* Implement macOS clipboard formats mapping

* Mark DataFormats unstable instead of obsolete (removes warnings in our code base)

* Support non-text data formats in macOS drag source

* Implement SetStrings for IAvnClipboard to support files properly

* Add comments to a confusing part of code

* Update src/Avalonia.Base/Input/DataFormats.cs

---------

Co-authored-by: Jumar Macato <16554748+jmacato@users.noreply.github.com>
Co-authored-by: Dan Walmsley <dan@walms.co.uk>
@maxkatz6 maxkatz6 added backported-11.0.x and removed backport-candidate-11.0.x Consider this PR for backporting to 11.0 branch labels Dec 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Clipboard format names not as expected on macOS
5 participants