summaryrefslogtreecommitdiff
path: root/src/runner.c
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2026-07-20 16:25:39 +0300
committerPaul Buetow <paul@buetow.org>2026-07-20 16:25:39 +0300
commitdc430ce8ec427529c75e3527a0ff01fcf3858dd2 (patch)
tree0c5a79320b182e145f24420b67da9f01930a1101 /src/runner.c
parentf6517a56a6e4d92468dfdda1656e80d57f302816 (diff)
clipboard: offer text/uri-list (CRLF) + text/plain via union provider (iu0)
clipboard_copy_uris wrapped its URI text as a generic G_TYPE_STRING provider, so targets could not request text/uri-list and file-manager paste failed. Extracted clipboard_build_uri_provider builds a union of two byte providers: text/uri-list (RFC 2483 CRLF-terminated URI lines, trailing CRLF) and text/plain (newline-joined local paths, URI fallback for non-local files). clipboard_copy_uris sets the union on the GdkClipboard with correct refcounting (new_union steals the sub-provider refs; clipboard takes its own ref). Empty list returns NULL and leaves the clipboard untouched. New integration test tests/test_clipboard.c: serializes the provider's content per MIME type via gdk_content_provider_write_mime_type_async into a GMemoryOutputStream and memcmps the bytes. Covers formats (both MIME advertised, bogus type absent), single + multiple files (exact CRLF/newline-joined bytes), empty list (no crash), and a negative (unknown MIME rejected with GError).
Diffstat (limited to 'src/runner.c')
0 files changed, 0 insertions, 0 deletions