Consolidated overwrite switches in a single menu burron

This commit is contained in:
Thomas Schmitt 2013-01-03 13:40:59 +00:00
parent fbae233bd8
commit cba9031416
2 changed files with 75 additions and 54 deletions

View File

@ -3748,33 +3748,37 @@ proc init_localfs_aux {} {
global .overwrite_iso_files_button .overwrite_dir_button .extract_auto_chmod
frame .localfs_aux_frame -borderwidth 0
checkbutton .overwrite_iso_files_button -text "Overwrite ISO files" \
menubutton .overwriting -text "Overwriting:" -width 16 -anchor w \
-direction above -relief ridge -indicatoron 1 \
-menu .overwriting.menu
bind_help .overwriting "Overwriting:"
set_overwriting_label
set m ".overwriting.menu"
menu $m -tearoff 0
$m add checkbutton -label "Overwrite ISO files" \
-indicatoron 1 -selectcolor "" \
-relief ridge -borderwidth 2 \
-command set_overwriting_label \
-variable overwrite_iso_files \
-onvalue 1 -offvalue 0
bind_help .overwrite_iso_files_button "Overwrite ISO files"
checkbutton .overwrite_dir_button -text "Overwrite ISO dirs" \
$m add checkbutton -label "Overwrite ISO dirs" \
-indicatoron 1 -selectcolor "" \
-relief ridge -borderwidth 2 \
-command set_overwriting_label \
-variable overwrite_iso_dirs \
-onvalue 1 -offvalue 0
bind_help .overwrite_dir_button "Overwrite ISO dirs"
checkbutton .extract_auto_chmod -text "Enforce disk dir write access" \
$m add checkbutton -label "Overwrite disk files" \
-indicatoron 1 -selectcolor "" \
-relief ridge -borderwidth 2 \
-variable extract_auto_chmod \
-onvalue 1 -offvalue 0
bind_help .extract_auto_chmod "Enforce disk dir write access"
checkbutton .overwrite_disk_files_button -text "Overwrite disk files" \
-indicatoron 1 -selectcolor "" \
-relief ridge -borderwidth 2 \
-command set_overwriting_label \
-variable overwrite_disk_files \
-onvalue 1 -offvalue 0
bind_help .overwrite_disk_files_button "Overwrite disk files"
pack .overwrite_iso_files_button .overwrite_dir_button .extract_auto_chmod \
.overwrite_disk_files_button \
-in .localfs_aux_frame -side left
$m add checkbutton -label "Enforce disk dir write access" \
-indicatoron 1 -selectcolor "" \
-command set_overwriting_label \
-variable extract_auto_chmod \
-onvalue 1 -offvalue 0
pack .overwriting -in .localfs_aux_frame -side left
if {"$have_bwidget" == 1} {
checkbutton .browse_select_is_setvar -text "File browser text field" \
-indicatoron 1 -selectcolor "" \
@ -3935,6 +3939,25 @@ proc create_browser_button {button_name var_name which_fs help_name} {
}
proc set_overwriting_label {} {
global overwrite_iso_files overwrite_iso_dirs overwrite_disk_files
global extract_auto_chmod
global .overwriting
# Determine text suffix for menubutton from overwrite variables
set oif "-"
if {$overwrite_iso_files == 1} {set oif "f"}
set oid "-"
if {$overwrite_iso_dirs == 1} {set oid "d"}
set ohf "-"
if {$overwrite_disk_files == 1} {set ohf "h"}
set fdw "-"
if {$extract_auto_chmod == 1} {set fdw "w"}
set otext "Overwriting: ${oif}${oid}${ohf}${fdw}"
.overwriting configure -text "$otext"
}
# The central storage for help texts.
#
proc tell_helptext {what} {
@ -4559,26 +4582,34 @@ The last command will fail because /tmp/from_iso already exists as directory."
or only the selected items shall be copied to hard disk.
"
}
if {"$what" == "Overwrite ISO files"} {
if {"$what" == "Overwriting:"} {
return \
"The \"Overwrite ISO files\" switch controls whether existing files may be
overwritten in the ISO image. See xorriso command -overwrite \"nondir\".
"The \"Overwriting\" menu bundles several switches which control whether
existing files or directories may be overwritten.
The frontend program will only detect the most obvious name collisions,
but xorriso will reliably refuse to overwrite files if this is banned."
}
if {"$what" == "Overwrite ISO dirs"} {
return \
"The \"Overwrite ISO dirs\" switch controls whether it is allowed to replace
but xorriso will reliably refuse to overwrite files if this is banned.
----------------------------------------------------------------------------
The \"Overwrite ISO files\" switch controls whether existing files may be
overwritten in the ISO image. See xorriso command -overwrite \"nondir\".
----------------------------------------------------------------------------
The \"Overwrite ISO dirs\" switch controls whether it is allowed to replace
an ISO directory by a non-directory file. See xorriso command -overwrite \"on\".
If a directory is copied to a directory, then both directory trees will
be merged. So this switch applies only to situations where non-directories
hit directories."
}
if {"$what" == "Enforce disk dir write access"} {
return \
"The \"Enforce disk dir write access\" switch enables the -osirrox options
----------------------------------------------------------------------------
The \"Overwrite disk files\" switch controls whether existing files may be
overwritten by extraction to hard disk. See xorriso command -overwrite \"on\".
This is DANGEROUS, of course, but comes in handy with restoring of backups.
----------------------------------------------------------------------------
The \"Enforce disk dir write access\" switch enables the -osirrox options
\"auto_chmod_on\" and \"sort_lba_on\" which influence file extraction.
\"auto_chmod_on\" allows xorriso to give itself temporariy w-permission to
@ -4588,18 +4619,8 @@ This is DANGEROUS, of course, but comes in handy with restoring of backups.
Option \"sort_lba_on\" reduces head-moves of optical drives and thus can
speed up extraction substantially. It is bound to \"auto_chmod_on\" because
else it might get in trouble when restoring ISO directories which offer
else it might get into trouble when restoring ISO directories which offer
no w-permission."
}
if {"$what" == "Overwrite disk files"} {
return \
"The \"Overwrite disk files\" switch controls whether existing files may be
overwritten by extraction to hard disk. See xorriso command -overwrite \"on\".
This is DANGEROUS, of course, but comes in handy with restoring of backups.
The frontend program will only detect the most obvious name collisions,
but xorriso will reliably refuse to overwrite files if this is banned."
}
if {"$what" == "File browser text field"} {
return \

View File

@ -1 +1 @@
#define Xorriso_timestamP "2013.01.03.125535"
#define Xorriso_timestamP "2013.01.03.134011"