Improved xorriso-tcltk dialog about overwriting of existing files
This commit is contained in:
parent
110b27a4ec
commit
8fabbf7a95
@ -1,8 +1,9 @@
|
||||
------------------------------------------------------------------------------
|
||||
xorriso-tcltk
|
||||
------------------------------------------------------------------------------
|
||||
Copyright (C) 2012, Thomas Schmitt <scdbackup@gmx.net>, libburnia-project.org
|
||||
Provided under GNU GPL version 2 or later.
|
||||
Copyright (C) 2012 - 2013
|
||||
Thomas Schmitt <scdbackup@gmx.net>, libburnia-project.org
|
||||
Provided under BSD license: Use, modify, and distribute as you like.
|
||||
------------------------------------------------------------------------------
|
||||
|
||||
xorriso-tcltk is mainly a proof of concept for a frontend that operates
|
||||
|
@ -1,8 +1,9 @@
|
||||
#!/usr/bin/wish
|
||||
#
|
||||
# xorriso-tcltk
|
||||
# Copyright (C) 2012, Thomas Schmitt <scdbackup@gmx.net>, libburnia project.
|
||||
# Provided under GNU GPL version 2 or later.
|
||||
# Copyright (C) 2012 - 2013
|
||||
# Thomas Schmitt <scdbackup@gmx.net>, libburnia project.
|
||||
# Provided under BSD license: Use, modify, and distribute as you like.
|
||||
#
|
||||
# This is mainly a proof of concept for xorriso serving under a frontend.
|
||||
# It exercises several fundamental gestures of communication:
|
||||
@ -17,8 +18,14 @@
|
||||
# Further it has to perform integer arithmetics and string manipulations.
|
||||
# And, well, a graphical widget set would be nice.
|
||||
|
||||
|
||||
set own_version "1.2.5"
|
||||
|
||||
# Minimum version of xorriso to be used as backend provess.
|
||||
# Older versions of xorriso do not offer commands -msg_op and -launch_frontend
|
||||
set min_xorriso_version "1.2.5"
|
||||
|
||||
|
||||
proc print_usage {argv0} {
|
||||
puts stderr "Usage:"
|
||||
puts stderr " $argv0 \[options\]"
|
||||
@ -698,10 +705,9 @@ proc isofs_filetype {path} {
|
||||
# enough. This is done before sending xorriso the setup commands.
|
||||
#
|
||||
proc check_xorriso_version {} {
|
||||
global sieve_ret result_list pre_msglist xorriso_version
|
||||
global sieve_ret result_list pre_msglist xorriso_version min_xorriso_version
|
||||
global reply_conn
|
||||
|
||||
set min_version "1.2.5"
|
||||
set version "0.0.0 (= unknown)"
|
||||
|
||||
set disp_en_mem [set_display_msg 0]
|
||||
@ -719,11 +725,11 @@ proc check_xorriso_version {} {
|
||||
|
||||
set xorriso_version [wait_for_msg "xorriso version : " "R"]
|
||||
|
||||
if {"$xorriso_version" < "$min_version"} {
|
||||
if {"$xorriso_version" < "$min_xorriso_version"} {
|
||||
puts stderr "xorriso-tcltk: xorriso-$xorriso_version is too old."
|
||||
puts stderr "xorriso-tcltk: Need at least version $min_version"
|
||||
puts stderr "xorriso-tcltk: Need at least version $min_xorriso_version"
|
||||
window_ack \
|
||||
"xorriso-$xorriso_version is too old. Need at least version $min_version" \
|
||||
"xorriso-$xorriso_version is too old. Need at least version $min_xorriso_version" \
|
||||
"red" "embedded"
|
||||
central_exit 2
|
||||
}
|
||||
@ -1007,6 +1013,9 @@ set burn_write_defect_mgt 0
|
||||
# Answer of yes/no window
|
||||
set answer_of_yesno ""
|
||||
|
||||
# Semi-persistent answers of yes/no window
|
||||
set yesno_to_all 0
|
||||
|
||||
# The hard disk filesystem address to be mapped into isodir_adr
|
||||
set insert_from_adr ""
|
||||
|
||||
@ -1026,7 +1035,7 @@ set extract_to_adr ""
|
||||
set extract_underneath 1
|
||||
|
||||
# Whether to insert at or under the selected .isolist item
|
||||
set extract_from_selected 0
|
||||
set extract_from_selected 1
|
||||
|
||||
# Whether to temporarily enforce rwx permissions for target directories on disk
|
||||
set extract_auto_chmod 0
|
||||
@ -1298,7 +1307,7 @@ proc scan_for_drives {} {
|
||||
|
||||
|
||||
# Refresh the display after some xorriso may have changed the status
|
||||
# Called by the "Refresh state" display button and others.
|
||||
# Called by the "Refresh disp" button and others.
|
||||
#
|
||||
proc refresh_state {} {
|
||||
refresh_indev
|
||||
@ -1526,7 +1535,7 @@ proc isodir_up {} {
|
||||
|
||||
# Rename resp. move the files which are selected in the .isolist box.
|
||||
# The target is defined by the .isomanip_move_target text field.
|
||||
# Called when the "Rename to:" button is hit.
|
||||
# Called when the "Move to:" button is hit.
|
||||
#
|
||||
proc isomanip_mv {} {
|
||||
global .isolist
|
||||
@ -1569,25 +1578,29 @@ proc isomanip_mv {} {
|
||||
|
||||
enforce_overwrite_settings "isofs"
|
||||
reset_highest_cmd_sev
|
||||
reset_yesno_to_all
|
||||
set multi_source 0
|
||||
if {[llength $selected] != 1} {set multi_source 1}
|
||||
foreach i "$selected" {
|
||||
set name [lindex "$isolist_names" "$i"]
|
||||
if {"$isodir_is_pwd" == 0} {
|
||||
set name [combine_dir_and_name "$isodir_adr" "$name"]
|
||||
}
|
||||
set name_ftype [isofs_filetype $name]
|
||||
|
||||
# Ask for confirmation if overwriting is about to happen
|
||||
if {"$target_ftype" == "d"} {
|
||||
set eff_target [combine_dir_and_name "$target" "$name"]
|
||||
set eff_target_ftype [get_iso_filetype "$eff_target"]
|
||||
if {[handle_iso_overwriting \
|
||||
"$eff_target" "$eff_target_ftype" 0 "" ""] == "0"} {
|
||||
return ""
|
||||
}
|
||||
} else {
|
||||
if {[handle_iso_overwriting \
|
||||
"$target" "$target_ftype" 0 "" ""] == "0"} {
|
||||
return ""
|
||||
}
|
||||
set eff_target $target
|
||||
set eff_target_ftype $target_ftype
|
||||
}
|
||||
if {[handle_overwriting "isofs" $eff_target $eff_target_ftype \
|
||||
"isofs" $name $name_ftype $multi_source \
|
||||
"" ""] == "0"} {
|
||||
if {$multi_source == 0} { return "" }
|
||||
continue
|
||||
}
|
||||
send_marked_cmd "-mv [make_text_shellsafe "$name"] [make_text_shellsafe "$target"] --"
|
||||
}
|
||||
@ -1602,7 +1615,7 @@ proc isomanip_mv {} {
|
||||
|
||||
# Create an empty ISO directory with address given by variable
|
||||
# isomanip_move_target.
|
||||
# Called when the "Make directory" button is hit or by other functions.
|
||||
# Called when the "Make dir" button is hit or by other functions.
|
||||
#
|
||||
proc isomanip_mkdir {} {
|
||||
global isomanip_move_target isodir_adr isodir_return_name
|
||||
@ -1797,7 +1810,7 @@ proc isodir_verify {} {
|
||||
|
||||
# Verify the MD5 checksums of the data files orch are selected or which
|
||||
# sit in the trees underneath the selected items in the isolist box.
|
||||
# Called when the "Verify" in the "ISO selection:" line is hit.
|
||||
# Called when the "Verify" in the "Selection:" line is hit.
|
||||
#
|
||||
proc isomanip_verify {} {
|
||||
global .isolist
|
||||
@ -1906,13 +1919,13 @@ proc iso_rollback {} {
|
||||
|
||||
# Inquire an accurate prediction of free space after writing a session with
|
||||
# the pending changes of the ISO image.
|
||||
# Called when button "Refresh avail:" is hit.
|
||||
# Called when button "Avail:" is hit.
|
||||
#
|
||||
proc refresh_avail {} {
|
||||
global result_list highest_cmd_sev
|
||||
global sieve_ret
|
||||
|
||||
if {[assert_outdev "refreshing available space count"] <= 0} {return ""}
|
||||
if {[assert_outdev "refreshing available space prediction"] <= 0} {return ""}
|
||||
|
||||
set line "n.a."
|
||||
reset_highest_cmd_sev
|
||||
@ -1932,12 +1945,35 @@ proc refresh_avail {} {
|
||||
|
||||
|
||||
# Warn and prompt the user for confirmation if there is the risk to overwrite
|
||||
# existing files in the ISO image model.
|
||||
# Called from several procedures which change the ISO tree.
|
||||
# existing files on hard disk or in the ISO image model.
|
||||
# Called from several procedures which cause side effects on directory trees.
|
||||
#
|
||||
proc handle_iso_overwriting {target target_ftype from_is_dir
|
||||
selected_adr selected_ftype} {
|
||||
global overwrite_iso_dirs
|
||||
proc handle_overwriting {target_fs target target_ftype
|
||||
source_fs source source_ftype multi_source
|
||||
selected_adr selected_ftype} {
|
||||
global overwrite_iso_files overwrite_iso_dirs overwrite_disk_files
|
||||
|
||||
if {"$target_fs" == "localfs"} {
|
||||
set to_fs "hard disk"
|
||||
set overwrite_fs "disk"
|
||||
set overwrite_dirs 0
|
||||
set overwrite_files "$overwrite_disk_files"
|
||||
} else {
|
||||
set to_fs "ISO"
|
||||
set overwrite_fs "ISO"
|
||||
set overwrite_dirs $overwrite_iso_dirs
|
||||
set overwrite_files "$overwrite_iso_files"
|
||||
}
|
||||
if {$source_fs == "localfs"} {
|
||||
set from_fs "hard disk"
|
||||
} else {
|
||||
set from_fs "ISO"
|
||||
}
|
||||
if {$multi_source == 1} {
|
||||
set what_window window_yesno_ever
|
||||
} else {
|
||||
set what_window window_yesno
|
||||
}
|
||||
|
||||
# >>> Nicer would be:
|
||||
# >>> Check if any file will get overwritten. Not only the direct target.
|
||||
@ -1945,30 +1981,42 @@ proc handle_iso_overwriting {target target_ftype from_is_dir
|
||||
|
||||
if {"$target_ftype" != ""} {
|
||||
if {"$target_ftype" == "d"} {
|
||||
if {"$from_is_dir" == 1} {
|
||||
if {[window_yesno \
|
||||
"'$target'\n\nReally merge with existing ISO directory ?"] \
|
||||
if {"$source_ftype" == "d"} {
|
||||
if {[$what_window \
|
||||
"Really merge existing $to_fs directory\n\n[make_text_shellsafe $target]\n\nwith $from_fs directory\n[make_text_shellsafe $source]\n?"] \
|
||||
!= 1} { return "0" }
|
||||
} else {
|
||||
if {"$overwrite_iso_dirs" == 1} {
|
||||
if {[window_yesno \
|
||||
"'$target'\n\nReally overwrite existing ISO directory ?"] \
|
||||
if {"$target_fs" != "isofs"} {
|
||||
xorriso_tcltk_errmsg "xorriso-tcltk : SORRY : Will not replace directories on hard disk by file of other type"
|
||||
return "0"
|
||||
}
|
||||
if {"$overwrite_dirs" == 1} {
|
||||
if {[$what_window \
|
||||
"Really overwrite $to_fs directory\n\n[make_text_shellsafe $target]\n\nby $from_fs file\n[make_text_shellsafe $source]\n?"] \
|
||||
!= 1} { return "0" }
|
||||
} else {
|
||||
xorriso_tcltk_errmsg "xorriso-tcltk : SORRY : You would have to enable \"Overwriting of ISO directories\""
|
||||
xorriso_tcltk_errmsg "xorriso-tcltk : SORRY : You would have to enable \"Overwrite $overwrite_fs dirs\""
|
||||
return "0"
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if {[window_yesno "'$target'\n\nReally overwrite existing ISO file ?"] \
|
||||
!= 1} { return "0" }
|
||||
if {"$overwrite_files" == 1} {
|
||||
if {[$what_window \
|
||||
"Really overwrite $to_fs file\n\n[make_text_shellsafe $target]\n\nby $from_fs file\n[make_text_shellsafe $source]\n?"] != 1} {
|
||||
return "0"
|
||||
}
|
||||
} else {
|
||||
xorriso_tcltk_errmsg "xorriso-tcltk : SORRY : You would have to enable \"Overwrite $overwrite_fs files\""
|
||||
return "0"
|
||||
}
|
||||
}
|
||||
}
|
||||
if {"$selected_adr" != "$target" && "$selected_adr" != "" && \
|
||||
"$selected_ftype" != "d" && "$selected_ftype" != ""} {
|
||||
if {[window_yesno \
|
||||
"'$selected_adr'\n\nReally replace existing ISO file by a directory ?"] \
|
||||
!= 1} { return "0" }
|
||||
if {[$what_window \
|
||||
"Really replace existing $to_fs file\n\n[make_text_shellsafe $target]\n\nby $from_fs directory\n[make_text_shellsafe $source]\n?"] != 1} {
|
||||
return "0"
|
||||
}
|
||||
}
|
||||
return "1"
|
||||
}
|
||||
@ -2002,15 +2050,17 @@ proc insert_from {} {
|
||||
} else {
|
||||
set target "$isodir_adr"
|
||||
}
|
||||
set from_is_dir [localfs_isdir "$insert_from_adr"]
|
||||
set source_ftype [localfs_filetype "$insert_from_adr"]
|
||||
set name [file tail "$insert_from_adr"]
|
||||
if {"$insert_underneath" == 1 || "$from_is_dir" == 0} {
|
||||
if {"$insert_underneath" == 1 || $source_ftype == "d"} {
|
||||
set target [combine_dir_and_name "$target" "$name"]
|
||||
}
|
||||
set target_ftype [get_iso_filetype "$target"]
|
||||
|
||||
if {[handle_iso_overwriting "$target" "$target_ftype" "$from_is_dir" \
|
||||
"$selected_adr" "$selected_ftype"] == "0"} {
|
||||
reset_yesno_to_all
|
||||
if {[handle_overwriting "isofs" "$target" "$target_ftype" \
|
||||
"localfs" $insert_from_adr $source_ftype 0 \
|
||||
"$selected_adr" "$selected_ftype"] == "0"} {
|
||||
return ""
|
||||
}
|
||||
|
||||
@ -2069,41 +2119,8 @@ proc extract_to {} {
|
||||
set sources [list "$isodir_adr"]
|
||||
}
|
||||
|
||||
# Warn of directory mergers. They can cause mess-up on hard disk.
|
||||
set merge_counter 0
|
||||
set merge_source ""
|
||||
set merge_target ""
|
||||
foreach i "$sources" {
|
||||
if {[isofs_filetype "$i"] != "d"} {
|
||||
continue
|
||||
}
|
||||
if {"$extract_underneath" == 1} {
|
||||
set name [file tail "$i"]
|
||||
set target [combine_dir_and_name "$extract_to_adr" "$name"]
|
||||
} else {
|
||||
set target "$extract_to_adr"
|
||||
}
|
||||
if {[localfs_isdir "$target"] == 1} {
|
||||
incr merge_counter
|
||||
set merge_source "$i"
|
||||
set merge_target "$target"
|
||||
}
|
||||
}
|
||||
if {"$merge_counter" > 0} {
|
||||
if {"$sources" == "/" || "$sources" == "{}"} {
|
||||
if {[window_yesno "Really unpack ISO root directory into hard disk directory\n$merge_target\n?"] \
|
||||
!= 1} { return "" }
|
||||
} else {
|
||||
set and_others ""
|
||||
if {"$merge_counter" > 1} {
|
||||
set and_others "and do so at $merge_counter more occasions"
|
||||
}
|
||||
if {[window_yesno "Really unpack ISO directory\n [lindex "$sources" 0]\n into hard disk directory\n $merge_target\n$and_others ?"] \
|
||||
!= 1} { return "" }
|
||||
}
|
||||
}
|
||||
|
||||
reset_highest_cmd_sev
|
||||
reset_yesno_to_all
|
||||
enforce_overwrite_settings "localfs"
|
||||
set disp_en_mem [set_display_msg 0]
|
||||
if {"$extract_auto_chmod" == 1} {
|
||||
@ -2111,22 +2128,33 @@ proc extract_to {} {
|
||||
} else {
|
||||
send_marked_cmd "-osirrox on:sort_lba_off:auto_chmod_off"
|
||||
}
|
||||
set_display_msg "$disp_en_mem"
|
||||
foreach i "$sources" {
|
||||
if {"$extract_underneath" == 1} {
|
||||
set name [file tail "$i"]
|
||||
set target [combine_dir_and_name "$extract_to_adr" "$name"]
|
||||
set_display_msg $disp_en_mem
|
||||
set multi_source 0
|
||||
if {[llength $sources] != 1} {set multi_source 1}
|
||||
foreach i $sources {
|
||||
if {$extract_underneath == 1} {
|
||||
set name [file tail $i]
|
||||
set target [combine_dir_and_name $extract_to_adr $name]
|
||||
} else {
|
||||
if {[llength "$sources"] != 1} {
|
||||
if {[llength $sources] != 1} {
|
||||
xorriso_tcltk_errmsg "xorriso-tcltk : SORRY : You must select exactly one ISO file as extraction source"
|
||||
return ""
|
||||
}
|
||||
set target "$extract_to_adr"
|
||||
set target $extract_to_adr
|
||||
}
|
||||
if {"$i" == ""} {
|
||||
if {$i == ""} {
|
||||
set i "/"
|
||||
}
|
||||
send_marked_cmd "-extract [make_text_shellsafe "$i"] [make_text_shellsafe "$target"]"
|
||||
set target_ftype [localfs_filetype $target]
|
||||
set from_is_dir 0
|
||||
set source_ftype [isofs_filetype $i]
|
||||
if {[handle_overwriting "localfs" $target $target_ftype \
|
||||
"isofs" $i $source_ftype $multi_source \
|
||||
"" ""] == 0} {
|
||||
continue
|
||||
}
|
||||
send_marked_cmd \
|
||||
"-extract [make_text_shellsafe $i] [make_text_shellsafe $target]"
|
||||
}
|
||||
browse_tree_populate "localfs"
|
||||
}
|
||||
@ -2443,7 +2471,7 @@ proc destroy_browse_disk {w} {
|
||||
# the hard disk filesystem.
|
||||
#
|
||||
proc browse_disk_open_dir {tr name} {
|
||||
if {[localfs_isdir "$name"] != 1} {return ""}
|
||||
if {[localfs_filetype "$name"] != "d"} {return ""}
|
||||
set lslist [localfs_ls "$name"]
|
||||
browse_tree_fill_dir $tr "$name" "$lslist"
|
||||
}
|
||||
@ -2684,13 +2712,22 @@ proc restore_isolist_selection {} {
|
||||
#
|
||||
proc destroy_yesno {w answer} {
|
||||
global yesno_window_is_active answer_of_yesno yesno_window_geometry
|
||||
global yesno_to_all
|
||||
|
||||
if {"$w" != ""} {
|
||||
if {$w != ""} {
|
||||
set yesno_window_geometry [wm geometry $w]
|
||||
destroy "$w"
|
||||
destroy $w
|
||||
}
|
||||
set yesno_window_is_active 0
|
||||
set answer_of_yesno "$answer"
|
||||
set answer_of_yesno $answer
|
||||
if {$answer == 2} {
|
||||
set yesno_to_all 1
|
||||
set answer_of_yesno 1
|
||||
}
|
||||
if {$answer == -1} {
|
||||
set yesno_to_all -1
|
||||
set answer_of_yesno 0
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -2712,10 +2749,10 @@ proc window_yesno {question} {
|
||||
set_window_position $w "$yesno_window_geometry"
|
||||
label $w.question -text "$question"
|
||||
button $w.yes -text "yes" -command "destroy_yesno $w 1" \
|
||||
-borderwidth 10 -padx 20 -pady 20 -relief ridge
|
||||
-borderwidth 4 -padx 20 -pady 20
|
||||
button $w.no -text "no" -command "destroy_yesno $w 0" \
|
||||
-borderwidth 10 -padx 20 -pady 20 -relief ridge
|
||||
pack $w.yes $w.question $w.no -side left -expand 1 -fill both
|
||||
-borderwidth 4 -padx 20 -pady 20
|
||||
pack $w.yes $w.question $w.no -side left
|
||||
update idletasks
|
||||
|
||||
tkwait variable answer_of_yesno
|
||||
@ -2723,6 +2760,60 @@ proc window_yesno {question} {
|
||||
}
|
||||
|
||||
|
||||
# Pop-up a window which asks for yes, yes-to-all, no, or no-to-all.
|
||||
# Return 1 if answer is yes.
|
||||
#
|
||||
proc window_yesno_ever {question} {
|
||||
global answer_of_yesno yesno_window_is_active yesno_window_geometry
|
||||
global yesno_to_all
|
||||
|
||||
set w {.yesno_window}
|
||||
if {"$yesno_window_is_active" == 1} {
|
||||
raise $w
|
||||
xorriso_tcltk_errmsg "xorriso-tcltk : SORRY : You still need to answer an older yes/no question"
|
||||
return "0"
|
||||
}
|
||||
if {$yesno_to_all == 1} {
|
||||
return "1"
|
||||
}
|
||||
if {$yesno_to_all == -1} {
|
||||
return "0"
|
||||
}
|
||||
set yesno_window_is_active 1
|
||||
set answer_of_yesno ""
|
||||
toplevel $w -borderwidth 20 -class Dialog
|
||||
wm title $w "xorriso-tcltk yes/no"
|
||||
set_window_position $w "$yesno_window_geometry"
|
||||
|
||||
frame $w.yes_frame
|
||||
frame $w.no_frame
|
||||
label $w.question -text "$question"
|
||||
button $w.yes -text "yes" -command "destroy_yesno $w 1" \
|
||||
-borderwidth 4 -padx 20 -pady 20 -relief raised
|
||||
button $w.no -text "no" -command "destroy_yesno $w 0" \
|
||||
-borderwidth 4 -padx 20 -pady 20 -relief raised
|
||||
button $w.yes_to_all -text "yes to all" -command "destroy_yesno $w 2"
|
||||
bind_help $w.yes_to_all "yes to all"
|
||||
button $w.no_to_all -text "no to all" -command "destroy_yesno $w -1"
|
||||
bind_help $w.no_to_all "no to all"
|
||||
pack $w.yes $w.yes_to_all -in $w.yes_frame -side top -expand 1 -fill both
|
||||
pack $w.no $w.no_to_all -in $w.no_frame -side top -expand 1 -fill both
|
||||
pack $w.yes_frame $w.question $w.no_frame \
|
||||
-in $w -side left -expand 1 -fill both
|
||||
update idletasks
|
||||
|
||||
tkwait variable answer_of_yesno
|
||||
return "$answer_of_yesno"
|
||||
}
|
||||
|
||||
|
||||
proc reset_yesno_to_all {} {
|
||||
global yesno_to_all
|
||||
|
||||
set yesno_to_all 0
|
||||
}
|
||||
|
||||
|
||||
# Destroy the notification pop-up window.
|
||||
#
|
||||
proc destroy_ack {w} {
|
||||
@ -3054,7 +3145,7 @@ proc init_gui {} {
|
||||
|
||||
|
||||
# The xorriso headline with End button, xorriso version, busy/ready indicator,
|
||||
# command line, and "Refresh state display" button.
|
||||
# command line, and "Refresh disp" button.
|
||||
#
|
||||
proc init_input {} {
|
||||
global borderwidth busy_text_exists xorriso_version logging
|
||||
@ -3080,9 +3171,9 @@ proc init_input {} {
|
||||
set busy_text_exists 1
|
||||
pack .busy_text -in .busy
|
||||
|
||||
button .refresh_state -text "Refresh state display" \
|
||||
button .refresh_state -text "Refresh disp" \
|
||||
-command "refresh_state"
|
||||
bind_help .refresh_state "Refresh state display"
|
||||
bind_help .refresh_state "Refresh disp"
|
||||
|
||||
checkbutton .log_pipes_switch -text "Log pipes" \
|
||||
-indicatoron 1 -selectcolor "" \
|
||||
@ -3113,7 +3204,7 @@ proc init_cmdline {} {
|
||||
|
||||
label .cmdline_text -width 10 -text "Command:"
|
||||
bind_help .cmdline_text "Command:"
|
||||
entry .cmdline_entry -width 60 -relief sunken -bd 1 \
|
||||
entry .cmdline_entry -width 56 -relief sunken -bd 1 \
|
||||
-textvariable cmdline
|
||||
bind_entry_keys .cmdline_entry {cmdline_return}
|
||||
bind_help .cmdline_entry "Command:"
|
||||
@ -3275,9 +3366,9 @@ proc init_drivebox {} {
|
||||
-in .drive_picker_line_2 -side left -expand 1 -fill x
|
||||
pack .drive_picker_line_1 .drive_picker_line_2 \
|
||||
-in .drive_picker -side top -expand 1 -fill x -anchor w
|
||||
pack .drive_scan .drive_drop_both \
|
||||
pack .drive_scan .drive_calm \
|
||||
-in .drive_aux_buttons_line_1 -side left -expand 1 -fill none
|
||||
pack .drive_calm .iso_rollback_button \
|
||||
pack .drive_drop_both .iso_rollback_button \
|
||||
-in .drive_aux_buttons_line_2 -side left -expand 1 -fill x
|
||||
pack .drive_aux_buttons_line_1 .drive_aux_buttons_line_2 \
|
||||
-in .drive_aux_buttons -side top -expand 1 -fill x -anchor w
|
||||
@ -3318,14 +3409,14 @@ proc init_indev {} {
|
||||
|
||||
button .indev_eject -text "Eject" -command {eject_indev}
|
||||
bind_help .indev_eject "Eject (indev)"
|
||||
label .indev_label -width 22 -text "Input drive or image "
|
||||
bind_help .indev_label "Input drive or image"
|
||||
entry .indev_entry -width 40 -relief sunken -bd 1 \
|
||||
label .indev_label -width 16 -text "Input drive/image "
|
||||
bind_help .indev_label "Input drive/image"
|
||||
entry .indev_entry -width 36 -relief sunken -bd 1 \
|
||||
-textvariable indev_adr
|
||||
|
||||
bind_entry_keys .indev_entry {indev_return}
|
||||
bind_help .indev_entry "Input drive or image"
|
||||
label .indev_summary -width 65 -text "" -relief ridge -borderwidth 2
|
||||
bind_help .indev_entry "Input drive/image"
|
||||
label .indev_summary -width 60 -text "" -relief ridge -borderwidth 2
|
||||
bind_help .indev_summary "input drive info"
|
||||
create_browser_button .indev_browse_button \
|
||||
"indev_adr" "localfs" "Browse disk (indev)"
|
||||
@ -3348,15 +3439,15 @@ proc init_outdev {} {
|
||||
|
||||
button .outdev_eject -text "Eject" -command {eject_outdev}
|
||||
bind_help .outdev_eject "Eject (outdev)"
|
||||
label .outdev_label -width 22 -text "Output drive or image"
|
||||
bind_help .outdev_label "Output drive or image"
|
||||
entry .outdev_entry -width 40 -relief sunken -bd 1 \
|
||||
label .outdev_label -width 16 -text "Output drive/image"
|
||||
bind_help .outdev_label "Output drive/image"
|
||||
entry .outdev_entry -width 36 -relief sunken -bd 1 \
|
||||
-textvariable outdev_adr
|
||||
bind_entry_keys .outdev_entry {outdev_return}
|
||||
bind_help .outdev_entry "Output drive or image"
|
||||
bind_help .outdev_entry "Output drive/image"
|
||||
create_browser_button .outdev_browse_button \
|
||||
"outdev_adr" "localfs" "Browse disk (outdev)"
|
||||
label .outdev_summary -width 65 -text "" -relief ridge -borderwidth 2
|
||||
label .outdev_summary -width 60 -text "" -relief ridge -borderwidth 2
|
||||
bind_help .outdev_summary "output drive info"
|
||||
pack .outdev_eject .outdev_label .outdev_entry \
|
||||
-in .outdev -side left -expand 1 -fill both
|
||||
@ -3486,22 +3577,22 @@ proc init_isomanip {} {
|
||||
frame .isomanip -borderwidth $borderwidth
|
||||
frame .isomanip_move -borderwidth 0
|
||||
|
||||
label .isomanip_prefix -text "ISO selection:"
|
||||
bind_help .isomanip_prefix "ISO selection:"
|
||||
label .isomanip_prefix -text "Selection:"
|
||||
bind_help .isomanip_prefix "Selection:"
|
||||
|
||||
button .isomanip_verify_button -width 8 -text "Verify" \
|
||||
button .isomanip_verify_button -text "Verify" \
|
||||
-command {isomanip_verify}
|
||||
bind_help .isomanip_verify_button "Verify (selection)"
|
||||
button .isomanip_rm_r_button -width 8 -text "Delete" \
|
||||
button .isomanip_rm_r_button -text "Delete" \
|
||||
-command {isomanip_rm_r}
|
||||
bind_help .isomanip_rm_r_button "Delete"
|
||||
button .isomanip_move_button -text "Rename to:" \
|
||||
button .isomanip_move_button -text "Move to:" \
|
||||
-command {isomanip_mv}
|
||||
bind_help .isomanip_move_button "Rename to:"
|
||||
button .isomanip_mkdir_button -width 8 -text "Make dir" \
|
||||
bind_help .isomanip_move_button "Move to:"
|
||||
button .isomanip_mkdir_button -text "Make dir" \
|
||||
-command {isomanip_mkdir}
|
||||
bind_help .isomanip_mkdir_button "Make dir"
|
||||
entry .isomanip_move_target -width 60 -relief sunken -bd 1 \
|
||||
entry .isomanip_move_target -width 58 -relief sunken -bd 1 \
|
||||
-textvariable isomanip_move_target
|
||||
# bind_entry_keys .isomanip_move_target {isomanip_mv}
|
||||
bind_entry_keys .isomanip_move_target ""
|
||||
@ -3509,12 +3600,12 @@ proc init_isomanip {} {
|
||||
create_browser_button .isomanip_move_target_button \
|
||||
"isomanip_move_target" "isofs" "Browse ISO (move target)"
|
||||
|
||||
button .avail_button -text "Refresh avail:" \
|
||||
button .avail_button -text "Avail:" \
|
||||
-command {refresh_avail}
|
||||
bind_help .avail_button "Refresh avail:"
|
||||
bind_help .avail_button "Avail:"
|
||||
frame .avail_label_frame -relief ridge -borderwidth 2
|
||||
label .avail_label -width 10 -text ""
|
||||
bind_help .avail_label "Refresh avail:"
|
||||
bind_help .avail_label "Avail:"
|
||||
pack .avail_label -in .avail_label_frame
|
||||
|
||||
pack .isomanip_prefix .isomanip_verify_button .isomanip_rm_r_button \
|
||||
@ -3839,7 +3930,7 @@ The GUI window is separated into three main areas:
|
||||
|
||||
- Click the \"Scan for drives\" button in the middle area.
|
||||
- Select a drive and click the \"Pick output drive\" button.
|
||||
- If the information field in the \"Output drive or image\" line begins by
|
||||
- If the information field in the \"Output drive/image\" line begins by
|
||||
\"appendable\" or \"closed\" and if the medium is CD-RW, DVD-RW, DVD+RW, or
|
||||
BD-RE then click the \"Blank\" button to erase the old data.
|
||||
(Blanking of \"DVD-RW sequential recording\" will last very long.)
|
||||
@ -3860,14 +3951,14 @@ The GUI window is separated into three main areas:
|
||||
|
||||
Write a directory as only content to an ISO image data file on hard disk
|
||||
|
||||
- Go to the text field beneath \"Output drive or image\" and toggle
|
||||
- Go to the text field beneath \"Output drive/image\" and toggle
|
||||
the address of the image file. Or click on the \"/\" button to the right
|
||||
of the field to get a file browser.
|
||||
- You may click on a name in the browser and bring it into the text field
|
||||
by button \"Edit\".
|
||||
- When the intended file address is composed, hit the Return key in the
|
||||
text field.
|
||||
- If the information field in the \"Output drive or image\" line begins by
|
||||
- If the information field in the \"Output drive/image\" line begins by
|
||||
\"appendable\" or \"closed\" then you addressed an existing data file.
|
||||
Warning: Applying the \"Blank\" button to it would damage its content !
|
||||
You probably do not want this in this special use case.
|
||||
@ -3880,7 +3971,7 @@ The GUI window is separated into three main areas:
|
||||
|
||||
- Click the \"Scan for drives\" button in the middle area.
|
||||
- Select a drive and click the \"Pick output drive\" button.
|
||||
- If the information field in the \"Output drive or image\" line begins by
|
||||
- If the information field in the \"Output drive/image\" line begins by
|
||||
\"appendable\" or \"closed\" and if the medium is CD-RW, DVD-RW, DVD+RW, or
|
||||
BD-RE then click the \"Blank\" button to erase the old data.
|
||||
(Blanking of \"DVD-RW sequential recording\" will last very long.)
|
||||
@ -3900,12 +3991,12 @@ The GUI window is separated into three main areas:
|
||||
- Like above, \"Scan for drives\" but click button \"Pick drive for both roles\"
|
||||
in order to load the directory tree of the existing ISO filesystem.
|
||||
For an ISO image data file, bring its name into the input fields of both
|
||||
lines \"Input drive or image\" and \"Output drive or image\".
|
||||
lines \"Input drive/image\" and \"Output drive/image\".
|
||||
You should now see in both info fields texts which begin by \"appendable\".
|
||||
- Go to the \"Insert from disk:\" line in the lower area.
|
||||
Use the means described in the first use case to add more directories or
|
||||
data files.
|
||||
- If you are interested in \"Delete\" or \"Rename to:\" buttons in the
|
||||
- If you are interested in \"Delete\" or \"Move to:\" buttons in the
|
||||
bottom line of the GUI: Click them by the rightmost mouse button to see
|
||||
their help texts.
|
||||
- When all intended changes are done: Click \"Write ISO session\" and
|
||||
@ -3918,7 +4009,7 @@ The GUI window is separated into three main areas:
|
||||
- Like above, \"Scan for drives\" but click button \"Pick input drive\"
|
||||
in order to load the directory tree of the existing ISO filesystem.
|
||||
For an ISO image data file, bring its name into the input field of the
|
||||
lines \"Input drive or image\" and \"Output drive or image\".
|
||||
lines \"Input drive/image\" and \"Output drive/image\".
|
||||
You should now see in both info fields texts which begin by \"appendable\".
|
||||
- Go to the \"ISO directory:\" line in the lower area.
|
||||
Either toggle in the address of the directory you want to extract or
|
||||
@ -3947,8 +4038,9 @@ filesystems on optical media (CD, DVD, BD) or in disk files.
|
||||
Dependencies:
|
||||
xorriso, Tcl language, Tk GUI toolkit, optionally Tcl/Tk package BWidget
|
||||
|
||||
Copyright (C) 2012, Thomas Schmitt <scdbackup@gmx.net>, libburnia-project.org
|
||||
Provided under GNU GPL version 2 or later."
|
||||
Copyright (C) 2012 - 2013
|
||||
Thomas Schmitt <scdbackup@gmx.net>, libburnia-project.org
|
||||
Provided under BSD license: Use, modify, and distribute as you like."
|
||||
}
|
||||
if {"$what" == "End"} {
|
||||
return \
|
||||
@ -3981,9 +4073,9 @@ do i/o via standard input and standard output or via named pipes.
|
||||
Further it has to perform integer arithmetics and string manipulations.
|
||||
And, well, a graphical widget set would be nice."
|
||||
}
|
||||
if {"$what" == "Refresh state display"} {
|
||||
if {"$what" == "Refresh disp"} {
|
||||
return \
|
||||
"The \"Refresh state display\" button causes several text fields and list
|
||||
"The \"Refresh disp\" button causes several text fields and list
|
||||
boxes to update their display after manually transmitted commands may
|
||||
have changed the state of drives or ISO model."
|
||||
}
|
||||
@ -3996,12 +4088,6 @@ and the frontend is still waiting for its reply messages."
|
||||
return \
|
||||
"The \"Command:\" field can be used to send commands to xorriso.
|
||||
See the manual page of xorriso for its concepts and commands."
|
||||
}
|
||||
if {"$what" == "Refresh state display"} {
|
||||
return \
|
||||
"The \"Refresh state display\" button causes the other two main areas to update
|
||||
their display after manually transmitted commands may have changed the state
|
||||
of drives or ISO model."
|
||||
}
|
||||
if {"$what" == "Log pipes"} {
|
||||
return \
|
||||
@ -4060,7 +4146,7 @@ granting for a permanent solution.)"
|
||||
return \
|
||||
"The \"Pick input drive\" button executes command -indev and obtains some
|
||||
information about the medium status. This info is displayed in the
|
||||
\"Input drive or image\" line.
|
||||
\"Input drive/image\" line.
|
||||
Further it causes the display of the ISO image model to be updated.
|
||||
|
||||
The medium in the input drive must be blank or contain a valid ISO 9660
|
||||
@ -4070,13 +4156,13 @@ model of xorriso. If there is a valid ISO filesystem in the input drive
|
||||
then its directory tree gets loaded underneath that model root directory.
|
||||
|
||||
The input drive may also be a data file on hard disk if that file contains
|
||||
an ISO 9660 filesystem image. See field \"Input drive or image\"."
|
||||
an ISO 9660 filesystem image. See field \"Input drive/image\"."
|
||||
}
|
||||
if {"$what" == "Pick output drive"} {
|
||||
return \
|
||||
"The \"Pick output drive\" button executes command -outdev and obtains some
|
||||
information about the medium status. This info is displayed in the
|
||||
\"Output drive or image\" line.
|
||||
\"Output drive/image\" line.
|
||||
|
||||
The output drive may be empty or loaded with a medium, that may be blank,
|
||||
appendable or closed.
|
||||
@ -4085,7 +4171,7 @@ blank or appendable. Button \"Blank\" can bring appendable or closed media
|
||||
into blank state.
|
||||
|
||||
The output drive may also be a data file on hard disk. See field
|
||||
\"Output drive or image\"."
|
||||
\"Output drive/image\"."
|
||||
It is considered appendable if it contains an ISO 9660 filesystem image.
|
||||
It is considered blank if it is empty or marked as blank by button \"Blank\".
|
||||
It is considered closed if it contains other data."
|
||||
@ -4094,7 +4180,7 @@ It is considered closed if it contains other data."
|
||||
return \
|
||||
"The \"Pick drive for both roles\" button executes command -dev and obtains some
|
||||
information about the medium status. This info is displayed in the
|
||||
\"Input drive or image\" line and in the \"Output drive or image\" line.
|
||||
\"Input drive/image\" line and in the \"Output drive/image\" line.
|
||||
Further it causes the display of the ISO image model to be updated.
|
||||
|
||||
The medium in the drive must be blank or contain a valid ISO 9660 filesystem.
|
||||
@ -4106,7 +4192,7 @@ and renaming. When this is done, the changes get written to the drive
|
||||
via button \"Write ISO session\".
|
||||
|
||||
The drive may also be a data file on hard disk.
|
||||
See fields \"Input drive or image\" and \"Output drive or image\".
|
||||
See fields \"Input drive/image\" and \"Output drive/image\".
|
||||
It is considered appendable if it contains an ISO 9660 filesystem image.
|
||||
It is considered blank if it is empty or marked as blank by button \"Blank\".
|
||||
It is considered closed if it contains other data."
|
||||
@ -4114,7 +4200,7 @@ It is considered closed if it contains other data."
|
||||
if {"$what" == "Give up drives"} {
|
||||
return \
|
||||
"The \"Give up drives\" button executes commands -indev \"\" -outdev \"\"
|
||||
and clears both \"... drive or image\" lines, as well as the ISO model."
|
||||
and clears both \"... drive/image\" lines, as well as the ISO model."
|
||||
}
|
||||
if {"$what" == "Calm drives"} {
|
||||
return \
|
||||
@ -4137,9 +4223,9 @@ A double-click on a drive item has the same effect as button
|
||||
\"Pick drive for both roles\".
|
||||
"
|
||||
}
|
||||
if {"$what" == "Input drive or image"} {
|
||||
if {"$what" == "Input drive/image"} {
|
||||
return \
|
||||
"The \"Input drive or image\" field displays the address of the input drive.
|
||||
"The \"Input drive/image\" field displays the address of the input drive.
|
||||
Editing the drive address and pressing the Return key causes the execution
|
||||
of command -indev with the field content as drive address.
|
||||
|
||||
@ -4150,18 +4236,18 @@ same file.
|
||||
}
|
||||
if {"$what" == "input drive info"} {
|
||||
return \
|
||||
"The text field beneath the \"Input drive or image\" field displays the medium
|
||||
"The text field beneath the \"Input drive/image\" field displays the medium
|
||||
status of the input drive. It tells about the writability, the medium type,
|
||||
the number of ISO sessions, and the amount of readable data."
|
||||
}
|
||||
if {"$what" == "Eject (indev)"} {
|
||||
return \
|
||||
"The \"Eject\" button beneath the \"Input drive or image\" field excutes
|
||||
"The \"Eject\" button beneath the \"Input drive/image\" field excutes
|
||||
command -eject \"in\"."
|
||||
}
|
||||
if {"$what" == "Output drive or image"} {
|
||||
if {"$what" == "Output drive/image"} {
|
||||
return \
|
||||
"The \"Output drive or image\" field displays the address of the output drive.
|
||||
"The \"Output drive/image\" field displays the address of the output drive.
|
||||
Editing the drive address and pressing the Return key causes the execution
|
||||
of command -outdev with the field content as drive address.
|
||||
|
||||
@ -4172,13 +4258,13 @@ same file.
|
||||
}
|
||||
if {"$what" == "output drive info"} {
|
||||
return \
|
||||
"The text beneath the \"Output drive or image\" field displays the medium
|
||||
"The text beneath the \"Output drive/image\" field displays the medium
|
||||
status of the output drive. It tells about the writability, the medium type,
|
||||
the number of ISO sessions, and the amount of free space."
|
||||
}
|
||||
if {"$what" == "Eject (outdev)"} {
|
||||
return \
|
||||
"The \"Eject\" button beneath the \"Output drive or image\" field excutes
|
||||
"The \"Eject\" button beneath the \"Output drive/image\" field excutes
|
||||
command -eject \"out\"."
|
||||
}
|
||||
if {"$what" == "Blank"} {
|
||||
@ -4339,14 +4425,14 @@ tree browser to select a source address in the hard disk filesystem.
|
||||
}
|
||||
if {"$what" == "Browse disk (indev)"} {
|
||||
return \
|
||||
"The \"/\" button in the \"Input drive or image\" line pops up a file tree
|
||||
"The \"/\" button in the \"Input drive/image\" line pops up a file tree
|
||||
browser to select a source address in the hard disk filesystem.
|
||||
|
||||
[tell_file_browser_help 1]"
|
||||
}
|
||||
if {"$what" == "Browse disk (outdev)"} {
|
||||
return \
|
||||
"The \"/\" button in the \"Output drive or image\" line pops up a file tree
|
||||
"The \"/\" button in the \"Output drive/image\" line pops up a file tree
|
||||
browser to select a source address in the hard disk filesystem.
|
||||
|
||||
[tell_file_browser_help 1]"
|
||||
@ -4360,7 +4446,7 @@ browser to select the current directory in the ISO filesystem model.
|
||||
}
|
||||
if {"$what" == "Browse ISO (move target)"} {
|
||||
return \
|
||||
"The \"/\" button in the \"ISO selection:\" line pops up a file tree
|
||||
"The \"/\" button in the \"Selection:\" line pops up a file tree
|
||||
browser to select the current directory in the ISO filesystem model.
|
||||
|
||||
[tell_file_browser_help 1]"
|
||||
@ -4444,7 +4530,7 @@ no w-permission."
|
||||
if {"$what" == "Overwrite disk files"} {
|
||||
return \
|
||||
"The \"Overwrite disk files\" switch controls whether existing files may be
|
||||
overwritten by extraction on hard disk. See xorriso command -overwrite \"on\".
|
||||
overwritten by extraction to hard disk. See xorriso command -overwrite \"on\".
|
||||
|
||||
This is DANGEROUS, of course, but comes in handy with restoring of backups.
|
||||
|
||||
@ -4467,7 +4553,7 @@ and button \"Accept\"."
|
||||
if {"$what" == "Permissions:"} {
|
||||
return \
|
||||
"The \"Permissions\" menu allows to choose a global policy to adjust
|
||||
the access permissions of the files in the emerging ISO session.
|
||||
the access permissions of the files when an ISO session gets written.
|
||||
|
||||
The default policy \"as is\" leaves the permissions as they are.
|
||||
Usually they have been imported from hard disk or from a loaded ISO image.
|
||||
@ -4486,9 +4572,9 @@ If there is any x-permission, then all three x get granted. s- and t-bits
|
||||
get removed.
|
||||
"
|
||||
}
|
||||
if {"$what" == "Refresh avail:"} {
|
||||
if {"$what" == "Avail:"} {
|
||||
return \
|
||||
"The \"Refresh avail:\" button triggers command -tell_media_space. It makes
|
||||
"The \"Avail:\" button triggers command -tell_media_space. It makes
|
||||
a time consuming exact prediction of the free space on the medium in the
|
||||
output drive. For this purpose, the size of an ISO session with the pending
|
||||
changes is computed.
|
||||
@ -4506,7 +4592,7 @@ schedules them for being copied with the next \"Write ISO session\" run.
|
||||
|
||||
The switches \"Underneath\" and \"Selected\" control what ISO address
|
||||
the inserted files shall have. You may use buttons \"Delete\" and
|
||||
\"Rename to:\" for further adjustments.
|
||||
\"Move to:\" for further adjustments.
|
||||
"
|
||||
}
|
||||
if {"$what" == "Underneath (insert)"} {
|
||||
@ -4567,20 +4653,20 @@ role with extraction or insertion of files.
|
||||
Most of the buttons underneath the box operate on the selected items
|
||||
unconditionally."
|
||||
}
|
||||
if {"$what" == "ISO selection:"} {
|
||||
if {"$what" == "Selection:"} {
|
||||
return \
|
||||
"The ISO selection consists of the items which are selected in the list box
|
||||
above the \"ISO selection:\" line.
|
||||
above the \"Selection:\" line.
|
||||
|
||||
If the respective \"Selected\" switches are enabled, then the ISO selection
|
||||
is source of file extraction and target of file insertion.
|
||||
|
||||
In any case it is the old nome of the \"Rename to:\" button, the victim
|
||||
In any case it is the old nome of the \"Move to:\" button, the victim
|
||||
of the \"Delete\" button, and the subject of the \"Verify\" button."
|
||||
}
|
||||
if {"$what" == "Verify (selection)"} {
|
||||
return \
|
||||
"The \"Verify\" button in the \"ISO selection:\" line executes command
|
||||
"The \"Verify\" button in the \"Selection:\" line executes command
|
||||
-md5_check_r \"SORRY\" with each of the selected items.
|
||||
|
||||
This reads the content of all data files which are selected or underneath
|
||||
@ -4600,9 +4686,9 @@ in earlier sessions if they were not freshly inserted after loading the
|
||||
ISO model from the input drive.
|
||||
"
|
||||
}
|
||||
if {"$what" == "Rename to:"} {
|
||||
if {"$what" == "Move to:"} {
|
||||
return \
|
||||
"The \"Rename to:\" button uses command -mv to move each of the selected
|
||||
"The \"Move to:\" button uses command -mv to move each of the selected
|
||||
items to the address that is given by the text field right to the button.
|
||||
|
||||
If this address points to an existing ISO directory, then the items will
|
||||
@ -4613,16 +4699,35 @@ given address."
|
||||
if {"$what" == "Make dir"} {
|
||||
return \
|
||||
"The \"Make dir\" button executes command -mkdir with the address in the
|
||||
text field to its left (the same as used by \"Rename to:\").
|
||||
text field to its left (the same as used by \"Move to:\").
|
||||
|
||||
Useful to create a target directory before moving the selection."
|
||||
}
|
||||
if {"$what" == "rename and mkdir target"} {
|
||||
return \
|
||||
"The text field between the \"Rename to:\" button and the \"Make dir\" button
|
||||
"The text field between the \"Move to:\" button and the \"Make dir\" button
|
||||
serves both buttons by providing the target address for renaming
|
||||
resp. directory creation."
|
||||
}
|
||||
if {"$what" == "yes to all"} {
|
||||
return \
|
||||
"The \"yes to all\" button appears in the yes/no window if a GUI action is
|
||||
about to overwrite a file object and more such overwrite situations are
|
||||
to be expected.
|
||||
|
||||
If the button is clicked, then all further yes/no questions of that GUI
|
||||
action will be answered automatically with yes."
|
||||
}
|
||||
if {"$what" == "no to all"} {
|
||||
return \
|
||||
"The \"no to all\" button appears in the yes/no window if a GUI action is
|
||||
about to overwrite a file object and more such overwrite situations are
|
||||
to be expected.
|
||||
|
||||
If the button is clicked, then all further yes/no questions of that GUI
|
||||
action will be answered automatically with no."
|
||||
}
|
||||
|
||||
return "--- No help text found for topic '$what'"
|
||||
}
|
||||
|
||||
@ -4888,12 +4993,16 @@ proc yell_xorriso_tcltk {} {
|
||||
|
||||
# Tells whether an absolute path leads to a directory on hard disk
|
||||
#
|
||||
proc localfs_isdir {path} {
|
||||
proc localfs_filetype {path} {
|
||||
catch {file lstat "$path" stbuf}
|
||||
if {[info exists stbuf] == 1} {
|
||||
if {$stbuf(type) == "directory"} {return 1}
|
||||
set t [string range $stbuf(type) 0 0]
|
||||
if {[string first "$t" "bcdls"] != -1} {return "$t"}
|
||||
if {"$stbuf(type)" == "file"} {return "-"}
|
||||
if {"$stbuf(type)" == "fifo"} {return "p"}
|
||||
return "?"
|
||||
}
|
||||
return 0
|
||||
return ""
|
||||
}
|
||||
|
||||
|
||||
@ -4902,7 +5011,7 @@ proc localfs_isdir {path} {
|
||||
proc localfs_ls {dir} {
|
||||
|
||||
set result ""
|
||||
if {[localfs_isdir "$dir"] == 0} {return ""}
|
||||
if {[localfs_filetype "$dir"] != "d"} {return ""}
|
||||
set conn [open "|ls {$dir}" r]
|
||||
while {1} {
|
||||
set ret [gets $conn line]
|
||||
@ -4910,14 +5019,9 @@ proc localfs_ls {dir} {
|
||||
break
|
||||
}
|
||||
set adr [combine_dir_and_name "$dir" "$line"]
|
||||
|
||||
# >>> Obtain all types, not only "d" and "?"
|
||||
|
||||
if {[localfs_isdir "$adr"] == 1} {
|
||||
lappend result "d $line"
|
||||
} else {
|
||||
lappend result "? $line"
|
||||
}
|
||||
set filetype [localfs_filetype "$adr"]
|
||||
if {"$filetype" == ""} {set filetype "?"}
|
||||
lappend result "$filetype $line"
|
||||
}
|
||||
catch {close $conn}
|
||||
return "$result"
|
||||
|
@ -1 +1 @@
|
||||
#define Xorriso_timestamP "2013.01.02.183011"
|
||||
#define Xorriso_timestamP "2013.01.03.101633"
|
||||
|
Loading…
Reference in New Issue
Block a user