diff --git a/src/app/CMakeLists.txt b/src/app/CMakeLists.txt index b2e681cdc..d9b8f31c1 100644 --- a/src/app/CMakeLists.txt +++ b/src/app/CMakeLists.txt @@ -122,7 +122,6 @@ if(NOT ANDROID AND NOT WIN32) qt_target_qml_sources(neochat QML_FILES qml/ShareAction.qml qml/GlobalMenu.qml - qml/EditMenu.qml ) else() qt_target_qml_sources(neochat QML_FILES diff --git a/src/app/qml/EditMenu.qml b/src/app/qml/EditMenu.qml deleted file mode 100644 index a63334898..000000000 --- a/src/app/qml/EditMenu.qml +++ /dev/null @@ -1,86 +0,0 @@ -// SPDX-FileCopyrightText: 2021 Carson Black -// SPDX-License-Identifier: LGPL-2.0-or-later - -import Qt.labs.platform as Labs -import QtQuick -import QtQuick.Layouts - -Labs.Menu { - id: root - - required property Item field - - Labs.MenuItem { - enabled: root.field !== null && root.field.canUndo - text: i18nc("text editing menu action", "Undo") - shortcut: StandardKey.Undo - onTriggered: { - root.field.undo(); - root.close(); - } - } - - Labs.MenuItem { - enabled: root.field !== null && root.field.canRedo - text: i18nc("text editing menu action", "Redo") - shortcut: StandardKey.Redo - onTriggered: { - root.field.undo(); - root.close(); - } - } - - Labs.MenuSeparator {} - - Labs.MenuItem { - enabled: root.field !== null && root.field.selectedText - text: i18nc("text editing menu action", "Cut") - shortcut: StandardKey.Cut - onTriggered: { - root.field.cut(); - root.close(); - } - } - - Labs.MenuItem { - enabled: root.field !== null && root.field.selectedText - text: i18nc("text editing menu action", "Copy") - shortcut: StandardKey.Copy - onTriggered: { - root.field.copy(); - root.close(); - } - } - - Labs.MenuItem { - enabled: root.field !== null && root.field.canPaste - text: i18nc("text editing menu action", "Paste") - shortcut: StandardKey.Paste - onTriggered: { - root.field.paste(); - root.close(); - } - } - - Labs.MenuItem { - enabled: root.field !== null && root.field.selectedText !== "" - text: i18nc("text editing menu action", "Delete") - shortcut: "" - onTriggered: { - root.field.remove(root.field.selectionStart, root.field.selectionEnd); - root.close(); - } - } - - Labs.MenuSeparator {} - - Labs.MenuItem { - enabled: root.field !== null - text: i18nc("text editing menu action", "Select All") - shortcut: StandardKey.SelectAll - onTriggered: { - root.field.selectAll(); - root.close(); - } - } -} diff --git a/src/app/qml/GlobalMenu.qml b/src/app/qml/GlobalMenu.qml index 54bf0fd78..90fda4b08 100644 --- a/src/app/qml/GlobalMenu.qml +++ b/src/app/qml/GlobalMenu.qml @@ -71,10 +71,7 @@ Labs.MenuBar { onTriggered: Qt.quit() } } - EditMenu { - title: i18nc("menu", "Edit") - field: (root.activeFocusItem instanceof TextEdit || root.activeFocusItem instanceof TextInput) ? root.activeFocusItem : null - } + Labs.Menu { title: i18nc("menu", "View")