status: improve drag and drop behavior
commit984573d8376363667ce23dafdb096dac73359b23
authorDavid Aguilar <davvid@gmail.com>
Mon, 6 Feb 2023 11:57:16 +0000 (6 03:57 -0800)
committerDavid Aguilar <davvid@gmail.com>
Mon, 6 Feb 2023 12:15:54 +0000 (6 04:15 -0800)
treeafbb7354e5074e022001cb967c282208cab7968c
parent4391046276ec4613f44f7bfd2ebf86897a0556bc
status: improve drag and drop behavior

Support shells that do not gracefully handle URLs by including only a
plain text payload when "shift" is held down during a drag operation.

Improve the default behavior of our QMimeData payloads. We were using
some workarounds to support older versions of gnome-terminal that
required utf-16 encoding of mimedata URLs.

Modern versions do not need these workarounds. We can use utf-8 across
the board and everything works as expected.

Remove the cola.dragencoding configuration variable since it is no
longer needed.

Use only QMimeData::setText() and QMimeData::setUrls() instead of
manually building the QMimeData payloads using QMimeData::setData().

Closes #719
Reported-by: Taylor Braun-Jones <taylor@braun-jones.org>
Signed-off-by: David Aguilar <davvid@gmail.com>
CHANGES.rst
cola/models/browse.py
cola/qtutils.py
cola/widgets/status.py
docs/git-cola.rst