Skip to content

Commit

Permalink
fix(client/xml-editor): restore copy, cut and paste menu entries
Browse files Browse the repository at this point in the history
This restores also the actual actions on Mac.

Closes #868
Closes #814
  • Loading branch information
barmac authored and merge-me[bot] committed Jul 30, 2019
1 parent 5dcc968 commit 50bb68c
Showing 1 changed file with 51 additions and 30 deletions.
81 changes: 51 additions & 30 deletions client/src/app/tabs/xml/getXMLEditMenu.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,33 +8,54 @@
* except in compliance with the MIT License.
*/

import {
getUndoRedoEntries
} from '../getEditMenu';

function getXMLFindEntries() {
return [{
label: 'Find',
accelerator: 'CommandOrControl+F',
action: 'find'
}, {
label: 'Find Next',
accelerator: 'Shift+CommandOrControl+N',
action: 'findNext'
}, {
label: 'Find Previous',
accelerator: 'Shift+CommandOrControl+P',
action: 'findPrev'
}, {
label: 'Replace',
accelerator: 'Shift+CommandOrControl+F',
action: 'replace'
}];
}

export function getXMLEditMenu(state) {
return [
getUndoRedoEntries(state),
getXMLFindEntries()
];
}
import {
getUndoRedoEntries
} from '../getEditMenu';

function getXMLFindEntries() {
return [{
label: 'Find',
accelerator: 'CommandOrControl+F',
action: 'find'
}, {
label: 'Find Next',
accelerator: 'Shift+CommandOrControl+N',
action: 'findNext'
}, {
label: 'Find Previous',
accelerator: 'Shift+CommandOrControl+P',
action: 'findPrev'
}, {
label: 'Replace',
accelerator: 'Shift+CommandOrControl+F',
action: 'replace'
}];
}

function getXMLCopyCutPasteEntries() {
return [
{
label: 'Cut',
accelerator: 'CmdOrCtrl+X',
role: 'cut'
},
{
label: 'Copy',
accelerator: 'CmdOrCtrl+C',
role: 'copy'
},
{
label: 'Paste',
accelerator: 'CmdOrCtrl+V',
role: 'paste'
}
];
}

export function getXMLEditMenu(state) {
return [
getUndoRedoEntries(state),
getXMLCopyCutPasteEntries(),
getXMLFindEntries()
];
}

0 comments on commit 50bb68c

Please sign in to comment.