| 1 |
import QtQuick 2.4 |
| 2 |
import Lomiri.Components 1.3 |
| 3 |
import Lomiri.Components.Popups 1.3 |
| 4 |
|
| 5 |
import "templates" |
| 6 |
|
| 7 |
ConfirmDialog { |
| 8 |
id: rootItem |
| 9 |
|
| 10 |
property var folderModel |
| 11 |
property var fileOperationDialog |
| 12 |
property string filePath |
| 13 |
property string fileName |
| 14 |
|
| 15 |
destructiveDialog: true |
| 16 |
|
| 17 |
title: i18n.tr("Delete") |
| 18 |
text: i18n.tr("Are you sure you want to permanently delete '%1'?").arg(fileName) |
| 19 |
|
| 20 |
onAccepted: { |
| 21 |
console.log("Delete accepted for filePath, fileName", filePath, fileName) |
| 22 |
|
| 23 |
fileOperationDialog.startOperation(i18n.tr("Deleting files")) |
| 24 |
console.log("Doing delete") |
| 25 |
folderModel.rm(filePath) |
| 26 |
} |
| 27 |
} |