Re-arrange the file and message context menus, add separators
Like the room context menu, this is a jumbled list of actions that could use some organization. Also, the text for "Copy Text" and "Copy Link" is clearer.
This commit is contained in:
@@ -42,15 +42,19 @@ DelegateContextMenu {
|
||||
* Each action will be instantiated as a single line in the menu.
|
||||
*/
|
||||
property list<Kirigami.Action> actions: [
|
||||
DelegateContextMenu.ReplyMessageAction {},
|
||||
Kirigami.Action {
|
||||
text: i18n("Open Externally")
|
||||
separator: true
|
||||
},
|
||||
Kirigami.Action {
|
||||
text: i18nc("@action:inmenu", "Open Image")
|
||||
icon.name: "document-open"
|
||||
onTriggered: {
|
||||
currentRoom.openEventMediaExternally(root.eventId);
|
||||
}
|
||||
},
|
||||
Kirigami.Action {
|
||||
text: i18nc("@action:inmenu", "Save As…")
|
||||
text: i18nc("@action:inmenu", "Save Image…")
|
||||
icon.name: "document-save"
|
||||
onTriggered: {
|
||||
var dialog = saveAsDialog.createObject(QQC2.Overlay.overlay);
|
||||
@@ -58,14 +62,16 @@ DelegateContextMenu {
|
||||
dialog.open();
|
||||
}
|
||||
},
|
||||
DelegateContextMenu.ReplyMessageAction {},
|
||||
Kirigami.Action {
|
||||
text: i18n("Copy")
|
||||
text: i18nc("@action:inmenu", "Copy Image")
|
||||
icon.name: "edit-copy"
|
||||
onTriggered: {
|
||||
currentRoom.copyEventMedia(root.eventId);
|
||||
}
|
||||
},
|
||||
Kirigami.Action {
|
||||
separator: true
|
||||
},
|
||||
Kirigami.Action {
|
||||
visible: author.id === currentRoom.localMember.id || currentRoom.canSendState("redact")
|
||||
text: i18n("Remove")
|
||||
@@ -88,7 +94,13 @@ DelegateContextMenu {
|
||||
},
|
||||
DelegateContextMenu.ReportMessageAction {},
|
||||
DelegateContextMenu.ShowUserAction {},
|
||||
DelegateContextMenu.ViewSourceAction {}
|
||||
Kirigami.Action {
|
||||
separator: true
|
||||
visible: viewSourceAction.visible
|
||||
},
|
||||
DelegateContextMenu.ViewSourceAction {
|
||||
id: viewSourceAction
|
||||
}
|
||||
]
|
||||
|
||||
/**
|
||||
|
||||
@@ -59,21 +59,30 @@ DelegateContextMenu {
|
||||
});
|
||||
}
|
||||
},
|
||||
Kirigami.Action {
|
||||
separator: true
|
||||
},
|
||||
DelegateContextMenu.RemoveMessageAction {},
|
||||
Kirigami.Action {
|
||||
text: i18n("Copy")
|
||||
text: i18nc("@action:inmenu", "Copy Text")
|
||||
icon.name: "edit-copy"
|
||||
onTriggered: Clipboard.saveText(root.selectedText.length > 0 ? root.selectedText : root.plainText)
|
||||
},
|
||||
DelegateContextMenu.ReportMessageAction {},
|
||||
DelegateContextMenu.ShowUserAction {},
|
||||
DelegateContextMenu.ViewSourceAction {},
|
||||
Kirigami.Action {
|
||||
text: i18n("Copy Link")
|
||||
text: i18nc("@action:inmenu", "Copy Message Link")
|
||||
icon.name: "edit-copy"
|
||||
onTriggered: {
|
||||
Clipboard.saveText("https://matrix.to/#/" + currentRoom.id + "/" + root.eventId);
|
||||
}
|
||||
},
|
||||
DelegateContextMenu.ReportMessageAction {},
|
||||
DelegateContextMenu.ShowUserAction {},
|
||||
Kirigami.Action {
|
||||
separator: true
|
||||
visible: viewSourceAction.visible
|
||||
},
|
||||
DelegateContextMenu.ViewSourceAction {
|
||||
id: viewSourceAction
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user