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.
|
* Each action will be instantiated as a single line in the menu.
|
||||||
*/
|
*/
|
||||||
property list<Kirigami.Action> actions: [
|
property list<Kirigami.Action> actions: [
|
||||||
|
DelegateContextMenu.ReplyMessageAction {},
|
||||||
Kirigami.Action {
|
Kirigami.Action {
|
||||||
text: i18n("Open Externally")
|
separator: true
|
||||||
|
},
|
||||||
|
Kirigami.Action {
|
||||||
|
text: i18nc("@action:inmenu", "Open Image")
|
||||||
icon.name: "document-open"
|
icon.name: "document-open"
|
||||||
onTriggered: {
|
onTriggered: {
|
||||||
currentRoom.openEventMediaExternally(root.eventId);
|
currentRoom.openEventMediaExternally(root.eventId);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
Kirigami.Action {
|
Kirigami.Action {
|
||||||
text: i18nc("@action:inmenu", "Save As…")
|
text: i18nc("@action:inmenu", "Save Image…")
|
||||||
icon.name: "document-save"
|
icon.name: "document-save"
|
||||||
onTriggered: {
|
onTriggered: {
|
||||||
var dialog = saveAsDialog.createObject(QQC2.Overlay.overlay);
|
var dialog = saveAsDialog.createObject(QQC2.Overlay.overlay);
|
||||||
@@ -58,14 +62,16 @@ DelegateContextMenu {
|
|||||||
dialog.open();
|
dialog.open();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
DelegateContextMenu.ReplyMessageAction {},
|
|
||||||
Kirigami.Action {
|
Kirigami.Action {
|
||||||
text: i18n("Copy")
|
text: i18nc("@action:inmenu", "Copy Image")
|
||||||
icon.name: "edit-copy"
|
icon.name: "edit-copy"
|
||||||
onTriggered: {
|
onTriggered: {
|
||||||
currentRoom.copyEventMedia(root.eventId);
|
currentRoom.copyEventMedia(root.eventId);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
Kirigami.Action {
|
||||||
|
separator: true
|
||||||
|
},
|
||||||
Kirigami.Action {
|
Kirigami.Action {
|
||||||
visible: author.id === currentRoom.localMember.id || currentRoom.canSendState("redact")
|
visible: author.id === currentRoom.localMember.id || currentRoom.canSendState("redact")
|
||||||
text: i18n("Remove")
|
text: i18n("Remove")
|
||||||
@@ -88,7 +94,13 @@ DelegateContextMenu {
|
|||||||
},
|
},
|
||||||
DelegateContextMenu.ReportMessageAction {},
|
DelegateContextMenu.ReportMessageAction {},
|
||||||
DelegateContextMenu.ShowUserAction {},
|
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 {},
|
DelegateContextMenu.RemoveMessageAction {},
|
||||||
Kirigami.Action {
|
Kirigami.Action {
|
||||||
text: i18n("Copy")
|
text: i18nc("@action:inmenu", "Copy Text")
|
||||||
icon.name: "edit-copy"
|
icon.name: "edit-copy"
|
||||||
onTriggered: Clipboard.saveText(root.selectedText.length > 0 ? root.selectedText : root.plainText)
|
onTriggered: Clipboard.saveText(root.selectedText.length > 0 ? root.selectedText : root.plainText)
|
||||||
},
|
},
|
||||||
DelegateContextMenu.ReportMessageAction {},
|
|
||||||
DelegateContextMenu.ShowUserAction {},
|
|
||||||
DelegateContextMenu.ViewSourceAction {},
|
|
||||||
Kirigami.Action {
|
Kirigami.Action {
|
||||||
text: i18n("Copy Link")
|
text: i18nc("@action:inmenu", "Copy Message Link")
|
||||||
icon.name: "edit-copy"
|
icon.name: "edit-copy"
|
||||||
onTriggered: {
|
onTriggered: {
|
||||||
Clipboard.saveText("https://matrix.to/#/" + currentRoom.id + "/" + root.eventId);
|
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