|
|
|
@ -17,87 +17,19 @@
|
|
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
import QtQuick 2.12
|
|
|
|
|
|
|
|
import QtQuick.Controls 2.12
|
|
|
|
|
|
|
|
import QtQuick.Window 2.12
|
|
|
|
|
|
|
|
import QtQuick.Layouts 1.12
|
|
|
|
|
|
|
|
import FishUI 1.0 as FishUI
|
|
|
|
import FishUI 1.0 as FishUI
|
|
|
|
import Cutefish.FileManager 1.0
|
|
|
|
import Cutefish.FileManager 1.0
|
|
|
|
|
|
|
|
|
|
|
|
FishUI.Window {
|
|
|
|
FishUI.ConfirmDialog {
|
|
|
|
id: control
|
|
|
|
title: qsTr("Empty Trash")
|
|
|
|
|
|
|
|
text: qsTr("Do you want to permanently delete all files from the Trash?")
|
|
|
|
title: qsTr("File Manager")
|
|
|
|
cancelText: qsTr("Cancel")
|
|
|
|
flags: Qt.Dialog | Qt.FramelessWindowHint | Qt.WindowStaysOnTopHint
|
|
|
|
confirmText: qsTr("Empty Trash")
|
|
|
|
minimizeButtonVisible: false
|
|
|
|
destructive: true
|
|
|
|
visible: true
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
property int contentWidth: 300 + FishUI.Units.largeSpacing * 2
|
|
|
|
|
|
|
|
property int contentHeight: _mainLayout.implicitHeight + control.header.height + FishUI.Units.largeSpacing
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
width: contentWidth
|
|
|
|
|
|
|
|
height: contentHeight
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// x: Screen.virtualX + (Screen.width - contentWidth) / 2
|
|
|
|
|
|
|
|
// y: Screen.virtualY + (Screen.height - contentHeight) / 2
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
minimumWidth: contentWidth
|
|
|
|
|
|
|
|
minimumHeight: contentHeight
|
|
|
|
|
|
|
|
maximumWidth: contentWidth
|
|
|
|
|
|
|
|
maximumHeight: contentHeight
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
headerBackground.color: FishUI.Theme.secondBackgroundColor
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
DragHandler {
|
|
|
|
|
|
|
|
target: null
|
|
|
|
|
|
|
|
acceptedDevices: PointerDevice.Mouse | PointerDevice.TouchPad
|
|
|
|
|
|
|
|
grabPermissions: PointerHandler.CanTakeOverFromItems | PointerHandler.CanTakeOverFromHandlersOfDifferentType | PointerHandler.ApprovesTakeOverByAnything
|
|
|
|
|
|
|
|
onActiveChanged: if (active) { control.helper.startSystemMove(control) }
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Fm {
|
|
|
|
Fm {
|
|
|
|
id: fm
|
|
|
|
id: fm
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
Rectangle {
|
|
|
|
onAccepted: fm.emptyTrash()
|
|
|
|
anchors.fill: parent
|
|
|
|
|
|
|
|
color: FishUI.Theme.secondBackgroundColor
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ColumnLayout {
|
|
|
|
|
|
|
|
id: _mainLayout
|
|
|
|
|
|
|
|
anchors.fill: parent
|
|
|
|
|
|
|
|
anchors.topMargin: 0
|
|
|
|
|
|
|
|
anchors.leftMargin: FishUI.Units.largeSpacing
|
|
|
|
|
|
|
|
anchors.rightMargin: FishUI.Units.largeSpacing
|
|
|
|
|
|
|
|
anchors.bottomMargin: FishUI.Units.largeSpacing
|
|
|
|
|
|
|
|
spacing: FishUI.Units.largeSpacing
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Label {
|
|
|
|
|
|
|
|
text: qsTr("Do you want to permanently delete all files from the Trash?")
|
|
|
|
|
|
|
|
Layout.fillWidth: true
|
|
|
|
|
|
|
|
wrapMode: Text.Wrap
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
RowLayout {
|
|
|
|
|
|
|
|
spacing: FishUI.Units.largeSpacing
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Button {
|
|
|
|
|
|
|
|
text: qsTr("Cancel")
|
|
|
|
|
|
|
|
Layout.fillWidth: true
|
|
|
|
|
|
|
|
onClicked: control.close()
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Button {
|
|
|
|
|
|
|
|
text: qsTr("Empty Trash")
|
|
|
|
|
|
|
|
focus: true
|
|
|
|
|
|
|
|
Layout.fillWidth: true
|
|
|
|
|
|
|
|
onClicked: {
|
|
|
|
|
|
|
|
fm.emptyTrash()
|
|
|
|
|
|
|
|
control.close()
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
flat: true
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|