mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-11-29 22:28:49 +03:00
Added mnemonic letters to context menu.
https://doc.qt.io/qt-5/qshortcut.html#mnemonic
This commit is contained in:
parent
409992686e
commit
9d25124810
1 changed files with 12 additions and 12 deletions
|
@ -122,14 +122,14 @@ Page {
|
||||||
Platform.MenuItem {
|
Platform.MenuItem {
|
||||||
visible: messageContextMenu.text
|
visible: messageContextMenu.text
|
||||||
enabled: visible
|
enabled: visible
|
||||||
text: qsTr("Copy")
|
text: qsTr("&Copy")
|
||||||
onTriggered: Clipboard.text = messageContextMenu.text
|
onTriggered: Clipboard.text = messageContextMenu.text
|
||||||
}
|
}
|
||||||
|
|
||||||
Platform.MenuItem {
|
Platform.MenuItem {
|
||||||
visible: messageContextMenu.link
|
visible: messageContextMenu.link
|
||||||
enabled: visible
|
enabled: visible
|
||||||
text: qsTr("Copy link location")
|
text: qsTr("Copy &link location")
|
||||||
onTriggered: Clipboard.text = messageContextMenu.link
|
onTriggered: Clipboard.text = messageContextMenu.link
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -137,7 +137,7 @@ Page {
|
||||||
id: reactionOption
|
id: reactionOption
|
||||||
|
|
||||||
visible: TimelineManager.timeline ? TimelineManager.timeline.permissions.canSend(MtxEvent.Reaction) : false
|
visible: TimelineManager.timeline ? TimelineManager.timeline.permissions.canSend(MtxEvent.Reaction) : false
|
||||||
text: qsTr("React")
|
text: qsTr("Re&act")
|
||||||
onTriggered: emojiPopup.show(null, function(emoji) {
|
onTriggered: emojiPopup.show(null, function(emoji) {
|
||||||
TimelineManager.queueReactionMessage(messageContextMenu.eventId, emoji);
|
TimelineManager.queueReactionMessage(messageContextMenu.eventId, emoji);
|
||||||
})
|
})
|
||||||
|
@ -145,25 +145,25 @@ Page {
|
||||||
|
|
||||||
Platform.MenuItem {
|
Platform.MenuItem {
|
||||||
visible: TimelineManager.timeline ? TimelineManager.timeline.permissions.canSend(MtxEvent.TextMessage) : false
|
visible: TimelineManager.timeline ? TimelineManager.timeline.permissions.canSend(MtxEvent.TextMessage) : false
|
||||||
text: qsTr("Reply")
|
text: qsTr("Repl&y")
|
||||||
onTriggered: TimelineManager.timeline.replyAction(messageContextMenu.eventId)
|
onTriggered: TimelineManager.timeline.replyAction(messageContextMenu.eventId)
|
||||||
}
|
}
|
||||||
|
|
||||||
Platform.MenuItem {
|
Platform.MenuItem {
|
||||||
visible: messageContextMenu.isEditable && (TimelineManager.timeline ? TimelineManager.timeline.permissions.canSend(MtxEvent.TextMessage) : false)
|
visible: messageContextMenu.isEditable && (TimelineManager.timeline ? TimelineManager.timeline.permissions.canSend(MtxEvent.TextMessage) : false)
|
||||||
enabled: visible
|
enabled: visible
|
||||||
text: qsTr("Edit")
|
text: qsTr("&Edit")
|
||||||
onTriggered: TimelineManager.timeline.editAction(messageContextMenu.eventId)
|
onTriggered: TimelineManager.timeline.editAction(messageContextMenu.eventId)
|
||||||
}
|
}
|
||||||
|
|
||||||
Platform.MenuItem {
|
Platform.MenuItem {
|
||||||
text: qsTr("Read receipts")
|
text: qsTr("Read receip&ts")
|
||||||
onTriggered: TimelineManager.timeline.readReceiptsAction(messageContextMenu.eventId)
|
onTriggered: TimelineManager.timeline.readReceiptsAction(messageContextMenu.eventId)
|
||||||
}
|
}
|
||||||
|
|
||||||
Platform.MenuItem {
|
Platform.MenuItem {
|
||||||
visible: messageContextMenu.eventType == MtxEvent.ImageMessage || messageContextMenu.eventType == MtxEvent.VideoMessage || messageContextMenu.eventType == MtxEvent.AudioMessage || messageContextMenu.eventType == MtxEvent.FileMessage || messageContextMenu.eventType == MtxEvent.Sticker || messageContextMenu.eventType == MtxEvent.TextMessage || messageContextMenu.eventType == MtxEvent.LocationMessage || messageContextMenu.eventType == MtxEvent.EmoteMessage || messageContextMenu.eventType == MtxEvent.NoticeMessage
|
visible: messageContextMenu.eventType == MtxEvent.ImageMessage || messageContextMenu.eventType == MtxEvent.VideoMessage || messageContextMenu.eventType == MtxEvent.AudioMessage || messageContextMenu.eventType == MtxEvent.FileMessage || messageContextMenu.eventType == MtxEvent.Sticker || messageContextMenu.eventType == MtxEvent.TextMessage || messageContextMenu.eventType == MtxEvent.LocationMessage || messageContextMenu.eventType == MtxEvent.EmoteMessage || messageContextMenu.eventType == MtxEvent.NoticeMessage
|
||||||
text: qsTr("Forward")
|
text: qsTr("&Forward")
|
||||||
onTriggered: {
|
onTriggered: {
|
||||||
var forwardMess = forwardCompleterComponent.createObject(timelineRoot);
|
var forwardMess = forwardCompleterComponent.createObject(timelineRoot);
|
||||||
forwardMess.setMessageEventId(messageContextMenu.eventId);
|
forwardMess.setMessageEventId(messageContextMenu.eventId);
|
||||||
|
@ -172,7 +172,7 @@ Page {
|
||||||
}
|
}
|
||||||
|
|
||||||
Platform.MenuItem {
|
Platform.MenuItem {
|
||||||
text: qsTr("Mark as read")
|
text: qsTr("&Mark as read")
|
||||||
}
|
}
|
||||||
|
|
||||||
Platform.MenuItem {
|
Platform.MenuItem {
|
||||||
|
@ -190,28 +190,28 @@ Page {
|
||||||
|
|
||||||
Platform.MenuItem {
|
Platform.MenuItem {
|
||||||
visible: (TimelineManager.timeline ? TimelineManager.timeline.permissions.canRedact() : false) || messageContextMenu.isSender
|
visible: (TimelineManager.timeline ? TimelineManager.timeline.permissions.canRedact() : false) || messageContextMenu.isSender
|
||||||
text: qsTr("Remove message")
|
text: qsTr("Remo&ve message")
|
||||||
onTriggered: TimelineManager.timeline.redactEvent(messageContextMenu.eventId)
|
onTriggered: TimelineManager.timeline.redactEvent(messageContextMenu.eventId)
|
||||||
}
|
}
|
||||||
|
|
||||||
Platform.MenuItem {
|
Platform.MenuItem {
|
||||||
visible: messageContextMenu.eventType == MtxEvent.ImageMessage || messageContextMenu.eventType == MtxEvent.VideoMessage || messageContextMenu.eventType == MtxEvent.AudioMessage || messageContextMenu.eventType == MtxEvent.FileMessage || messageContextMenu.eventType == MtxEvent.Sticker
|
visible: messageContextMenu.eventType == MtxEvent.ImageMessage || messageContextMenu.eventType == MtxEvent.VideoMessage || messageContextMenu.eventType == MtxEvent.AudioMessage || messageContextMenu.eventType == MtxEvent.FileMessage || messageContextMenu.eventType == MtxEvent.Sticker
|
||||||
enabled: visible
|
enabled: visible
|
||||||
text: qsTr("Save as")
|
text: qsTr("&Save as")
|
||||||
onTriggered: TimelineManager.timeline.saveMedia(messageContextMenu.eventId)
|
onTriggered: TimelineManager.timeline.saveMedia(messageContextMenu.eventId)
|
||||||
}
|
}
|
||||||
|
|
||||||
Platform.MenuItem {
|
Platform.MenuItem {
|
||||||
visible: messageContextMenu.eventType == MtxEvent.ImageMessage || messageContextMenu.eventType == MtxEvent.VideoMessage || messageContextMenu.eventType == MtxEvent.AudioMessage || messageContextMenu.eventType == MtxEvent.FileMessage || messageContextMenu.eventType == MtxEvent.Sticker
|
visible: messageContextMenu.eventType == MtxEvent.ImageMessage || messageContextMenu.eventType == MtxEvent.VideoMessage || messageContextMenu.eventType == MtxEvent.AudioMessage || messageContextMenu.eventType == MtxEvent.FileMessage || messageContextMenu.eventType == MtxEvent.Sticker
|
||||||
enabled: visible
|
enabled: visible
|
||||||
text: qsTr("Open in external program")
|
text: qsTr("&Open in external program")
|
||||||
onTriggered: TimelineManager.timeline.openMedia(messageContextMenu.eventId)
|
onTriggered: TimelineManager.timeline.openMedia(messageContextMenu.eventId)
|
||||||
}
|
}
|
||||||
|
|
||||||
Platform.MenuItem {
|
Platform.MenuItem {
|
||||||
visible: messageContextMenu.eventId
|
visible: messageContextMenu.eventId
|
||||||
enabled: visible
|
enabled: visible
|
||||||
text: qsTr("Copy link to event")
|
text: qsTr("Copy link to eve&nt")
|
||||||
onTriggered: TimelineManager.timeline.copyLinkToEvent(messageContextMenu.eventId)
|
onTriggered: TimelineManager.timeline.copyLinkToEvent(messageContextMenu.eventId)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue