1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 13:57:35 +00:00

FileManager: Use FileOperation to perform drag&drop copy out-of-process

And display the progress of the copy operation in a separate window. :^)

Note that this patch only updates the drag&drop code path to use the new
mechanism. We still have to go through FileManager and make use of this
everywhere.

We also need to support additional operations, like Move, Delete, etc.

Still, this is quite cool! :^)
This commit is contained in:
Andreas Kling 2021-04-12 20:32:40 +02:00
parent 4205038c45
commit f54e290548
5 changed files with 292 additions and 6 deletions

View file

@ -0,0 +1,89 @@
@GUI::Widget {
fill_with_background_color: true
layout: @GUI::VerticalBoxLayout {
margins: [4, 4, 4, 4]
}
@GUI::Label {
text: "Copying files..."
text_alignment: "CenterLeft"
font_weight: "Bold"
fixed_height: 32
}
@GUI::HorizontalSeparator {
fixed_height: 2
}
@GUI::Widget {
fixed_height: 32
layout: @GUI::HorizontalBoxLayout {
}
@GUI::Label {
text: "Copying: "
font_weight: "Bold"
text_alignment: "CenterLeft"
fixed_width: 80
}
@GUI::Label {
name: "current_file_label"
text: "Placeholder"
text_alignment: "CenterLeft"
}
}
@GUI::ProgressBar {
fixed_height: 22
name: "current_file_progress_bar"
min: 0
}
@GUI::Widget {
fixed_height: 32
layout: @GUI::HorizontalBoxLayout {
}
@GUI::Label {
text: "Overall progress: "
font_weight: "Bold"
text_alignment: "CenterLeft"
fixed_width: 120
}
@GUI::Label {
name: "overall_progress_label"
text: "Placeholder"
text_alignment: "CenterLeft"
}
}
@GUI::ProgressBar {
fixed_height: 22
name: "overall_progress_bar"
min: 0
}
@GUI::Widget {
fixed_height: 2
}
@GUI::Widget {
shrink_to_fit: true
layout: @GUI::HorizontalBoxLayout {
}
@GUI::Widget {
}
@GUI::Button {
text: "Cancel"
name: "button"
fixed_width: 80
}
}
}