Accept ctrl-c to copy selected messages

This commit is contained in:
miruka 2019-09-01 00:22:18 -04:00
parent 131a20e9c5
commit 522d078d7b
3 changed files with 14 additions and 2 deletions

View File

@ -1,9 +1,9 @@
- Message selection
- Copying messages (shortcut)
- Copy names
- Copy text with triple click, copy text + name + date with quadruple click
- Copy to X11 selection
- Make scroll wheel usable
- Clear selection when focusing composer
- Refactoring
- Banners

View File

@ -1 +1,3 @@
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M7 13h10v1h-10v-1zm15-11v22h-20v-22h3c1.229 0 2.18-1.084 3-2h8c.82.916 1.771 2 3 2h3zm-11 1c0 .552.448 1 1 1s1-.448 1-1-.448-1-1-1-1 .448-1 1zm9 15.135c-1.073 1.355-2.448 2.763-3.824 3.865h3.824v-3.865zm0-14.135h-4l-2 2h-3.898l-2.102-2h-4v18h7.362c4.156 0 2.638-6 2.638-6s6 1.65 6-2.457v-9.543zm-13 12h5v-1h-5v1zm0-4h10v-1h-10v1zm0-2h10v-1h-10v1z"/></svg>
<svg height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg">
<path d="m7 13h10v1h-10zm15-11v22h-20v-22h3c1.229 0 2.18-1.084 3-2h8c.82.916 1.771 2 3 2zm-11 1c0 .552.448 1 1 1s1-.448 1-1-.448-1-1-1-1 .448-1 1zm9 15.135c-1.073 1.355-2.448 2.763-3.824 3.865h3.824zm0-14.135h-4l-2 2h-3.898l-2.102-2h-4v18h7.362c4.156 0 2.638-6 2.638-6s6 1.65 6-2.457zm-13 12h5v-1h-5zm0-4h10v-1h-10zm0-2h10v-1h-10z"/>
</svg>

Before

Width:  |  Height:  |  Size: 447 B

After

Width:  |  Height:  |  Size: 429 B

View File

@ -1,5 +1,6 @@
import QtQuick 2.12
import QtQuick.Controls 2.12
import "../utils.js" as Utils
TextEdit {
id: label
@ -15,6 +16,15 @@ TextEdit {
onLinkActivated: Qt.openUrlExternally(link)
Keys.onPressed: ev => {
if (ev.matches(StandardKey.Copy)) {
ev.accepted = true
Utils.copyToClipboard(container.joinedSelection)
return
}
ev.accepted = false
}
property HSelectableLabelContainer container
property int index