mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 21:17:45 +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:
parent
4205038c45
commit
f54e290548
5 changed files with 292 additions and 6 deletions
89
Userland/Applications/FileManager/FileOperationProgress.gml
Normal file
89
Userland/Applications/FileManager/FileOperationProgress.gml
Normal 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
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue