Save file dialog: added delete file/dir button

This commit is contained in:
Stefan Frederik 2021-03-18 17:16:46 +01:00
parent 447fca1b66
commit 7d4c208027
1 changed files with 5 additions and 4 deletions

View File

@ -1350,10 +1350,11 @@ proc load_file_dialog {{msg {}} {ext {}} {global_initdir {INITIALINSTDIR}} {init
load_file_dialog_mkdir [.dialog.buttons.newdir get]
}
button .dialog.buttons.rmdir -width 5 -text Delete -command {
load_file_dialog_mkdir [.dialog.buttons.newdir get]
file delete "${myload_dir1}/[.dialog.buttons.newdir get]"
setglob ${myload_dir1}
myload_set_colors2
if { [.dialog.buttons.newdir get] ne {} } {
file delete "${myload_dir1}/[.dialog.buttons.newdir get]"
setglob ${myload_dir1}
myload_set_colors2
}
}
button .dialog.buttons.pwd -text {Current file dir} -command {
bind .dialog.l.paneright.pre <Expose> {}