Warning, /multimedia/haruna/src/qml/Menus/FileMenu.qml is written in an unsupported language. File is not indexed.
0001 /* 0002 * SPDX-FileCopyrightText: 2020 George Florea Bănuș <georgefb899@gmail.com> 0003 * 0004 * SPDX-License-Identifier: GPL-3.0-or-later 0005 */ 0006 0007 import QtQuick 0008 import QtQuick.Controls 0009 0010 Menu { 0011 id: root 0012 0013 title: i18nc("@title:menu", "&File") 0014 0015 MenuItem { action: appActions.openFileAction } 0016 MenuItem { action: appActions.openUrlAction } 0017 MenuItem { action: appActions.loadLastPlayedFileAction } 0018 0019 Menu { 0020 id: recentFilesMenu 0021 0022 title: i18nc("@title:menu", "Recent Files") 0023 0024 Instantiator { 0025 model: recentFilesModel 0026 delegate: MenuItem { 0027 text: model.name 0028 onClicked: { 0029 recentFilesMenu.dismiss() 0030 window.openFile(model.path) 0031 } 0032 } 0033 onObjectAdded: (index, object) => recentFilesMenu.insertItem(index, object) 0034 onObjectRemoved: (index, object) => recentFilesMenu.removeItem(object) 0035 } 0036 0037 MenuSeparator {} 0038 MenuItem { 0039 text: i18nc("@action:inmenu", "Clear List") 0040 onClicked: recentFilesModel.deleteEntries() 0041 } 0042 } 0043 0044 0045 MenuSeparator {} 0046 0047 MenuItem { action: appActions.quitApplicationAction } 0048 }