Handbook
Glossary
merger-window ( -- )
Vocabulary
merger
Inputs
None
Outputs
None
Definition
USING:
accessors
arrays
file-picker
io.directories
kernel
math.rectangles
models
sequences
sets
ui
ui.gadgets
ui.gadgets.buttons
ui.gadgets.glass
ui.gadgets.labeled
ui.gadgets.labels
ui.gadgets.tracks
ui.gadgets.worlds
;
IN:
merger
:
merger-window
( -- )
[
f
T{
world-attributes
{
title
"Merging"
}
{
pref-dim
{
300 220
}
}
}
clone
vertical
<track>
{
"From:"
"To:"
}
f
<model>
f
<model>
2array
[
[
"…"
[
open-file-dialog
[
first
~quotation~ ~quotation~
2bi
]
[
drop
]
if*
]
<border-button>
swap
>>model
swap
<labeled-gadget>
1
track-add
]
2each
]
keep
dup
first2
[
[
"."
]
]
dip
[
value>>
[
[
directory-files
]
bi@
diff
]
keep
copy-files-into
]
curry
compose
[
[
[
<zero-rect>
show-glass
]
]
dip
[
value>>
]
curry
compose
]
dip
[
with-directory
]
curry
compose
[
[
parent>>
"processing..."
<label>
]
]
dip
[
keep
hide-glass
]
curry
compose
[
[
[
value>>
]
all?
]
curry
]
dip
[
[
drop
]
if
]
curry
compose
"merge"
swap
<border-button>
0.4
track-add
>>gadgets
open-window
]
with-ui
;