Warning, /pim/merkuro/src/mail/qml/actions/DeleteFolderAction.qml is written in an unsupported language. File is not indexed.
0001 // SPDX-FileCopyrightText: 2023 Aakarsh MJ <mj.akarsh@gmail.com> 0002 // SPDX-License-Identifier: GPL-2.0-or-later 0003 0004 import QtQuick 2.15 0005 import QtQuick.Controls 2.15 as QQC2 0006 import QtQuick.Layouts 1.15 0007 import org.kde.kirigami 2.19 as Kirigami 0008 import org.kde.merkuro.mail 1.0 0009 0010 Kirigami.Action { 0011 property var index 0012 property string name 0013 0014 readonly property Component deleteFolderDialogComponent: Component { 0015 id: deleteFolderDialogComponent 0016 0017 Kirigami.PromptDialog { 0018 id: deleteFolderDialog 0019 title: i18n("Delete Folder") 0020 standardButtons: Kirigami.Dialog.NoButton 0021 0022 customFooterActions: [ 0023 Kirigami.Action { 0024 text: i18n("Delete Folder") 0025 icon.name: "dialog-ok" 0026 onTriggered: { 0027 MailManager.deleteCollection(index); 0028 deleteFolderDialog.close(); 0029 } 0030 }, 0031 Kirigami.Action { 0032 text: i18n("Cancel") 0033 icon.name: "dialog-cancel" 0034 onTriggered: deleteFolderDialog.close() 0035 } 0036 ] 0037 0038 QQC2.TextArea { 0039 text: i18n("Are you sure you want to delete the folder %1, discarding its contents? <br /> <b>Beware</b> that discarded messages are not saved into your Trash folder and are permanently deleted.", name.toUpperCase()) 0040 textFormat: TextEdit.RichText 0041 background: null 0042 readOnly: true 0043 wrapMode: TextEdit.Wrap 0044 } 0045 } 0046 } 0047 0048 onTriggered: { 0049 const dialog = deleteFolderDialogComponent.createObject(applicationWindow()); 0050 dialog.open(); 0051 } 0052 }